Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2808 lines
108 KiB

  1. //
  2. // Microsoft Windows
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: shobjidl.idl
  6. //
  7. // Contents: This interface definition contains shell objects that can be remoted
  8. //
  9. cpp_quote("#ifndef __shobjidlp_h__ // ;internal") // ;internal
  10. cpp_quote("#define __shobjidlp_h__ // ;internal") // ;internal
  11. import "objidl.idl";
  12. import "oleidl.idl";
  13. import "oaidl.idl";
  14. import "shtypes.idl";
  15. import "servprov.idl";
  16. import "comcat.idl"; // for IEnumGUID
  17. import "propidl.idl";
  18. import "prsht.idl";
  19. import "msxml.idl";
  20. cpp_quote("#ifndef _WINRESRC_")
  21. cpp_quote("#ifndef _WIN32_IE")
  22. cpp_quote("#define _WIN32_IE 0x0501")
  23. cpp_quote("#else")
  24. cpp_quote("#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)")
  25. cpp_quote("#error _WIN32_IE setting conflicts with _WIN32_WINNT setting")
  26. cpp_quote("#endif")
  27. cpp_quote("#endif")
  28. cpp_quote("#endif")
  29. // IPersistFolder
  30. [
  31. object,
  32. uuid(000214EA-0000-0000-C000-000000000046), // IID_IPersistFolder
  33. pointer_default(unique),
  34. ]
  35. interface IPersistFolder : IPersist
  36. {
  37. // IShellFolder::BindToObject when it is initializing a shell folder object.")
  38. // called when the explorer is initializing a shell folder object.
  39. // pidl -- Specifies the absolute location of the folder
  40. HRESULT Initialize([in] LPCITEMIDLIST pidl);
  41. };
  42. typedef IPersistFolder *LPPERSISTFOLDER;
  43. cpp_quote("#if (_WIN32_IE >= 0x0400)")
  44. // IPersistFolder2
  45. [
  46. object,
  47. uuid(1AC3D9F0-175C-11d1-95BE-00609797EA4F), // IID_IPersistFolder2
  48. pointer_default(unique),
  49. ]
  50. interface IPersistFolder2 : IPersistFolder
  51. {
  52. HRESULT GetCurFolder([out] LPITEMIDLIST *ppidl);
  53. };
  54. typedef IPersistFolder2 *LPPERSISTFOLDER2;
  55. cpp_quote("#endif")
  56. [
  57. object,
  58. uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5), // IID_IPersistIDList
  59. pointer_default(unique),
  60. ]
  61. interface IPersistIDList : IPersist
  62. {
  63. // sets or gets a fully qualifed idlist for an object
  64. HRESULT SetIDList([in] LPCITEMIDLIST pidl);
  65. HRESULT GetIDList([out] LPITEMIDLIST *ppidl);
  66. };
  67. [
  68. helpstring("IEnumIDList "),
  69. uuid(000214F2-0000-0000-C000-000000000046),
  70. object,
  71. pointer_default(unique)
  72. ]
  73. interface IEnumIDList : IUnknown
  74. {
  75. HRESULT Next(
  76. [in] ULONG celt,
  77. [out, size_is(celt), length_is(*pceltFetched)] LPITEMIDLIST *rgelt,
  78. [out] ULONG *pceltFetched);
  79. HRESULT Skip([in] ULONG celt);
  80. HRESULT Reset();
  81. HRESULT Clone([out] IEnumIDList **ppenum);
  82. };
  83. typedef IEnumIDList *LPENUMIDLIST;
  84. // IShellFolder::GetDisplayNameOf/SetNameOf uFlags
  85. cpp_quote("typedef enum tagSHGDN")
  86. cpp_quote("{")
  87. cpp_quote(" SHGDN_NORMAL = 0x0000, // default (display purpose)")
  88. cpp_quote(" SHGDN_INFOLDER = 0x0001, // displayed under a folder (relative)")
  89. cpp_quote(" SHGDN_FOREDITING = 0x1000, // for in-place editing")
  90. // SHGDN_INCLUDE_NONFILESYS = 0x2000, // DEFUNCT - DO NOT REUSE ;internal
  91. cpp_quote(" SHGDN_FORADDRESSBAR = 0x4000, // UI friendly parsing name (remove ugly stuff)")
  92. cpp_quote(" SHGDN_FORPARSING = 0x8000, // parsing name for ParseDisplayName()")
  93. cpp_quote("} SHGNO;")
  94. typedef DWORD SHGDNF;
  95. // IShellFolder::EnumObjects grfFlags bits
  96. cpp_quote("typedef enum tagSHCONTF")
  97. cpp_quote("{")
  98. cpp_quote(" SHCONTF_FOLDERS = 0x0020, // only want folders enumerated (SFGAO_FOLDER)")
  99. cpp_quote(" SHCONTF_NONFOLDERS = 0x0040, // include non folders")
  100. cpp_quote(" SHCONTF_INCLUDEHIDDEN = 0x0080, // show items normally hidden")
  101. cpp_quote(" SHCONTF_INIT_ON_FIRST_NEXT = 0x0100, // allow EnumObject() to return before validating enum")
  102. cpp_quote(" SHCONTF_NETPRINTERSRCH = 0x0200, // hint that client is looking for printers")
  103. cpp_quote(" SHCONTF_SHAREABLE = 0x0400, // hint that client is looking sharable resources (remote shares)")
  104. cpp_quote(" SHCONTF_STORAGE = 0x0800, // include all items with accessible storage and their ancestors")
  105. cpp_quote("};")
  106. typedef DWORD SHCONTF;
  107. // IShellFolder::CompareIDs lParam flags
  108. //
  109. // SHCIDS_ALLFIELDS is a mask for lParam indicating that the shell folder
  110. // should first compare on the lParam column, and if that proves equal,
  111. // then perform a full comparison on all fields. This flag is supported
  112. // if the IShellFolder supports IShellFolder2.
  113. //
  114. // SHCIDS_CANONICALONLY is a mask for lParam indicating that the shell folder
  115. // that the caller doesn't care about proper sort order -- only equality matters.
  116. // (Most CompareIDs test for equality first, and in the case of inequality do
  117. // a UI sort. This bit allows for a more efficient sort in the inequality case.)
  118. //
  119. // If you add more flags in the future, you need to enhance the return //;Internal
  120. // value from SFVM_SUPPORTSIDENTITY. //;Internal
  121. //
  122. cpp_quote("#define SHCIDS_ALLFIELDS 0x80000000L")
  123. cpp_quote("#define SHCIDS_CANONICALONLY 0x10000000L")
  124. cpp_quote("#define SHCIDS_BITMASK 0xFFFF0000L")
  125. cpp_quote("#define SHCIDS_COLUMNMASK 0x0000FFFFL")
  126. // IShellFolder::GetAttributesOf flags
  127. // SFGAO_CANLINK: If this bit is set on an item in the shell folder, a
  128. // 'Create Shortcut' menu item will be added to the File
  129. // menu and context menus for the item. If the user selects
  130. // that command, your IContextMenu::InvokeCommand() will be called
  131. // with 'link'.
  132. // That flag will also be used to determine if 'Create Shortcut'
  133. // should be added when the item in your folder is dragged to another
  134. // folder.
  135. cpp_quote("#define SFGAO_CANCOPY DROPEFFECT_COPY // Objects can be copied (0x1)")
  136. cpp_quote("#define SFGAO_CANMOVE DROPEFFECT_MOVE // Objects can be moved (0x2)")
  137. cpp_quote("#define SFGAO_CANLINK DROPEFFECT_LINK // Objects can be linked (0x4)")
  138. cpp_quote("#define SFGAO_STORAGE 0x00000008L // supports BindToObject(IID_IStorage)")
  139. cpp_quote("#define SFGAO_CANRENAME 0x00000010L // Objects can be renamed")
  140. cpp_quote("#define SFGAO_CANDELETE 0x00000020L // Objects can be deleted")
  141. cpp_quote("#define SFGAO_HASPROPSHEET 0x00000040L // Objects have property sheets")
  142. // unused 0x00000080
  143. cpp_quote("#define SFGAO_DROPTARGET 0x00000100L // Objects are drop target")
  144. cpp_quote("#define SFGAO_CAPABILITYMASK 0x00000177L")
  145. // unused 0x00000200
  146. // unused 0x00000400
  147. // unused 0x00000800
  148. // unused 0x00001000
  149. cpp_quote("#define SFGAO_ENCRYPTED 0x00002000L // object is encrypted (use alt color)")
  150. cpp_quote("#define SFGAO_ISSLOW 0x00004000L // 'slow' object")
  151. cpp_quote("#define SFGAO_GHOSTED 0x00008000L // ghosted icon")
  152. cpp_quote("#define SFGAO_LINK 0x00010000L // Shortcut (link)")
  153. cpp_quote("#define SFGAO_SHARE 0x00020000L // shared")
  154. cpp_quote("#define SFGAO_READONLY 0x00040000L // read-only")
  155. cpp_quote("#define SFGAO_HIDDEN 0x00080000L // hidden object")
  156. cpp_quote("#define SFGAO_DISPLAYATTRMASK 0x000FC000L")
  157. cpp_quote("#define SFGAO_FILESYSANCESTOR 0x10000000L // may contain children with SFGAO_FILESYSTEM")
  158. cpp_quote("#define SFGAO_FOLDER 0x20000000L // support BindToObject(IID_IShellFolder)")
  159. cpp_quote("#define SFGAO_FILESYSTEM 0x40000000L // is a win32 file system object (file/folder/root)")
  160. cpp_quote("#define SFGAO_HASSUBFOLDER 0x80000000L // may contain children with SFGAO_FOLDER")
  161. cpp_quote("#define SFGAO_CONTENTSMASK 0x80000000L")
  162. cpp_quote("#define SFGAO_VALIDATE 0x01000000L // invalidate cached information")
  163. cpp_quote("#define SFGAO_REMOVABLE 0x02000000L // is this removeable media?")
  164. cpp_quote("#define SFGAO_COMPRESSED 0x04000000L // Object is compressed (use alt color)")
  165. cpp_quote("#define SFGAO_BROWSABLE 0x08000000L // supports IShellFolder, but only implements CreateViewObject() (non-folder view)")
  166. cpp_quote("#define SFGAO_NONENUMERATED 0x00100000L // is a non-enumerated object")
  167. cpp_quote("#define SFGAO_NEWCONTENT 0x00200000L // should show bold in explorer tree")
  168. cpp_quote("#define SFGAO_CANMONIKER 0x00400000L // defunct")
  169. cpp_quote("#define SFGAO_HASSTORAGE 0x00400000L // defunct")
  170. cpp_quote("#define SFGAO_STREAM 0x00400000L // supports BindToObject(IID_IStream)")
  171. cpp_quote("#define SFGAO_STORAGEANCESTOR 0x00800000L // may contain children with SFGAO_STORAGE or SFGAO_STREAM")
  172. cpp_quote("#define SFGAO_STORAGECAPMASK 0x70C50008L // for determining storage capabilities, ie for open/save semantics")
  173. typedef ULONG SFGAOF;
  174. // passed to ISF::ParseDisplayName() or ISF::BindToObject() via IBindCtx::RegisterObjectParam()
  175. // * IPersist must be supported by the ObjectParam
  176. // the CLSID returned by IPersist::GetCLSID() should be skipped
  177. // in the binding process. used to avoid loops or to allow delegation to
  178. // base name space functionality. see SHSkipJunction()
  179. cpp_quote("#define STR_SKIP_BINDING_CLSID L\"Skip Binding CLSID\"")
  180. // passed to SHGetDesktopFolder()->ParseDisplayName() via IBindCtx::RegisterObjectParam()
  181. // * no interface support required on object param
  182. // instructing to prefer folder support for URLs. specifically used by the common
  183. // dialog to make it use the DAV NP when parsing http: URLs.
  184. cpp_quote("#define STR_PARSE_PREFER_FOLDER_BROWSING L\"Parse Prefer Folder Browsing\"")
  185. // passed to SHGetDesktopFolder()->ParseDisplayName() via IBindCtx::RegisterObjectParam()
  186. // instructing to fail parsing relative paths. only succeeds for fully qualified paths/urls.
  187. // * no interface support required on object param
  188. //
  189. // eg. even if "foo.txt" is a child of the desktop, it will still fail
  190. // but it will succeed for "C:\Documents and Settings\Username\Desktop\foo.txt"
  191. cpp_quote("#define STR_DONT_PARSE_RELATIVE L\"Don't Parse Relative\"")
  192. // passed to SHGetDesktopFolder()->ParseDisplayName() via IBindCtx::RegisterObjectParam()
  193. // to try translate from a full file system pidl to a alias to that pidl, if available.
  194. // * no interface support required on object param
  195. //
  196. // eg. if you pass the following path "C:\Documents and Settings\Username\Desktop\foo.txt"
  197. // if TRANSLATE is SET result is: [foo.txt] (the alias for the desktop being an empty pidl)
  198. // if TRANSLATE is NOT SET result is: [CLSID_MyComputer][c:\][Documents and Settings][Username][Desktop][foo.txt].
  199. cpp_quote("#define STR_PARSE_TRANSLATE_ALIASES L\"Parse Translate Aliases\"")
  200. interface IShellFolder;
  201. [
  202. helpstring("IShellFolder"),
  203. uuid(000214E6-0000-0000-C000-000000000046),
  204. object,
  205. pointer_default(unique)
  206. ]
  207. interface IShellFolder : IUnknown
  208. {
  209. HRESULT ParseDisplayName(
  210. [in] HWND hwnd,
  211. [in] LPBC pbc,
  212. [in, string] LPOLESTR pszDisplayName,
  213. [out] ULONG *pchEaten,
  214. [out] LPITEMIDLIST *ppidl,
  215. [in, out, unique] ULONG *pdwAttributes);
  216. HRESULT EnumObjects(
  217. [in] HWND hwnd,
  218. [in] SHCONTF grfFlags,
  219. [out] IEnumIDList **ppenumIDList);
  220. // returns an instance of a sub-folder which is specified by the IDList (pidl).
  221. HRESULT BindToObject(
  222. [in] LPCITEMIDLIST pidl,
  223. [in] LPBC pbc,
  224. [in] REFIID riid,
  225. [out, iid_is(riid)] void **ppv);
  226. HRESULT BindToStorage(
  227. [in] LPCITEMIDLIST pidl,
  228. [in] LPBC pbc,
  229. [in] REFIID riid,
  230. [out, iid_is(riid)] void **ppv);
  231. // compares two IDLists and returns the result. The shell
  232. // explorer always passes 0 as lParam, which indicates 'sort by name'.
  233. // It should return 0 (as CODE of the scode), if two id indicates the
  234. // same object; negative value if pidl1 should be placed before pidl2;
  235. // positive value if pidl2 should be placed before pidl1.
  236. HRESULT CompareIDs(
  237. [in] LPARAM lParam,
  238. [in] LPCITEMIDLIST pidl1,
  239. [in] LPCITEMIDLIST pidl2);
  240. // creates a view object of the folder itself. The view
  241. // object is a difference instance from the shell folder object.
  242. // 'hwndOwner' can be used as the owner window of its dialog box or
  243. // menu during the lifetime of the view object.
  244. // This member function should always create a new
  245. // instance which has only one reference count. The explorer may create
  246. // more than one instances of view object from one shell folder object
  247. // and treat them as separate instances.
  248. HRESULT CreateViewObject(
  249. [in] HWND hwndOwner,
  250. [in] REFIID riid,
  251. [out, iid_is(riid)] void **ppv);
  252. // returns the attributes of specified objects in that
  253. // folder. 'cidl' and 'apidl' specifies objects. 'apidl' contains only
  254. // simple IDLists. The explorer initializes *prgfInOut with a set of
  255. // flags to be evaluated. The shell folder may optimize the operation
  256. // by not returning unspecified flags.
  257. HRESULT GetAttributesOf(
  258. [in] UINT cidl,
  259. [in, size_is(cidl)] LPCITEMIDLIST * apidl,
  260. [in, out] SFGAOF * rgfInOut);
  261. // creates a UI object to be used for specified objects.
  262. // The shell explorer passes either IID_IDataObject (for transfer operation)
  263. // or IID_IContextMenu (for context menu operation) as riid.
  264. HRESULT GetUIObjectOf(
  265. [in] HWND hwndOwner,
  266. [in] UINT cidl,
  267. [in, size_is(cidl)] LPCITEMIDLIST * apidl,
  268. [in] REFIID riid,
  269. [in, out, unique] UINT * rgfReserved,
  270. [out, iid_is(riid)] void **ppv);
  271. // returns the display name of the specified object.
  272. // If the ID contains the display name (in the locale character set),
  273. // it returns the offset to the name. Otherwise, it returns a pointer
  274. // to the display name string (UNICODE), which is allocated by the
  275. // task allocator, or fills in a buffer.
  276. HRESULT GetDisplayNameOf(
  277. [in] LPCITEMIDLIST pidl,
  278. [in] SHGDNF uFlags,
  279. [out] STRRET *pName);
  280. // sets the display name of the specified object.
  281. // If it changes the ID as well, it returns the new ID which is
  282. // alocated by the task allocator.
  283. HRESULT SetNameOf(
  284. [in] HWND hwnd,
  285. [in] LPCITEMIDLIST pidl,
  286. [in, string] LPCOLESTR pszName,
  287. [in] SHGDNF uFlags,
  288. [out] LPITEMIDLIST *ppidlOut);
  289. };
  290. typedef IShellFolder * LPSHELLFOLDER;
  291. cpp_quote("#if (_WIN32_IE >= 0x0500)")
  292. typedef struct tagEXTRASEARCH
  293. {
  294. GUID guidSearch;
  295. WCHAR wszFriendlyName[80];
  296. WCHAR wszUrl[2084];
  297. }EXTRASEARCH, *LPEXTRASEARCH;
  298. typedef struct IEnumExtraSearch *LPENUMEXTRASEARCH;
  299. interface IShellFolder2; // forward
  300. [
  301. helpstring("IEnumExtraSearch"),
  302. uuid(0E700BE1-9DB6-11d1-A1CE-00C04FD75D13),
  303. object,
  304. pointer_default(unique)
  305. ]
  306. interface IEnumExtraSearch : IUnknown
  307. {
  308. HRESULT Next(
  309. [in] ULONG celt,
  310. [out, size_is(celt), length_is(*pceltFetched)] EXTRASEARCH *rgelt,
  311. [out] ULONG *pceltFetched);
  312. HRESULT Skip([in] ULONG celt);
  313. HRESULT Reset();
  314. HRESULT Clone([out] IEnumExtraSearch **ppenum);
  315. };
  316. // IShellFolder2::GetDefaultColumnState values
  317. typedef [v1_enum] enum {
  318. SHCOLSTATE_TYPE_STR = 0x00000001,
  319. SHCOLSTATE_TYPE_INT = 0x00000002,
  320. SHCOLSTATE_TYPE_DATE = 0x00000003,
  321. SHCOLSTATE_TYPEMASK = 0x0000000F,
  322. SHCOLSTATE_ONBYDEFAULT = 0x00000010, // should on by default in details view
  323. SHCOLSTATE_SLOW = 0x00000020, // will be slow to compute, do on a background thread
  324. SHCOLSTATE_EXTENDED = 0x00000040, // provided by a handler, not the folder
  325. SHCOLSTATE_SECONDARYUI = 0x00000080, // not displayed in context menu, but listed in the "More..." dialog
  326. SHCOLSTATE_HIDDEN = 0x00000100, // not displayed in the UI
  327. SHCOLSTATE_PREFER_VARCMP = 0x00000200, // VarCmp() (with folderness test) produces same result as CompareIDs()
  328. } SHCOLSTATE;
  329. typedef DWORD SHCOLSTATEF;
  330. typedef struct {
  331. GUID fmtid;
  332. DWORD pid;
  333. } SHCOLUMNID, *LPSHCOLUMNID;
  334. typedef const SHCOLUMNID* LPCSHCOLUMNID;
  335. [
  336. helpstring("IShellFolder2"),
  337. uuid(93F2F68C-1D1B-11d3-A30E-00C04F79ABD1),
  338. object,
  339. pointer_default(unique)
  340. ]
  341. interface IShellFolder2 : IShellFolder
  342. {
  343. // Returns the guid of the search that is to be invoked when user clicks
  344. // on the search toolbar button
  345. HRESULT GetDefaultSearchGUID([out] GUID *pguid);
  346. // gives an enumerator of the searches to be added to the search menu
  347. HRESULT EnumSearches([out] IEnumExtraSearch **ppenum);
  348. HRESULT GetDefaultColumn([in] DWORD dwRes, [out] ULONG *pSort, [out] ULONG *pDisplay);
  349. // return SHCOLSTATE_ values
  350. HRESULT GetDefaultColumnState([in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags);
  351. HRESULT GetDetailsEx([in] LPCITEMIDLIST pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
  352. HRESULT GetDetailsOf([in] LPCITEMIDLIST pidl, [in]UINT iColumn, [out] SHELLDETAILS *psd);
  353. HRESULT MapColumnToSCID([in] UINT iColumn, [in] SHCOLUMNID *pscid);
  354. };
  355. cpp_quote("#endif // _WIN32_IE >= 0x0500)")
  356. //--------------------------------------------------------------------------
  357. //
  358. // FOLDERSETTINGS
  359. //
  360. // FOLDERSETTINGS is a data structure that explorer passes from one folder
  361. // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
  362. // member to get the current settings and pass it to ISV::CreateViewWindow
  363. // to allow the next folder view 'inherit' it. These settings assumes a
  364. // particular UI (which the shell's folder view has), and shell extensions
  365. // may or may not use those settings.
  366. //
  367. //--------------------------------------------------------------------------
  368. typedef char * LPVIEWSETTINGS;
  369. // NB Bitfields.
  370. // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
  371. typedef [v1_enum] enum
  372. {
  373. FWF_AUTOARRANGE = 0x00000001,
  374. FWF_ABBREVIATEDNAMES = 0x00000002,
  375. FWF_SNAPTOGRID = 0x00000004,
  376. FWF_OWNERDATA = 0x00000008,
  377. FWF_BESTFITWINDOW = 0x00000010,
  378. FWF_DESKTOP = 0x00000020,
  379. FWF_SINGLESEL = 0x00000040,
  380. FWF_NOSUBFOLDERS = 0x00000080,
  381. FWF_TRANSPARENT = 0x00000100,
  382. FWF_NOCLIENTEDGE = 0x00000200,
  383. FWF_NOSCROLL = 0x00000400,
  384. FWF_ALIGNLEFT = 0x00000800,
  385. FWF_NOICONS = 0x00001000,
  386. FWF_SHOWSELALWAYS = 0x00002000,
  387. FWF_NOVISIBLE = 0X00004000,
  388. FWF_SINGLECLICKACTIVATE=0x00008000, // TEMPORARY -- NO UI FOR THIS
  389. FWF_NOWEBVIEW = 0x00010000,
  390. FWF_HIDEFILENAMES = 0x00020000,
  391. FWF_CHECKSELECT = 0x00040000,
  392. } FOLDERFLAGS;
  393. typedef [v1_enum] enum
  394. {
  395. FVM_FIRST = 1,
  396. FVM_ICON = 1,
  397. FVM_SMALLICON = 2,
  398. FVM_LIST = 3,
  399. FVM_DETAILS = 4,
  400. FVM_THUMBNAIL = 5,
  401. FVM_TILE = 6,
  402. FVM_THUMBSTRIP = 7,
  403. FVM_LAST = 7,
  404. } FOLDERVIEWMODE;
  405. typedef struct
  406. {
  407. UINT ViewMode; // View mode (FOLDERVIEWMODE values)
  408. UINT fFlags; // View options (FOLDERFLAGS bits)
  409. } FOLDERSETTINGS;
  410. typedef FOLDERSETTINGS *LPFOLDERSETTINGS;
  411. typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
  412. typedef FOLDERSETTINGS *PFOLDERSETTINGS;
  413. //==========================================================================
  414. //
  415. // Interface: IShellView
  416. //
  417. // IShellView::GetWindow(phwnd)
  418. //
  419. // Inherited from IOleWindow::GetWindow.
  420. //
  421. //
  422. // IShellView::ContextSensitiveHelp(fEnterMode)
  423. //
  424. // Inherited from IOleWindow::ContextSensitiveHelp.
  425. //
  426. //
  427. // IShellView::TranslateAccelerator(lpmsg)
  428. //
  429. // Similar to IOleInPlaceActiveObject::TranlateAccelerator. The explorer
  430. // calls this function BEFORE any other translation. Returning S_OK
  431. // indicates that the message was translated (eaten) and should not be
  432. // translated or dispatched by the explorer.
  433. //
  434. //
  435. // IShellView::EnableModeless(fEnable)
  436. // Similar to IOleInPlaceActiveObject::EnableModeless.
  437. //
  438. //
  439. // IShellView::UIActivate(uState)
  440. //
  441. // The explorer calls this member function whenever the activation
  442. // state of the view window is changed by a certain event that is
  443. // NOT caused by the shell view itself.
  444. //
  445. // SVUIA_DEACTIVATE will be passed when the explorer is about to
  446. // destroy the shell view window; the shell view is supposed to remove
  447. // all the extended UIs (typically merged menu and modeless popup windows).
  448. //
  449. // SVUIA_ACTIVATE_NOFOCUS will be passsed when the shell view is losing
  450. // the input focus or the shell view has been just created without the
  451. // input focus; the shell view is supposed to set menuitems appropriate
  452. // for non-focused state (no selection specific items should be added).
  453. //
  454. // SVUIA_ACTIVATE_FOCUS will be passed when the explorer has just
  455. // created the view window with the input focus; the shell view is
  456. // supposed to set menuitems appropriate for focused state.
  457. //
  458. // SVUIA_INPLACEACTIVATE(new) will be passed when the shell view is opened
  459. // within an ActiveX control, which is not a UI active. In this case,
  460. // the shell view should not merge menus or put toolbas. To be compatible
  461. // with Win95 client, we don't pass this value unless the view supports
  462. // IShellView2.
  463. //
  464. // The shell view should not change focus within this member function.
  465. // The shell view should not hook the WM_KILLFOCUS message to remerge
  466. // menuitems. However, the shell view typically hook the WM_SETFOCUS
  467. // message, and re-merge the menu after calling IShellBrowser::
  468. // OnViewWindowActivated.
  469. //
  470. // One of the ACTIVATE / INPLACEACTIVATE messages will be sent when
  471. // the view window becomes the currently displayed view. On Win95 systems,
  472. // this will happen immediately after the CreateViewWindow call. On IE4, Win98,
  473. // and NT5 systems this may happen when the view reports it is ready (if the
  474. // IShellView supports async creation). This can be used as a hint as to when
  475. // to make your view window visible. Note: the Win95/Win98/NT4 common dialogs
  476. // do not send either of these on creation.
  477. //
  478. //
  479. // IShellView::Refresh()
  480. //
  481. // The explorer calls this member when the view needs to refresh its
  482. // contents (such as when the user hits F5 key).
  483. //
  484. //
  485. // IShellView::CreateViewWindow
  486. //
  487. // This member creates the view window (right-pane of the explorer or the
  488. // client window of the folder window).
  489. //
  490. //
  491. // IShellView::DestroyViewWindow
  492. //
  493. // This member destroys the view window.
  494. //
  495. //
  496. // IShellView::GetCurrentInfo
  497. //
  498. // This member returns the folder settings.
  499. //
  500. //
  501. // IShellView::AddPropertySHeetPages
  502. //
  503. // The explorer calls this member when it is opening the option property
  504. // sheet. This allows the view to add additional pages to it.
  505. //
  506. //
  507. // IShellView::SaveViewState()
  508. //
  509. // The explorer calls this member when the shell view is supposed to
  510. // store its view settings. The shell view is supposed to get a view
  511. // stream by calling IShellBrowser::GetViewStateStream and store the
  512. // current view state into that stream.
  513. //
  514. //
  515. // IShellView::SelectItem(pidlItem, uFlags)
  516. //
  517. // The explorer calls this member to change the selection state of
  518. // item(s) within the shell view window. If pidlItem is NULL and uFlags
  519. // is SVSI_DESELECTOTHERS, all items should be deselected.
  520. //
  521. //-------------------------------------------------------------------------
  522. //
  523. // shellview select item flags
  524. //
  525. cpp_quote("#define SVSI_DESELECT 0x00000000")
  526. cpp_quote("#define SVSI_SELECT 0x00000001")
  527. cpp_quote("#define SVSI_EDIT 0x00000003 // includes select")
  528. cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
  529. cpp_quote("#define SVSI_ENSUREVISIBLE 0x00000008")
  530. cpp_quote("#define SVSI_FOCUSED 0x00000010")
  531. cpp_quote("#define SVSI_TRANSLATEPT 0x00000020")
  532. cpp_quote("#define SVSI_SELECTIONMARK 0x00000040")
  533. cpp_quote("#define SVSI_POSITIONITEM 0x00000080")
  534. cpp_quote("#define SVSI_CHECK 0x00000100")
  535. cpp_quote("#define SVSI_NOSTATECHANGE 0x80000000")
  536. typedef UINT SVSIF;
  537. //
  538. // shellview get item object flags
  539. //
  540. typedef [v1_enum] enum {
  541. SVGIO_BACKGROUND = 0x00000000,
  542. SVGIO_SELECTION = 0x00000001,
  543. SVGIO_ALLVIEW = 0x00000002,
  544. SVGIO_CHECKED = 0x00000003,
  545. SVGIO_TYPE_MASK = 0x0000000F,
  546. SVGIO_FLAG_VIEWORDER = 0x80000000,
  547. } SVGIO;
  548. //
  549. // uState values for IShellView::UIActivate
  550. //
  551. typedef [v1_enum] enum {
  552. SVUIA_DEACTIVATE = 0,
  553. SVUIA_ACTIVATE_NOFOCUS = 1,
  554. SVUIA_ACTIVATE_FOCUS = 2,
  555. SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
  556. } SVUIA_STATUS;
  557. // this is to handle name collisions
  558. cpp_quote("#ifdef _FIX_ENABLEMODELESS_CONFLICT")
  559. cpp_quote("#define EnableModeless EnableModelessSV")
  560. cpp_quote("#endif")
  561. //
  562. // this is so that all the implementations still get the function pointer.
  563. // and midl wont complain about the data type
  564. //
  565. cpp_quote("#ifdef _NEVER_")
  566. typedef LPARAM LPFNSVADDPROPSHEETPAGE;
  567. cpp_quote("#else //!_NEVER_")
  568. cpp_quote("#include <prsht.h>")
  569. cpp_quote("typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;")
  570. cpp_quote("#endif //_NEVER_")
  571. interface IShellBrowser;
  572. [
  573. helpstring("IShellView"),
  574. uuid(000214E3-0000-0000-C000-000000000046),
  575. object,
  576. pointer_default(unique)
  577. ]
  578. interface IShellView : IOleWindow
  579. {
  580. HRESULT TranslateAccelerator([in] MSG *pmsg);
  581. HRESULT EnableModeless([in] BOOL fEnable);
  582. HRESULT UIActivate([in] UINT uState);
  583. HRESULT Refresh();
  584. HRESULT CreateViewWindow(
  585. [in] IShellView *psvPrevious,
  586. [in] LPCFOLDERSETTINGS pfs,
  587. [in] IShellBrowser *psb,
  588. [out] RECT *prcView,
  589. [out] HWND *phWnd);
  590. HRESULT DestroyViewWindow();
  591. HRESULT GetCurrentInfo([out] LPFOLDERSETTINGS pfs);
  592. [local] HRESULT AddPropertySheetPages(
  593. [in] DWORD dwReserved,
  594. [in] LPFNSVADDPROPSHEETPAGE pfn,
  595. [in] LPARAM lparam);
  596. HRESULT SaveViewState();
  597. HRESULT SelectItem(
  598. [in] LPCITEMIDLIST pidlItem,
  599. [in] SVSIF uFlags);
  600. HRESULT GetItemObject(
  601. [in] UINT uItem,
  602. [in] REFIID riid,
  603. [out, iid_is(riid)] void **ppv);
  604. typedef IShellView *LPSHELLVIEW;
  605. };
  606. [
  607. helpstring("IShellView2"),
  608. uuid(88E39E80-3578-11CF-AE69-08002B2E1262),
  609. object,
  610. pointer_default(unique)
  611. ]
  612. interface IShellView2 : IShellView
  613. {
  614. typedef GUID SHELLVIEWID;
  615. cpp_quote("#define SV2GV_CURRENTVIEW ((UINT)-1)")
  616. cpp_quote("#define SV2GV_DEFAULTVIEW ((UINT)-2)")
  617. //
  618. // NOTE if the cbSize param is ever updated,")
  619. // then there will have to be custom [wire_marshal]")
  620. // implementation to support it")
  621. //
  622. cpp_quote("#include <pshpack8.h>")
  623. typedef struct _SV2CVW2_PARAMS
  624. {
  625. DWORD cbSize;
  626. IShellView *psvPrev;
  627. LPCFOLDERSETTINGS pfs;
  628. IShellBrowser *psbOwner;
  629. RECT *prcView;
  630. SHELLVIEWID const *pvid;
  631. HWND hwndView;
  632. } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
  633. cpp_quote("#include <poppack.h>") // Return to byte packing
  634. HRESULT GetView(
  635. [in, out] SHELLVIEWID* pvid,
  636. [in] ULONG uView);
  637. HRESULT CreateViewWindow2(
  638. [in] LPSV2CVW2_PARAMS lpParams);
  639. HRESULT HandleRename(
  640. [in] LPCITEMIDLIST pidlNew);
  641. HRESULT SelectAndPositionItem(
  642. [in] LPCITEMIDLIST pidlItem,
  643. [in] UINT uFlags,
  644. [in] POINT *ppt);
  645. };
  646. [
  647. helpstring("IFolderView"),
  648. uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
  649. object,
  650. pointer_default(unique)
  651. ]
  652. interface IFolderView : IUnknown
  653. {
  654. HRESULT GetCurrentViewMode([in, out] UINT *pViewMode);
  655. HRESULT SetCurrentViewMode([in] UINT ViewMode);
  656. HRESULT GetFolder([in] REFIID riid, [out, iid_is(riid)] void **ppv);
  657. HRESULT Item([in] int iItemIndex, [out] LPITEMIDLIST *ppidl);
  658. HRESULT ItemCount([in] UINT uFlags,[out] int *pcItems);
  659. HRESULT Items([in] UINT uFlags,[in] REFIID riid, [out, iid_is(riid)] void **ppv);
  660. HRESULT GetSelectionMarkedItem([out] int *piItem);
  661. HRESULT GetFocusedItem([out] int *piItem);
  662. HRESULT GetItemPosition([in] LPCITEMIDLIST pidl, [out] POINT* ppt);
  663. HRESULT GetSpacing([in, out, ptr] POINT* ppt);
  664. HRESULT GetDefaultSpacing([out] POINT* ppt);
  665. HRESULT GetAutoArrange();
  666. // like IShellView::SelectItem() by index
  667. HRESULT SelectItem([in] int iItem, [in] DWORD dwFlags);
  668. HRESULT SelectAndPositionItems([in] UINT cidl, [in, size_is(cidl)] LPCITEMIDLIST* apidl, [in, ptr, size_is(cidl)] POINT* apt, [in] DWORD dwFlags);
  669. };
  670. cpp_quote("#define SID_SFolderView IID_IFolderView // folder view, usuaally IFolderView")
  671. // this is to handle name collisions
  672. cpp_quote("#ifdef _FIX_ENABLEMODELESS_CONFLICT")
  673. cpp_quote("#undef EnableModeless ")
  674. cpp_quote("#endif")
  675. [
  676. helpstring("IFolderFilterSite"),
  677. uuid(C0A651F5-B48B-11d2-B5ED-006097C686F6), // IID_IFolderFilterSite
  678. object,
  679. pointer_default(unique)
  680. ]
  681. interface IFolderFilterSite : IUnknown
  682. {
  683. HRESULT SetFilter([in]IUnknown* punk);
  684. };
  685. [
  686. helpstring("IFolderFilter"),
  687. uuid(9CC22886-DC8E-11d2-B1D0-00C04F8EEB3E), // IID_IFolderFilter
  688. object,
  689. pointer_default(unique)
  690. ]
  691. interface IFolderFilter : IUnknown
  692. {
  693. HRESULT ShouldShow([in] IShellFolder* psf, [in] LPCITEMIDLIST pidlFolder, [in] LPCITEMIDLIST pidlItem);
  694. HRESULT GetEnumFlags([in] IShellFolder* psf, [in] LPCITEMIDLIST pidlFolder, [in] HWND *phwnd, [out] DWORD *pgrfFlags);
  695. };
  696. //--------------------------------------------------------------------------
  697. //
  698. // Interface: IShellBrowser
  699. //
  700. // IShellBrowser interface is the interface that is provided by the shell
  701. // explorer/folder frame window. When it creates the 'contents pane' of
  702. // a shell folder (which provides IShellFolder interface), it calls its
  703. // CreateViewObject member function to create an IShellView object. Then,
  704. // it calls its CreateViewWindow member to create the 'contents pane'
  705. // window. The pointer to the IShellBrowser interface is passed to
  706. // the IShellView object as a parameter to this CreateViewWindow member
  707. // function call.
  708. //
  709. // +--------------------------+ <-- Explorer window
  710. // | [] Explorer |
  711. // |--------------------------+ IShellBrowser
  712. // | File Edit View .. |
  713. // |--------------------------|
  714. // | | |
  715. // | | <-------- Content pane
  716. // | | |
  717. // | | | IShellView
  718. // | | |
  719. // | | |
  720. // +--------------------------+
  721. //
  722. //
  723. //
  724. // [Member functions]
  725. //
  726. //
  727. // IShellBrowser::GetWindow(phwnd)
  728. //
  729. // Inherited from IOleWindow::GetWindow.
  730. //
  731. //
  732. // IShellBrowser::ContextSensitiveHelp(fEnterMode)
  733. //
  734. // Inherited from IOleWindow::ContextSensitiveHelp.
  735. //
  736. //
  737. // IShellBrowser::InsertMenusSB(hmenuShared, lpMenuWidths)
  738. //
  739. // Similar to the IOleInPlaceFrame::InsertMenus. The explorer will put
  740. // 'File' and 'Edit' pulldown in the File menu group, 'View' and 'Tools'
  741. // in the Container menu group and 'Help' in the Window menu group. Each
  742. // pulldown menu will have a uniqu ID, FCIDM_MENU_FILE/EDIT/VIEW/TOOLS/HELP
  743. // The view is allowed to insert menuitems into those sub-menus by those
  744. // IDs must be between FCIDM_SHVIEWFIRST and FCIDM_SHVIEWLAST.
  745. //
  746. //
  747. // IShellBrowser::SetMenuSB(hmenuShared, holemenu, hwndActiveObject)
  748. //
  749. // Similar to the IOleInPlaceFrame::SetMenu. The explorer ignores the
  750. // holemenu parameter (reserved for future enhancement) and performs
  751. // menu-dispatch based on the menuitem IDs (see the description above).
  752. // It is important to note that the explorer will add different
  753. // set of menuitems depending on whether the view has a focus or not.
  754. // Therefore, it is very important to call ISB::OnViewWindowActivate
  755. // whenever the view window (or its children) gets the focus.
  756. //
  757. //
  758. // IShellBrowser::RemoveMenusSB(hmenuShared)
  759. //
  760. // Same as the IOleInPlaceFrame::RemoveMenus.
  761. //
  762. //
  763. // IShellBrowser::SetStatusTextSB(pszStatusText)
  764. //
  765. // Same as the IOleInPlaceFrame::SetStatusText. It is also possible to
  766. // send messages directly to the status window via SendControlMsg.
  767. //
  768. //
  769. // IShellBrowser::EnableModelessSB(fEnable)
  770. //
  771. // Same as the IOleInPlaceFrame::EnableModeless.
  772. //
  773. //
  774. // IShellBrowser::TranslateAcceleratorSB(lpmsg, wID)
  775. //
  776. // Same as the IOleInPlaceFrame::TranslateAccelerator, but will be
  777. // never called because we don't support EXEs (i.e., the explorer has
  778. // the message loop). This member function is defined here for possible
  779. // future enhancement.
  780. //
  781. //
  782. // IShellBrowser::BrowseObject(pidl, wFlags)")
  783. //
  784. // The view calls this member to let shell explorer browse to another")
  785. // folder. The pidl and wFlags specifies the folder to be browsed.")
  786. //
  787. // Following three flags specifies whether it creates another window or not.
  788. // SBSP_SAMEBROWSER -- Browse to another folder with the same window.
  789. // SBSP_NEWBROWSER -- Creates another window for the specified folder.
  790. // SBSP_DEFBROWSER -- Default behavior (respects the view option).
  791. //
  792. // Following three flags specifies open, explore, or default mode. These .
  793. // are ignored if SBSP_SAMEBROWSER or (SBSP_DEFBROWSER && (single window .
  794. // browser || explorer)). .
  795. // SBSP_OPENMODE -- Use a normal folder window
  796. // SBSP_EXPLOREMODE -- Use an explorer window
  797. // SBSP_DEFMODE -- Use the same as the current window
  798. //
  799. // Following three flags specifies the pidl.
  800. // SBSP_ABSOLUTE -- pidl is an absolute pidl (relative from desktop)
  801. // SBSP_RELATIVE -- pidl is relative from the current folder.
  802. // SBSP_PARENT -- Browse the parent folder (ignores the pidl)
  803. // SBSP_NAVIGATEBACK -- Navigate back (ignores the pidl)
  804. // SBSP_NAVIGATEFORWARD -- Navigate forward (ignores the pidl)
  805. //
  806. // Following two flags control history manipulation as result of navigate
  807. // SBSP_WRITENOHISTORY -- write no history (shell folder) entry
  808. // SBSP_NOAUTOSELECT -- suppress selection in history pane
  809. //
  810. // IShellBrowser::GetViewStateStream(grfMode, ppstm)
  811. //
  812. // The browser returns an IStream interface as the storage for view
  813. // specific state information.
  814. //
  815. // grfMode -- Specifies the read/write access (STGM_READ/WRITE/READWRITE)
  816. // ppstm -- Specifies the IStream *variable to be filled.
  817. //
  818. //
  819. // IShellBrowser::GetControlWindow(id, phwnd)
  820. //
  821. // The shell view may call this member function to get the window handle
  822. // of Explorer controls (toolbar or status winodw -- FCW_TOOLBAR or
  823. // FCW_STATUS).
  824. //
  825. //
  826. // IShellBrowser::SendControlMsg(id, uMsg, wParam, lParam, pret)
  827. //
  828. // The shell view calls this member function to send control messages to
  829. // one of Explorer controls (toolbar or status window -- FCW_TOOLBAR or
  830. // FCW_STATUS).
  831. //
  832. //
  833. // IShellBrowser::QueryActiveShellView(IShellView * ppshv)
  834. //
  835. // This member returns currently activated (displayed) shellview object.
  836. // A shellview never need to call this member function.
  837. //
  838. //
  839. // IShellBrowser::OnViewWindowActive(pshv)
  840. //
  841. // The shell view window calls this member function when the view window
  842. // (or one of its children) got the focus. It MUST call this member before
  843. // calling IShellBrowser::InsertMenus, because it will insert different
  844. // set of menu items depending on whether the view has the focus or not.
  845. //
  846. //
  847. // IShellBrowser::SetToolbarItems(lpButtons, nButtons, uFlags)
  848. //
  849. // The view calls this function to add toolbar items to the exporer's
  850. // toolbar. 'lpButtons' and 'nButtons' specifies the array of toolbar
  851. // items. 'uFlags' must be one of FCT_MERGE, FCT_CONFIGABLE, FCT_ADDTOEND.
  852. //
  853. //-------------------------------------------------------------------------
  854. //
  855. // Values for wFlags parameter of ISB::BrowseObject() member.
  856. //
  857. cpp_quote("#define SBSP_DEFBROWSER 0x0000")
  858. cpp_quote("#define SBSP_SAMEBROWSER 0x0001")
  859. cpp_quote("#define SBSP_NEWBROWSER 0x0002")
  860. cpp_quote("#define SBSP_DEFMODE 0x0000")
  861. cpp_quote("#define SBSP_OPENMODE 0x0010")
  862. cpp_quote("#define SBSP_EXPLOREMODE 0x0020")
  863. cpp_quote("#define SBSP_HELPMODE 0x0040 // IEUNIX : Help window uses this.")
  864. cpp_quote("#define SBSP_NOTRANSFERHIST 0x0080")
  865. cpp_quote("#define SBSP_ABSOLUTE 0x0000")
  866. cpp_quote("#define SBSP_RELATIVE 0x1000")
  867. cpp_quote("#define SBSP_PARENT 0x2000")
  868. cpp_quote("#define SBSP_NAVIGATEBACK 0x4000")
  869. cpp_quote("#define SBSP_NAVIGATEFORWARD 0x8000")
  870. cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE 0x10000")
  871. cpp_quote("#define SBSP_NOAUTOSELECT 0x04000000")
  872. cpp_quote("#define SBSP_WRITENOHISTORY 0x08000000")
  873. cpp_quote("#define SBSP_REDIRECT 0x40000000")
  874. cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
  875. //
  876. // Values for id parameter of ISB::GetWindow/SendControlMsg members.
  877. //
  878. // WARNING:
  879. // Any shell extensions which sends messages to those control windows
  880. // might not work in the future version of windows. If you really need
  881. // to send messages to them, (1) don't assume that those control window
  882. // always exist (i.e. GetControlWindow may fail) and (2) verify the window
  883. // class of the window before sending any messages.
  884. //
  885. cpp_quote("#define FCW_STATUS 0x0001")
  886. cpp_quote("#define FCW_TOOLBAR 0x0002")
  887. cpp_quote("#define FCW_TREE 0x0003")
  888. cpp_quote("#define FCW_VIEW 0x0004 //;internal") // ;internal
  889. cpp_quote("#define FCW_BROWSER 0x0005 //;internal") // ;internal
  890. cpp_quote("#define FCW_INTERNETBAR 0x0006")
  891. cpp_quote("#define FCW_MENUBAR 0x0007 //;internal") // ;internal
  892. cpp_quote("#define FCW_PROGRESS 0x0008")
  893. cpp_quote("#if (_WIN32_IE >= 0x0400) // ;internal") // ;internal
  894. cpp_quote("#define FCW_ADDRESSBAR 0x0009 // ;internal") // ;internal
  895. cpp_quote("#define FCW_TOOLBAND 0x000a // ;internal") // ;internal
  896. cpp_quote("#define FCW_LINKSBAR 0x000b // ;internal") // ;internal
  897. cpp_quote("#endif // ;internal") // ;internal
  898. //
  899. // Values for uFlags paremeter of ISB::SetToolbarItems member.
  900. //
  901. cpp_quote("#define FCT_MERGE 0x0001")
  902. cpp_quote("#define FCT_CONFIGABLE 0x0002")
  903. cpp_quote("#define FCT_ADDTOEND 0x0004")
  904. cpp_quote("#ifdef _NEVER_")
  905. typedef LPARAM LPTBBUTTONSB;
  906. cpp_quote("#else //!_NEVER_")
  907. cpp_quote("#include <commctrl.h>")
  908. cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
  909. cpp_quote("#endif //_NEVER_")
  910. [
  911. helpstring("IShellBrowser"),
  912. uuid(000214E2-0000-0000-C000-000000000046),
  913. object,
  914. pointer_default(unique)
  915. ]
  916. interface IShellBrowser : IOleWindow
  917. {
  918. // same as IOleInPlaceFrame
  919. HRESULT InsertMenusSB(
  920. [in] HMENU hmenuShared,
  921. [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
  922. HRESULT SetMenuSB(
  923. [in] HMENU hmenuShared,
  924. [in] HOLEMENU holemenuRes,
  925. [in] HWND hwndActiveObject);
  926. HRESULT RemoveMenusSB([in] HMENU hmenuShared);
  927. HRESULT SetStatusTextSB([in, unique] LPCOLESTR pszStatusText);
  928. HRESULT EnableModelessSB([in] BOOL fEnable);
  929. HRESULT TranslateAcceleratorSB([in] MSG *pmsg, [in] WORD wID);
  930. // IShellBrowser
  931. HRESULT BrowseObject(
  932. [in] LPCITEMIDLIST pidl,
  933. [in] UINT wFlags);
  934. HRESULT GetViewStateStream(
  935. [in] DWORD grfMode,
  936. [out] IStream **ppStrm);
  937. HRESULT GetControlWindow(
  938. [in] UINT id,
  939. [out] HWND * phwnd);
  940. [local] HRESULT SendControlMsg(
  941. [in] UINT id,
  942. [in] UINT uMsg,
  943. [in] WPARAM wParam,
  944. [in] LPARAM lParam,
  945. [in] LRESULT *pret);
  946. HRESULT QueryActiveShellView([out] IShellView **ppshv);
  947. HRESULT OnViewWindowActive([in] IShellView *pshv);
  948. [local] HRESULT SetToolbarItems(
  949. [in] LPTBBUTTONSB lpButtons,
  950. [in] UINT nButtons,
  951. [in] UINT uFlags);
  952. };
  953. typedef IShellBrowser * LPSHELLBROWSER;
  954. [
  955. helpstring("IProfferService"),
  956. uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0), // IID_IProfferService
  957. object,
  958. pointer_default(unique)
  959. ]
  960. interface IProfferService : IUnknown
  961. {
  962. HRESULT ProfferService([in]REFGUID rguidService, [in] IServiceProvider *psp, [out] DWORD *pdwCookie);
  963. HRESULT RevokeService([in]DWORD dwCookie);
  964. }
  965. cpp_quote("#define SID_SProfferService IID_IProfferService // nearest service that you can proffer to")
  966. typedef [v1_enum] enum
  967. {
  968. PUIFNF_DEFAULT = 0x00000000,
  969. PUIFNF_MNEMONIC = 0x00000001, // include mnemonic in display name
  970. } PROPERTYUI_NAME_FLAGS;
  971. typedef [v1_enum] enum
  972. {
  973. PUIF_DEFAULT = 0x00000000,
  974. PUIF_RIGHTALIGN = 0x00000001, // this property should be right alligned
  975. PUIF_NOLABELININFOTIP = 0x00000002, // this property should not display a label in the infotip
  976. } PROPERTYUI_FLAGS;
  977. typedef [v1_enum] enum
  978. {
  979. PUIFFDF_DEFAULT = 0x00000000,
  980. PUIFFDF_RIGHTTOLEFT = 0x00000001, // BIDI support, right to left caller
  981. PUIFFDF_SHORTFORMAT = 0x00000002, // short format version of string
  982. PUIFFDF_NOTIME = 0x00000004, // truncate time to days, not hours/mins/sec
  983. PUIFFDF_FRIENDLYDATE = 0x00000008, // "Today", "Yesterday", etc
  984. PUIFFDF_NOUNITS = 0x00000010, // don't do "KB", "MB", "KHz"
  985. } PROPERTYUI_FORMAT_FLAGS;
  986. [
  987. helpstring("IPropertyUI - helper for dealing with properties ala IPropertySetStorage"),
  988. uuid(757a7d9f-919a-4118-99d7-dbb208c8cc66),
  989. object,
  990. pointer_default(unique)
  991. ]
  992. interface IPropertyUI : IUnknown
  993. {
  994. HRESULT ParsePropertyName([in] LPCWSTR pszName, [out] FMTID *pfmtid, [out] PROPID *ppid, [in, out] ULONG *pchEaten);
  995. HRESULT GetCannonicalName([in] REFFMTID fmtid, [in] PROPID pid, [out, size_is(cchText)] LPWSTR pwszText, [in] DWORD cchText);
  996. HRESULT GetDisplayName([in] REFFMTID fmtid, [in] PROPID pid, [in] PROPERTYUI_NAME_FLAGS flags, [out, size_is(cchText)] LPWSTR pwszText, [in] DWORD cchText);
  997. HRESULT GetPropertyDescription([in] REFFMTID fmtid, [in] PROPID pid, [out, size_is(cchText)] LPWSTR pwszText, [in] DWORD cchText);
  998. HRESULT GetDefaultWidth([in] REFFMTID fmtid, [in] PROPID pid, [out] ULONG *pcxChars);
  999. HRESULT GetFlags([in] REFFMTID fmtid, [in] PROPID pid, [out] PROPERTYUI_FLAGS *pFlags);
  1000. HRESULT FormatForDisplay([in] REFFMTID fmtid, [in] PROPID pid, [in] const PROPVARIANT *pvar, [in] PROPERTYUI_FORMAT_FLAGS flags, [out, size_is(cchText)] LPWSTR pwszText, [in] DWORD cchText);
  1001. HRESULT GetHelpInfo([in] REFFMTID fmtid, [in] PROPID pid, [out, size_is(cch)] LPWSTR pwszHelpFile, [in] DWORD cch, [out] UINT *puHelpID);
  1002. };
  1003. cpp_quote("#if (_WIN32_IE >= 0x0500)")
  1004. // Folder Category Support
  1005. [
  1006. helpstring("ICategoryProvider - Provides a list of catagorizers registered on an IShellFolder"),
  1007. uuid(9af64809-5864-4c26-a720-c1f78c086ee3),
  1008. object,
  1009. pointer_default(unique)
  1010. ]
  1011. interface ICategoryProvider : IUnknown
  1012. {
  1013. [helpstring("Returns S_OK if the view should display this column in category selection UI, or S_FALSE to remove it.")]
  1014. HRESULT CanCategorizeOnSCID(SHCOLUMNID* pscid);
  1015. [helpstring("Returns either a GUID to create in CreateCategory, or a SHCOLUNNID that is used by the default categorizer. Return S_FALSE if you do not support a default group. GUID_NULL returned in pguid indicates to the client to use pscid as the default category.")]
  1016. HRESULT GetDefaultCategory(GUID* pguid, SHCOLUMNID* pscid);
  1017. [helpstring("Returns either a GUID that represents the categoizer to use for the specified SHCOLUMNID.")]
  1018. HRESULT GetCategoryForSCID(SHCOLUMNID* pscid, GUID* pguid);
  1019. [helpstring("Returns an IEnumGUID that has a list of GUIDs that represent categories.")]
  1020. HRESULT EnumCategories(IEnumGUID** penum);
  1021. [helpstring("Returns the name of the given category.")]
  1022. HRESULT GetCategoryName(GUID* pguid, LPWSTR pszName, UINT cch);
  1023. [helpstring("Creates the category.")]
  1024. HRESULT CreateCategory(GUID* pguid, REFIID riid, [iid_is(riid)]void** ppv);
  1025. }
  1026. typedef [v1_enum] enum
  1027. {
  1028. CATINFO_NORMAL = 0x00000000, // Apply default properties to this category
  1029. CATINFO_COLLAPSED = 0x00000001, // This category should appear collapsed. useful for the "None" category.
  1030. CATINFO_HIDDEN = 0x00000002, // This category should follow the "Hidden" files setting for being displayed
  1031. } CATEGORYINFO_FLAGS;
  1032. typedef [v1_enum] enum
  1033. {
  1034. CATSORT_DEFAULT = 0x00000000, // Default Sort order
  1035. CATSORT_NAME = 0x00000001, // Sort by name
  1036. } CATSORT_FLAGS;
  1037. typedef struct
  1038. {
  1039. CATEGORYINFO_FLAGS cif;
  1040. WCHAR wszName[260];
  1041. } CATEGORY_INFO;
  1042. [
  1043. helpstring("ICategorizer - Categorizes pidls"),
  1044. uuid(a3b14589-9174-49a8-89a3-06a1ae2b9ba7),
  1045. object,
  1046. pointer_default(unique)
  1047. ]
  1048. interface ICategorizer : IUnknown
  1049. {
  1050. [helpstring("Returns the description of this category that will be displayed in the UI")]
  1051. HRESULT GetDescription(LPWSTR pszDesc, UINT cch);
  1052. [helpstring("Returns a list of categories associated with a list of ID Lists. NOTE: -1 is an invalid Category ID, and they cannot be persisted")]
  1053. HRESULT GetCategory([in] UINT cidl,
  1054. [in, size_is(cidl)] LPCITEMIDLIST * apidl,
  1055. [in, out, size_is(cidl)] DWORD* rgCategoryIds);
  1056. [helpstring("Returns information about the category, such as default display and the text to display in the UI")]
  1057. HRESULT GetCategoryInfo(DWORD dwCategoryId, CATEGORY_INFO* pci);
  1058. [helpstring("Returns HRESULTFromShort. -1, 0, 1 indicate the comparison of the IDs. Used for sorting categories in the UI")]
  1059. HRESULT CompareCategory(CATSORT_FLAGS csfFlags, DWORD dwCategoryId1, DWORD dwCategoryId2);
  1060. };
  1061. cpp_quote("#endif // (_WIN32_IE >= 0x0500)")
  1062. cpp_quote("#ifdef UNICODE")
  1063. cpp_quote("#define IShellLink IShellLinkW")
  1064. cpp_quote("#else")
  1065. cpp_quote("#define IShellLink IShellLinkA")
  1066. cpp_quote("#endif")
  1067. // IShellLink::Resolve fFlags
  1068. typedef enum
  1069. {
  1070. SLR_NO_UI = 0x0001, // don't post any UI durring the resolve operation, not msgs are pumped
  1071. SLR_ANY_MATCH = 0x0002, // no longer used
  1072. SLR_UPDATE = 0x0004, // save the link back to it's file if the track made it dirty
  1073. SLR_NOUPDATE = 0x0008,
  1074. SLR_NOSEARCH = 0x0010, // don't execute the search heuristics
  1075. SLR_NOTRACK = 0x0020, // don't use NT5 object ID to track the link
  1076. SLR_NOLINKINFO = 0x0040, // don't use the net and volume relative info
  1077. SLR_INVOKE_MSI = 0x0080, // if we have a darwin link, then call msi to fault in the applicaion
  1078. SLR_NO_UI_WITH_MSG_PUMP = 0x0101, // SLR_NO_UI + requires an enable modeless site or HWND
  1079. } SLR_FLAGS;
  1080. // IShellLink::GetPath fFlags
  1081. typedef enum
  1082. {
  1083. SLGP_SHORTPATH = 0x0001,
  1084. SLGP_UNCPRIORITY = 0x0002,
  1085. SLGP_RAWPATH = 0x0004,
  1086. } SLGP_FLAGS;
  1087. [
  1088. uuid(000214EE-0000-0000-C000-000000000046),
  1089. object,
  1090. pointer_default(unique)
  1091. ]
  1092. interface IShellLinkA : IUnknown
  1093. {
  1094. HRESULT GetPath([out, size_is(cch)] LPSTR pszFile, [in] int cch, [in, out, ptr] WIN32_FIND_DATAA *pfd, [in] DWORD fFlags);
  1095. HRESULT GetIDList([out] LPITEMIDLIST * ppidl);
  1096. HRESULT SetIDList([in] LPCITEMIDLIST pidl);
  1097. HRESULT GetDescription([out, size_is(cch)] LPSTR pszName, [in] int cch);
  1098. HRESULT SetDescription([in] LPCSTR pszName);
  1099. HRESULT GetWorkingDirectory([out, size_is(cch)] LPSTR pszDir, [in] int cch);
  1100. HRESULT SetWorkingDirectory([in] LPCSTR pszDir);
  1101. HRESULT GetArguments([out, size_is(cch)] LPSTR pszArgs, [in] int cch);
  1102. HRESULT SetArguments([in] LPCSTR pszArgs);
  1103. HRESULT GetHotkey([out] WORD *pwHotkey);
  1104. HRESULT SetHotkey([in] WORD wHotkey);
  1105. HRESULT GetShowCmd([out] int *piShowCmd);
  1106. HRESULT SetShowCmd([in] int iShowCmd);
  1107. HRESULT GetIconLocation([out, size_is(cch)] LPSTR pszIconPath, [in] int cch, [out] int *piIcon);
  1108. HRESULT SetIconLocation([in] LPCSTR pszIconPath, [in] int iIcon);
  1109. HRESULT SetRelativePath([in] LPCSTR pszPathRel, [in] DWORD dwReserved);
  1110. HRESULT Resolve([in] HWND hwnd, [in] DWORD fFlags);
  1111. HRESULT SetPath([in] LPCSTR pszFile);
  1112. };
  1113. [
  1114. uuid(000214F9-0000-0000-C000-000000000046),
  1115. object,
  1116. pointer_default(unique)
  1117. ]
  1118. interface IShellLinkW : IUnknown
  1119. {
  1120. HRESULT GetPath([out, size_is(cch)] LPWSTR pszFile, [in] int cch, [in, out, ptr] WIN32_FIND_DATAW *pfd, [in] DWORD fFlags);
  1121. HRESULT GetIDList([out] LPITEMIDLIST * ppidl);
  1122. HRESULT SetIDList([in] LPCITEMIDLIST pidl);
  1123. HRESULT GetDescription([out, size_is(cch)] LPWSTR pszName, int cch);
  1124. HRESULT SetDescription([in] LPCWSTR pszName);
  1125. HRESULT GetWorkingDirectory([out, size_is(cch)] LPWSTR pszDir, int cch);
  1126. HRESULT SetWorkingDirectory([in] LPCWSTR pszDir);
  1127. HRESULT GetArguments([out, size_is(cch)] LPWSTR pszArgs, int cch);
  1128. HRESULT SetArguments([in] LPCWSTR pszArgs);
  1129. HRESULT GetHotkey([out] WORD *pwHotkey);
  1130. HRESULT SetHotkey([in] WORD wHotkey);
  1131. HRESULT GetShowCmd([out] int *piShowCmd);
  1132. HRESULT SetShowCmd([in] int iShowCmd);
  1133. HRESULT GetIconLocation([out, size_is(cch)] LPWSTR pszIconPath, [in] int cch, [out] int *piIcon);
  1134. HRESULT SetIconLocation([in] LPCWSTR pszIconPath, [in] int iIcon);
  1135. HRESULT SetRelativePath([in] LPCWSTR pszPathRel, [in] DWORD dwReserved);
  1136. HRESULT Resolve([in] HWND hwnd, [in] DWORD fFlags);
  1137. HRESULT SetPath([in] LPCWSTR pszFile);
  1138. };
  1139. [
  1140. object,
  1141. uuid(49ff1172-eadc-446d-9285-156453a6431c),
  1142. helpstring("IActionProgressDialog Interface"),
  1143. pointer_default(unique)
  1144. ]
  1145. interface IActionProgressDialog : IUnknown
  1146. {
  1147. [v1_enum] enum {
  1148. SPINITF_NORMAL = 0x00000000, // default normal progress behavior
  1149. SPINITF_MODAL = 0x00000001, // call punkSite->EnableModeless() or EnableWindow()
  1150. SPINITF_NOMINIMIZE = 0x00000008, // Do not have a minimize button in the caption bar.
  1151. };
  1152. typedef DWORD SPINITF;
  1153. HRESULT Initialize(
  1154. [in] SPINITF flags,
  1155. [in, string] LPCWSTR pszTitle,
  1156. [in, string] LPCWSTR pszCancel);
  1157. HRESULT Stop();
  1158. };
  1159. [
  1160. object,
  1161. uuid(C1FB73D0-EC3A-4ba2-B512-8CDB9187B6D1),
  1162. helpstring("HW Event Handler Interface"),
  1163. pointer_default(unique)
  1164. ]
  1165. interface IHWEventHandler : IUnknown
  1166. {
  1167. HRESULT Initialize([in, string] LPCWSTR pszParams);
  1168. HRESULT HandleEvent([in, string] LPCWSTR pszDeviceID,
  1169. [in, string] LPCWSTR pszAltDeviceID,
  1170. [in, string] LPCWSTR pszEventType);
  1171. HRESULT HandleEventWithContent([in, string] LPCWSTR pszDeviceID,
  1172. [in, string] LPCWSTR pszAltDeviceID,
  1173. [in, string] LPCWSTR pszEventType,
  1174. [in, string] LPCWSTR pszContentTypeHandler,
  1175. [in] IDataObject* pdataobject);
  1176. };
  1177. cpp_quote("#define ARCONTENT_AUTORUNINF 0x00000002") // That's the one we have today, and always had
  1178. cpp_quote("#define ARCONTENT_AUDIOCD 0x00000004") // Audio CD (not MP3 and the like, the stuff you buy at the store)
  1179. cpp_quote("#define ARCONTENT_DVDMOVIE 0x00000008") // DVD Movie (not MPEGs, the stuff you buy at the store)
  1180. cpp_quote("#define ARCONTENT_BLANKCD 0x00000010") // Blank CD-R/CD-RW
  1181. cpp_quote("#define ARCONTENT_BLANKDVD 0x00000020") // Blank DVD-R/DVD-RW
  1182. cpp_quote("#define ARCONTENT_UNKNOWNCONTENT 0x00000040") // Whatever files. Mean that it's formatted.
  1183. cpp_quote("#define ARCONTENT_AUTOPLAYPIX 0x00000080") // Whatever files. Mean that it's formatted.
  1184. cpp_quote("#define ARCONTENT_AUTOPLAYMUSIC 0x00000100") // Whatever files. Mean that it's formatted.
  1185. cpp_quote("#define ARCONTENT_AUTOPLAYVIDEO 0x00000200") // Whatever files. Mean that it's formatted.
  1186. [
  1187. object,
  1188. uuid(DDEFE873-6997-4e68-BE26-39B633ADBE12),
  1189. helpstring("HW Event Handler Interface"),
  1190. pointer_default(unique)
  1191. ]
  1192. interface IQueryCancelAutoPlay : IUnknown
  1193. {
  1194. HRESULT AllowAutoPlay([in, string]LPCWSTR pszPath, [in]DWORD dwContentType,
  1195. [in, string]LPCWSTR pszLabel, [in] DWORD dwSerialNumber);
  1196. };
  1197. [
  1198. object,
  1199. uuid(49ff1173-eadc-446d-9285-156453a6431c),
  1200. helpstring("IActionProgress Interface"),
  1201. pointer_default(unique)
  1202. ]
  1203. interface IActionProgress : IUnknown
  1204. {
  1205. [v1_enum] enum {
  1206. SPBEGINF_NORMAL = 0x00000000, // default normal progress behavior
  1207. SPBEGINF_AUTOTIME = 0x00000002, // automatically updates the "time remaining" text
  1208. SPBEGINF_NOPROGRESSBAR = 0x00000010, // Don't display the progress bar (SetProgress() wont be called)
  1209. SPBEGINF_MARQUEEPROGRESS = 0x00000020, // use marquee progress (comctl32 v6 required)
  1210. };
  1211. typedef DWORD SPBEGINF;
  1212. typedef [v1_enum] enum _SPACTION {
  1213. SPACTION_NONE = 0,
  1214. SPACTION_MOVING,
  1215. SPACTION_COPYING,
  1216. SPACTION_RECYCLING,
  1217. SPACTION_APPLYINGATTRIBS,
  1218. SPACTION_DOWNLOADING,
  1219. SPACTION_SEARCHING_INTERNET,
  1220. SPACTION_CALCULATING,
  1221. SPACTION_UPLOADING,
  1222. SPACTION_SEARCHING_FILES,
  1223. } SPACTION;
  1224. HRESULT Begin(
  1225. [in] SPACTION action,
  1226. [in] SPBEGINF flags);
  1227. HRESULT UpdateProgress(
  1228. [in] ULONGLONG ulCompleted,
  1229. [in] ULONGLONG ulTotal);
  1230. typedef [v1_enum] enum _SPTEXT
  1231. {
  1232. SPTEXT_ACTIONDESCRIPTION = 1,
  1233. SPTEXT_ACTIONDETAIL,
  1234. } SPTEXT;
  1235. HRESULT UpdateText(
  1236. [in] SPTEXT sptext,
  1237. [in, string] LPCWSTR pszText,
  1238. [in] BOOL fMayCompact);
  1239. HRESULT QueryCancel([out] BOOL * pfCancelled);
  1240. HRESULT ResetCancel();
  1241. HRESULT End();
  1242. };
  1243. // The IShellExtInit interface is used by the explorer to initialize shell
  1244. // extension objects. The explorer (1) calls CoCreateInstance (or equivalent)
  1245. // with the registered CLSID and IID_IShellExtInit, (2) calls its Initialize
  1246. // member, then (3) calls its QueryInterface to a particular interface (such
  1247. // as IContextMenu or IPropSheetExt and (4) performs the rest of operation.
  1248. //
  1249. // IShellExtInit::Initialize
  1250. //
  1251. // This member function is called when the explorer is initializing either
  1252. // context menu extension, property sheet extension or non-default drag-drop
  1253. // extension.
  1254. //
  1255. // Parameters: (context menu or property sheet extension)
  1256. // pidlFolder -- Specifies the parent folder
  1257. // lpdobj -- Spefifies the set of items selected in that folder.
  1258. // hkeyProgID -- Specifies the type of the focused item in the selection.
  1259. //
  1260. // Parameters: (non-default drag-and-drop extension)
  1261. // pidlFolder -- Specifies the target (destination) folder
  1262. // lpdobj -- Specifies the items that are dropped (see the description
  1263. // about shell's clipboard below for clipboard formats).
  1264. // hkeyProgID -- Specifies the folder type.
  1265. [
  1266. uuid(000214E8-0000-0000-C000-000000000046),
  1267. object,
  1268. local,
  1269. pointer_default(unique)
  1270. ]
  1271. interface IShellExtInit : IUnknown
  1272. {
  1273. HRESULT Initialize([in] LPCITEMIDLIST pidlFolder, [in] IDataObject *pdtobj, [in] HKEY hkeyProgID);
  1274. }
  1275. typedef IShellExtInit * LPSHELLEXTINIT;
  1276. // The explorer uses the IShellPropSheetExt to allow property sheet
  1277. // extensions or control panel extensions to add additional property
  1278. // sheet pages.
  1279. //
  1280. // IShellPropSheetExt::AddPages
  1281. //
  1282. // The explorer calls this member function when it finds a registered
  1283. // property sheet extension for a particular type of object. For each
  1284. // additional page, the extension creates a page object by calling
  1285. // CreatePropertySheetPage API and calls lpfnAddPage.
  1286. //
  1287. // Parameters:
  1288. // lpfnAddPage -- Specifies the callback function.
  1289. // lParam -- Specifies the opaque handle to be passed to the callback function.
  1290. //
  1291. //
  1292. // IShellPropSheetExt::ReplacePage
  1293. //
  1294. // The explorer never calls this member of property sheet extensions. The
  1295. // explorer calls this member of control panel extensions, so that they
  1296. // can replace some of default control panel pages (such as a page of
  1297. // mouse control panel).
  1298. //
  1299. // Parameters:
  1300. // uPageID -- Specifies the page to be replaced.
  1301. // lpfnReplace Specifies the callback function.
  1302. // lParam -- Specifies the opaque handle to be passed to the callback function.
  1303. //
  1304. [
  1305. uuid(000214E9-0000-0000-C000-000000000046),
  1306. object,
  1307. local,
  1308. pointer_default(unique)
  1309. ]
  1310. interface IShellPropSheetExt : IUnknown
  1311. {
  1312. HRESULT AddPages([in] LPFNSVADDPROPSHEETPAGE pfnAddPage, [in] LPARAM lParam);
  1313. enum
  1314. {
  1315. EXPPS_FILETYPES = 0x00000001,
  1316. };
  1317. typedef UINT EXPPS;
  1318. HRESULT ReplacePage([in] EXPPS uPageID, [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith, [in] LPARAM lParam);
  1319. }
  1320. typedef IShellPropSheetExt * LPSHELLPROPSHEETEXT;
  1321. [
  1322. helpstring("used to initialize an object on a remote computer (server)"),
  1323. uuid(000214FE-0000-0000-C000-000000000046),
  1324. object,
  1325. pointer_default(unique)
  1326. ]
  1327. interface IRemoteComputer : IUnknown
  1328. {
  1329. // function is called when the explorer is initializing or
  1330. // enumerating the name space extension. If failure is returned during
  1331. // enumeration, the extension won't appear for this computer. Otherwise,
  1332. // the extension will appear, and should target the given machine.
  1333. //
  1334. // pszMachine Specifies the name of the machine to target. (\\server)
  1335. // bEnumerationg test to see if this object should be enumerated
  1336. // on this server
  1337. HRESULT Initialize([in] LPCWSTR pszMachine, [in] BOOL bEnumerating);
  1338. };
  1339. [
  1340. uuid(7307055c-b24a-486b-9f25-163e597a28a9), object, pointer_default(unique)
  1341. ]
  1342. interface IQueryContinue : IUnknown
  1343. {
  1344. HRESULT QueryContinue(); // S_OK -> Continue, other
  1345. };
  1346. [
  1347. uuid(ba9711ba-5893-4787-a7e1-41277151550b), object, pointer_default(unique)
  1348. ]
  1349. interface IUserNotification : IUnknown
  1350. {
  1351. HRESULT SetBalloonInfo([in, string] LPCWSTR pszTitle, [in, string] LPCWSTR pszText, [in] DWORD dwInfoFlags);
  1352. // times in msec
  1353. HRESULT SetBalloonRetry([in] DWORD dwShowTime, [in] DWORD dwInterval, [in] UINT cRetryCount);
  1354. HRESULT SetIconInfo([in] HICON hIcon, [in, string] LPCWSTR pszToolTip);
  1355. HRESULT Show([in] IQueryContinue *pqc, [in] DWORD dwContinuePollInterval);
  1356. HRESULT PlaySound([in, string] LPCWSTR pszSoundName);
  1357. };
  1358. // interface for describing the limits placed on a name, used for validation
  1359. // parsing and translation.
  1360. [
  1361. uuid(1df0d7f1-b267-4d28-8b10-12e23202a5c4)
  1362. ]
  1363. interface IItemNameLimits : IUnknown
  1364. {
  1365. HRESULT GetValidCharacters([out] LPWSTR *ppwszValidChars, [out] LPWSTR *ppwszInvalidChars);
  1366. HRESULT GetMaxLength([in] LPCWSTR pszName, [out] int *piMaxNameLen);
  1367. };
  1368. // INetCrawler interface
  1369. //
  1370. // [Member functions]
  1371. //
  1372. // INetCrawler::Update
  1373. // Causes an enumeration of the local workgroup and subsequent addition
  1374. // of folder shortcut and printer objects. As is a blocking call
  1375. // which will potentially take a long time (seconds) it should be called
  1376. // on a seperate thread
  1377. cpp_quote("#define SNCF_REFRESHLIST 0x00000001 // refresh the list (eg. from F5 or opening a folder)")
  1378. [
  1379. helpstring("INetCrawler"),
  1380. uuid(49c929ee-a1b7-4c58-b539-e63be392b6f3),
  1381. object,
  1382. pointer_default(unique)
  1383. ]
  1384. interface INetCrawler : IUnknown
  1385. {
  1386. HRESULT Update([in] DWORD dwFlags);
  1387. }
  1388. cpp_quote("#if (_WIN32_IE >= 0x0400)")
  1389. // --- IExtractImage
  1390. // this interface is provided for objects to provide a thumbnail image.
  1391. // IExtractImage::GetLocation()
  1392. // Gets a path description of the image that is to be extracted. This is used to
  1393. // identify the image in the view so that multiple instances of the same image can reuse the
  1394. // original image. If *pdwFlags == IEIFLAG_ASYNC and the result is E_PENDING, then *pdwPriority
  1395. // is used to return the priority of the item, this is usually a measure of how long it will take
  1396. // to perform the extraction. *pdwFlags can return IEIFLAG_CACHE if the view should cache a copy
  1397. // of the image for future reference and faster access. This flag is used to tell the difference
  1398. // between file formats that cache a thumbnail image such as Flashpix or Office documents, and those
  1399. // that don't cache one.
  1400. // IExtractImage::Extract()
  1401. // Extract the thumbnail of the specified size. If GetLocation() returned the values indicating
  1402. // it is free-threaded and can be placed on a background thread. If the object
  1403. // supports IRunnableTask as well, then long extractions can be started and paused as appropriate.
  1404. // At this point it is asssumed the object is free-threaded.
  1405. // If dwRecClrDepth contains a recommended Colour depth
  1406. // If *phBmpthumbnail is non NULL, then it contains the destination bitmap that should be used.
  1407. cpp_quote("#define IEI_PRIORITY_MAX ITSAT_MAX_PRIORITY")
  1408. cpp_quote("#define IEI_PRIORITY_MIN ITSAT_MIN_PRIORITY")
  1409. cpp_quote("#define IEIT_PRIORITY_NORMAL ITSAT_DEFAULT_PRIORITY")
  1410. cpp_quote("#define IEIFLAG_ASYNC 0x0001 // ask the extractor if it supports ASYNC extract (free threaded)")
  1411. cpp_quote("#define IEIFLAG_CACHE 0x0002 // returned from the extractor if it does NOT cache the thumbnail")
  1412. cpp_quote("#define IEIFLAG_ASPECT 0x0004 // passed to the extractor to beg it to render to the aspect ratio of the supplied rect")
  1413. cpp_quote("#define IEIFLAG_OFFLINE 0x0008 // if the extractor shouldn't hit the net to get any content neede for the rendering")
  1414. cpp_quote("#define IEIFLAG_GLEAM 0x0010 // does the image have a gleam ? this will be returned if it does")
  1415. cpp_quote("#define IEIFLAG_SCREEN 0x0020 // render as if for the screen (this is exlusive with IEIFLAG_ASPECT )")
  1416. cpp_quote("#define IEIFLAG_ORIGSIZE 0x0040 // render to the approx size passed, but crop if neccessary")
  1417. cpp_quote("#define IEIFLAG_NOSTAMP 0x0080 // returned from the extractor if it does NOT want an icon stamp on the thumbnail")
  1418. cpp_quote("#define IEIFLAG_NOBORDER 0x0100 // returned from the extractor if it does NOT want an a border around the thumbnail")
  1419. cpp_quote("#define IEIFLAG_QUALITY 0x0200 // passed to the Extract method to indicate that a slower, higher quality image is desired, re-compute the thumbnail")
  1420. cpp_quote("#define IEIFLAG_REFRESH 0x0400 // returned from the extractor if it would like to have Refresh Thumbnail available")
  1421. [
  1422. helpstring("IExtractImage"),
  1423. uuid(BB2E617C-0920-11d1-9A0B-00C04FC2D6C1),
  1424. object,
  1425. pointer_default(unique)
  1426. ]
  1427. interface IExtractImage : IUnknown
  1428. {
  1429. HRESULT GetLocation([out, size_is(cch)] LPWSTR pszPathBuffer,
  1430. [in] DWORD cch,
  1431. [in, out, unique] DWORD *pdwPriority,
  1432. [in] const SIZE * prgSize,
  1433. [in] DWORD dwRecClrDepth,
  1434. [in, out] DWORD *pdwFlags);
  1435. HRESULT Extract([out] HBITMAP *phBmpThumbnail);
  1436. }
  1437. typedef IExtractImage * LPEXTRACTIMAGE;
  1438. cpp_quote("#endif")
  1439. cpp_quote("#if (_WIN32_IE >= 0x0500)")
  1440. // GetDateStamp : returns the date stamp associated with the image. If this image is already cached,
  1441. // then it is easy to find out if the image is out of date.
  1442. [
  1443. helpstring("IExtractImage2"),
  1444. uuid(953BB1EE-93B4-11d1-98A3-00C04FB687DA),
  1445. object,
  1446. pointer_default(unique)
  1447. ]
  1448. interface IExtractImage2 : IExtractImage
  1449. {
  1450. HRESULT GetDateStamp([out] FILETIME *pDateStamp);
  1451. }
  1452. typedef IExtractImage2 * LPEXTRACTIMAGE2;
  1453. cpp_quote("#endif")
  1454. //-------------------------------------------------------------------------
  1455. //
  1456. // IUserEventTimerCallback interface
  1457. //
  1458. //-------------------------------------------------------------------------
  1459. interface IUserEventTimerCallback;
  1460. [
  1461. helpstring("IUserEventTimerCallback "),
  1462. uuid(e9ead8e6-2a25-410e-9b58-a9fbef1dd1a2), // IID_IUserEventTimerCallback
  1463. object,
  1464. pointer_default(unique)
  1465. ]
  1466. interface IUserEventTimerCallback : IUnknown
  1467. {
  1468. HRESULT UserEventTimerProc(
  1469. [in] ULONG uUserEventTimerID,
  1470. [in] UINT uTimerElapse);
  1471. };
  1472. //-------------------------------------------------------------------------
  1473. //
  1474. // IUserEventTimer interface
  1475. //
  1476. // Timer to keep track of user presence at the machine
  1477. //
  1478. //-------------------------------------------------------------------------
  1479. interface IUserEventTimer;
  1480. [
  1481. helpstring("IUserEventTimer "),
  1482. uuid(0F504B94-6E42-42E6-99E0-E20FAFE52AB4), // IID_IUserEventTimer
  1483. object,
  1484. pointer_default(unique)
  1485. ]
  1486. interface IUserEventTimer : IUnknown
  1487. {
  1488. HRESULT SetUserEventTimer
  1489. (
  1490. [in] HWND hWnd,
  1491. [in] UINT uCallbackMessage,
  1492. [in] UINT uTimerElapse,
  1493. [in] IUserEventTimerCallback * pUserEventTimerCallback,
  1494. [in, out] ULONG * puUserEventTimerID
  1495. );
  1496. HRESULT KillUserEventTimer
  1497. (
  1498. [in] HWND hWnd,
  1499. [in] ULONG uUserEventTimerID
  1500. );
  1501. HRESULT GetUserEventTimerElapsed
  1502. (
  1503. [in] HWND hWnd,
  1504. [in] ULONG uUserEventTimerID,
  1505. [out] UINT * puTimerElapsed
  1506. );
  1507. HRESULT InitTimerTickInterval
  1508. (
  1509. [in] UINT uTimerTickIntervalMs
  1510. );
  1511. };
  1512. //-------------------------------------------------------------------------
  1513. //
  1514. // IDockingWindow interface
  1515. //
  1516. // An object (docking window) implements this interface so the site can
  1517. // communicate with it. An example of a docking window is a toolbar.
  1518. //
  1519. // [Member functions]
  1520. //
  1521. // IDockingWindow::ShowDW(fShow)
  1522. // Shows or hides the docking window.
  1523. //
  1524. // IDockingWindow::CloseDW(dwReserved)
  1525. // Closes the docking window. dwReserved must be 0.
  1526. //
  1527. // IDockingWindow::ResizeBorderDW(prcBorder, punkToolbarSite, fReserved)
  1528. // Resizes the docking window's border to *prcBorder. fReserved must
  1529. // be 0.
  1530. //
  1531. // IObjectWithSite::SetSite(punkSite)
  1532. // IDockingWindow usually paired with IObjectWithSite.
  1533. // Provides the IUnknown pointer of the site to the docking window.
  1534. //
  1535. //-------------------------------------------------------------------------
  1536. [
  1537. uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8),
  1538. object
  1539. ]
  1540. interface IDockingWindow : IOleWindow
  1541. {
  1542. HRESULT ShowDW([in] BOOL fShow);
  1543. HRESULT CloseDW([in] DWORD dwReserved);
  1544. HRESULT ResizeBorderDW([in] LPCRECT prcBorder, [in] IUnknown* punkToolbarSite, [in] BOOL fReserved);
  1545. };
  1546. //-------------------------------------------------------------------------
  1547. //
  1548. // IDeskBand interface
  1549. //
  1550. //
  1551. // [Member functions]
  1552. //
  1553. // IDeskBand::GetBandInfo(dwBandID, dwViewMode, pdbi)
  1554. // Returns info on the given band in *pdbi, according to the mask
  1555. // field in the DESKBANDINFO structure and the given viewmode.
  1556. //
  1557. //-------------------------------------------------------------------------
  1558. // Mask values for DESKBANDINFO
  1559. cpp_quote("#define DBIM_MINSIZE 0x0001")
  1560. cpp_quote("#define DBIM_MAXSIZE 0x0002")
  1561. cpp_quote("#define DBIM_INTEGRAL 0x0004")
  1562. cpp_quote("#define DBIM_ACTUAL 0x0008")
  1563. cpp_quote("#define DBIM_TITLE 0x0010")
  1564. cpp_quote("#define DBIM_MODEFLAGS 0x0020")
  1565. cpp_quote("#define DBIM_BKCOLOR 0x0040")
  1566. cpp_quote("#include <pshpack8.h>")
  1567. typedef struct {
  1568. DWORD dwMask;
  1569. POINTL ptMinSize;
  1570. POINTL ptMaxSize;
  1571. POINTL ptIntegral;
  1572. POINTL ptActual;
  1573. WCHAR wszTitle[256];
  1574. DWORD dwModeFlags;
  1575. COLORREF crBkgnd;
  1576. } DESKBANDINFO;
  1577. cpp_quote("#include <poppack.h>") // Return to byte packing
  1578. // DESKBANDINFO dwModeFlags values
  1579. cpp_quote("#define DBIMF_NORMAL 0x0000")
  1580. cpp_quote("#define DBIMF_FIXED 0x0001")
  1581. cpp_quote("#define DBIMF_FIXEDBMP 0x0004 // a fixed background bitmap (if supported)")
  1582. cpp_quote("#define DBIMF_VARIABLEHEIGHT 0x0008")
  1583. cpp_quote("#define DBIMF_UNDELETEABLE 0x0010")
  1584. cpp_quote("#define DBIMF_DEBOSSED 0x0020")
  1585. cpp_quote("#define DBIMF_BKCOLOR 0x0040")
  1586. cpp_quote("#define DBIMF_USECHEVRON 0x0080")
  1587. cpp_quote("#define DBIMF_BREAK 0x0100")
  1588. cpp_quote("#define DBIMF_ADDTOFRONT 0x0200")
  1589. cpp_quote("#define DBIMF_TOPALIGN 0x0400")
  1590. // GetBandInfo view mode values
  1591. cpp_quote("#define DBIF_VIEWMODE_NORMAL 0x0000")
  1592. cpp_quote("#define DBIF_VIEWMODE_VERTICAL 0x0001")
  1593. cpp_quote("#define DBIF_VIEWMODE_FLOATING 0x0002")
  1594. cpp_quote("#define DBIF_VIEWMODE_TRANSPARENT 0x0004")
  1595. // Command Target IDs
  1596. enum {
  1597. DBID_BANDINFOCHANGED = 0,
  1598. DBID_SHOWONLY = 1,
  1599. DBID_MAXIMIZEBAND = 2, // Maximize the specified band (VT_UI4 == dwID)
  1600. DBID_PUSHCHEVRON = 3,
  1601. DBID_DELAYINIT = 4, // Note: _bandsite_ calls _band_ with this code
  1602. DBID_FINISHINIT = 5, // Note: _bandsite_ calls _band_ with this code
  1603. DBID_SETWINDOWTHEME = 6, // Note: _bandsite_ calls _band_ with this code
  1604. DBID_PERMITAUTOHIDE = 7,
  1605. };
  1606. cpp_quote("#define DBPC_SELECTFIRST (DWORD)-1")
  1607. cpp_quote("#define DBPC_SELECTLAST (DWORD)-2")
  1608. cpp_quote("#define CGID_DeskBand IID_IDeskBand")
  1609. [
  1610. uuid(EB0FE172-1A3A-11D0-89B3-00A0C90A90AC),
  1611. object,
  1612. ]
  1613. interface IDeskBand : IDockingWindow
  1614. {
  1615. HRESULT GetBandInfo([in] DWORD dwBandID, [in] DWORD dwViewMode, [in, out] DESKBANDINFO* pdbi);
  1616. };
  1617. //-------------------------------------------------------------------------
  1618. //
  1619. // ITaskbarList interface
  1620. //
  1621. //
  1622. // [Member functions]
  1623. //
  1624. // ITaskbarList::HrInit()
  1625. // This function must be called first to validate use of other members.
  1626. //
  1627. // ITaskbarList::AddTab(hwnd)
  1628. // This function adds a tab for hwnd to the taskbar.
  1629. //
  1630. // ITaskbarList::DeleteTab(hwnd)
  1631. // This function deletes a tab for hwnd from the taskbar.
  1632. //
  1633. // ITaskbarList::ActivateTab(hwnd)
  1634. // This function activates the tab associated with hwnd on the taskbar.
  1635. //
  1636. // ITaskbarList::SetActivateAlt(hwnd)
  1637. // This function marks hwnd in the taskbar as the active tab
  1638. //
  1639. //-------------------------------------------------------------------------
  1640. [
  1641. uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
  1642. object,
  1643. ]
  1644. interface ITaskbarList : IUnknown
  1645. {
  1646. HRESULT HrInit();
  1647. HRESULT AddTab([in] HWND hwnd);
  1648. HRESULT DeleteTab([in] HWND hwnd);
  1649. HRESULT ActivateTab([in] HWND hwnd);
  1650. HRESULT SetActiveAlt([in] HWND hwnd);
  1651. };
  1652. [
  1653. uuid(602D4995-B13A-429b-A66E-1935E44F4317),
  1654. object,
  1655. ]
  1656. interface ITaskbarList2 : ITaskbarList
  1657. {
  1658. HRESULT MarkFullscreenWindow([in] HWND hwnd, [in] BOOL fFullscreen);
  1659. };
  1660. [
  1661. object,
  1662. uuid(3d73a659-e5d0-4d42-afc0-5121ba425c8d), // IID_ICDBurn
  1663. pointer_default(unique)
  1664. ]
  1665. interface ICDBurn : IUnknown
  1666. {
  1667. HRESULT GetRecorderDriveLetter([out, size_is(cch)] LPWSTR pszDrive, [in] UINT cch);
  1668. HRESULT Burn([in] HWND hwnd);
  1669. HRESULT HasRecordableDrive([out] BOOL *pfHasRecorder);
  1670. };
  1671. // Wizard Extension objects. These interfaces defined methods for extending
  1672. // Win32 wizard in a progromatic way.
  1673. // Range of ID's that extensions can used, these mustn't clash with
  1674. // the existing wizards dialog IDS. (That enables them to still
  1675. // do PropSheet_SetCurSelByID).
  1676. cpp_quote("#define IDD_WIZEXTN_FIRST 0x5000")
  1677. cpp_quote("#define IDD_WIZEXTN_LAST 0x5100")
  1678. // This site object is requested via a QueryService of the objects site,
  1679. // it allows the extension to navigate in/out out itself, eg. when the
  1680. // extension has shown all of its pages and wants to navigate to the
  1681. // next page it would call GetNextPage and select the specified HPAGE.
  1682. [
  1683. uuid(88960f5b-422f-4e7b-8013-73415381c3c3),
  1684. helpstring("Wizard Extension Site"),
  1685. local
  1686. ]
  1687. interface IWizardSite : IUnknown
  1688. {
  1689. HRESULT GetPreviousPage([out] HPROPSHEETPAGE *phpage);
  1690. HRESULT GetNextPage([out] HPROPSHEETPAGE *phpage);
  1691. HRESULT GetCancelledPage([out] HPROPSHEETPAGE *phpage);
  1692. };
  1693. // A wizard extension is implemented using this object, the extension will declare the
  1694. // pages that it supports using the AddPages method, and then when its host needs to navigate
  1695. // into the extenion it will do so via GetFirstPage and selecting that.
  1696. [
  1697. uuid(c02ea696-86cc-491e-9b23-74394a0444a8),
  1698. helpstring("Wizard Extension"),
  1699. local
  1700. ]
  1701. interface IWizardExtension : IUnknown
  1702. {
  1703. HRESULT AddPages([in, out] HPROPSHEETPAGE* aPages, [in] UINT cPages, [out] UINT *pnPagesAdded);
  1704. HRESULT GetFirstPage([out] HPROPSHEETPAGE *phpage);
  1705. HRESULT GetLastPage([out] HPROPSHEETPAGE *phpage);
  1706. };
  1707. // The Web Wizard is a HTML host for wizard pages, it allows you
  1708. // create a HTML wizard starting at the URL defined via SetInitialURL.
  1709. [
  1710. helpstring("Web Wizard Page Extension"),
  1711. uuid(0e6b3f66-98d1-48c0-a222-fbde74e2fbc5),
  1712. object,
  1713. pointer_default(unique)
  1714. ]
  1715. interface IWebWizardExtension : IWizardExtension
  1716. {
  1717. HRESULT SetInitialURL([in, string] LPCWSTR pszURL);
  1718. HRESULT SetErrorURL([in, string] LPCWSTR pszErrorURL);
  1719. };
  1720. cpp_quote("#define SID_WebWizardHost IID_IWebWizardExtension")
  1721. // flags for the host to control the publishing wizard
  1722. cpp_quote ("#define SHPWHF_NORECOMPRESS 0x00000001 // don't allow/prompt for recompress of streams")
  1723. cpp_quote ("#define SHPWHF_NONETPLACECREATE 0x00000002 // don't create a network place when transfer is complete")
  1724. cpp_quote ("#define SHPWHF_NOFILESELECTOR 0x00000004 // don't show the file selector")
  1725. cpp_quote ("#define SHPWHF_VALIDATEVIAWEBFOLDERS 0x00010000 // enable web folders to validate network places (ANP support)")
  1726. [
  1727. helpstring("Web Publishing Wizard"),
  1728. uuid(aa9198bb-ccec-472d-beed-19a4f6733f7a),
  1729. object,
  1730. pointer_default(unique)
  1731. ]
  1732. interface IPublishingWizard : IWizardExtension
  1733. {
  1734. HRESULT Initialize([in] IDataObject *pdo, [in] DWORD dwOptions, [in, string] LPCWSTR pszServiceProvider);
  1735. HRESULT GetTransferManifest([out] HRESULT *phrFromTransfer, [out] IXMLDOMDocument **pdocManifest);
  1736. }
  1737. // Object to host an IFolderView in a window. This is used to build check mark selection
  1738. // UI for files.
  1739. [
  1740. uuid(1ea58f02-d55a-411d-b09e-9e65ac21605b),
  1741. helpstring("Shell Folder Host"),
  1742. local,
  1743. ]
  1744. interface IFolderViewHost : IUnknown
  1745. {
  1746. HRESULT Initialize([in] HWND hwndParent, [in] IDataObject *pdo, [in] RECT *prc);
  1747. };
  1748. //
  1749. // Flags for IAutoCompleteDropDown::GetDropDownStatus
  1750. //
  1751. cpp_quote("#define ACDD_VISIBLE 0x0001")
  1752. [
  1753. uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
  1754. object,
  1755. pointer_default(unique)
  1756. ]
  1757. interface IAutoCompleteDropDown : IUnknown
  1758. {
  1759. HRESULT GetDropDownStatus([out] DWORD *pdwFlags, [out, string] LPWSTR *ppwszString);
  1760. HRESULT ResetEnumerator();
  1761. };
  1762. cpp_quote("#define PPW_LAUNCHEDBYUSER 0x00000001 // The wizard was launch explicitly by the user, not on demand by the key manager")
  1763. [
  1764. helpstring("Passport Wizard"),
  1765. uuid(a09db586-9180-41ac-9114-460a7f362b76),
  1766. object,
  1767. pointer_default(unique)
  1768. ]
  1769. interface IPassportWizard : IModalWindow
  1770. {
  1771. HRESULT SetOptions([in] DWORD dwOptions);
  1772. };
  1773. // the cd burning wizard extension sets return codes through a property bag
  1774. // to tell the main wizard whether it should stop or keep going
  1775. cpp_quote("#define PROPSTR_EXTENSIONCOMPLETIONSTATE L\"ExtensionCompletionState\"")
  1776. enum
  1777. {
  1778. CDBE_RET_DEFAULT = 0x00000000,
  1779. CDBE_RET_DONTRUNOTHEREXTS = 0x00000001,
  1780. CDBE_RET_STOPWIZARD = 0x00000002,
  1781. };
  1782. cpp_quote("#define SID_CDWizardHost IID_ICDBurnExt")
  1783. [
  1784. uuid(2271dcca-74fc-4414-8fb7-c56b05ace2d7),
  1785. helpstring("add-ons for cd burning"),
  1786. ]
  1787. interface ICDBurnExt : IUnknown
  1788. {
  1789. enum
  1790. {
  1791. CDBE_TYPE_MUSIC = 0x00000001,
  1792. CDBE_TYPE_DATA = 0x00000002,
  1793. CDBE_TYPE_ALL = 0xFFFFFFFF
  1794. };
  1795. HRESULT GetSupportedActionTypes([out] DWORD *pdwActions);
  1796. }
  1797. typedef void (*PFDVENUMREADYBALLBACK)(LPVOID pvData);
  1798. //
  1799. // interface for communication between the view and the Explorer band treeview control
  1800. //
  1801. [
  1802. uuid(70F55181-5FEA-4900-B6B8-7343CB0A348C),
  1803. helpstring("Private interface between CDefView and Explorer band"),
  1804. local
  1805. ]
  1806. interface IDVGetEnum : IUnknown
  1807. {
  1808. HRESULT SetEnumReadyCallback([in] PFDVENUMREADYBALLBACK pfn, [in] LPVOID pvData);
  1809. HRESULT CreateEnumIDListFromContents([in] LPCITEMIDLIST pidlFolder, [in] DWORD dwEnumFlags, [out] IEnumIDList **ppEnumIDList);
  1810. };
  1811. [
  1812. helpstring("Interface to allow items to be inserted in FolderItems"),
  1813. uuid(D2B57227-3D23-4b95-93C0-492BD454C356),
  1814. object,
  1815. local
  1816. ]
  1817. interface IInsertItem : IUnknown
  1818. {
  1819. HRESULT InsertItem([in] LPCITEMIDLIST pidl);
  1820. }
  1821. ///// IDeskBar
  1822. [
  1823. uuid(EB0FE173-1A3A-11D0-89B3-00A0C90A90AC),
  1824. object,
  1825. pointer_default(unique),
  1826. local
  1827. ]
  1828. interface IDeskBar : IOleWindow
  1829. {
  1830. HRESULT SetClient([in] IUnknown* punkClient);
  1831. HRESULT GetClient([out] IUnknown** ppunkClient);
  1832. HRESULT OnPosRectChangeDB([in] LPRECT prc);
  1833. };
  1834. //-------------------------------------------------------------------------
  1835. //
  1836. // IMenuBand interface
  1837. //
  1838. // This interface provides methods the menuband (CLSID_MenuBand)
  1839. // to receive pertinent messages.
  1840. //
  1841. // [Member functions]
  1842. //
  1843. // IMenuBand::IsMenuMessage(pmsg)
  1844. // A message pump calls this function to see if any messages need
  1845. // to be redirected to this object. If this returns S_OK, the
  1846. // message loop should not call TranslateMessage or DispatchMessage.
  1847. // If this returns E_FAIL, the menu has exited menu mode and is ready
  1848. // to be destroyed.
  1849. //
  1850. // IMenuBand::TranslateMenuMessage(pmsg, plRet)
  1851. // Offers the object an opportunity to translate messages. The
  1852. // parent window proc must call this method for every message (not
  1853. // the message pump). The message, wParam, and lParam should be
  1854. // delivered to this method in *pmsg. This method may change the
  1855. // values of pmsg->wParam or pmsg->lParam, in which case these changes
  1856. // should be forwarded on.
  1857. //
  1858. // This method is required because some modal message pumps (like the one
  1859. // in TrackPopupMenu) do not give an opportunity to call a custom
  1860. // TranslateAccelerator method like IInputObject::TranslateAcceleratorIO.
  1861. //
  1862. // TranslateMenuMessage returns S_OK if the message was handled and
  1863. // should be eaten. *plRet is not touched if this returns S_FALSE.
  1864. //
  1865. //
  1866. //-------------------------------------------------------------------------
  1867. [
  1868. uuid(568804CD-CBD7-11d0-9816-00C04FD91972),
  1869. object,
  1870. pointer_default(unique),
  1871. local
  1872. ]
  1873. interface IMenuBand : IUnknown
  1874. {
  1875. // CmdIDs for the IOleCommandTarget Group: CGID_MenuBandHandler (defined in shguidp.h)
  1876. enum {
  1877. MBHANDCID_PIDLSELECT = 0, // A PIDL from a menuband was selected
  1878. };
  1879. HRESULT IsMenuMessage([in] MSG * pmsg);
  1880. HRESULT TranslateMenuMessage([in,out] MSG * pmsg, [out] LRESULT * plRet);
  1881. };
  1882. [
  1883. object,
  1884. uuid(47c01f95-e185-412c-b5c5-4f27df965aea), // IID_IFolderBandPriv
  1885. pointer_default(unique)
  1886. ]
  1887. interface IFolderBandPriv : IUnknown
  1888. {
  1889. HRESULT SetCascade([in] BOOL f);
  1890. HRESULT SetAccelerators([in] BOOL f);
  1891. HRESULT SetNoIcons([in] BOOL f);
  1892. HRESULT SetNoText([in] BOOL f);
  1893. };
  1894. cpp_quote("#if _WIN32_IE >= 0x0400")
  1895. //-------------------------------------------------------------------------
  1896. //
  1897. // IBandSite interface
  1898. //
  1899. // This interface provides methods to get or set bandsite information.
  1900. //
  1901. // [Member functions]
  1902. //
  1903. // IBandSite::AddBand(punk)
  1904. // Add a band to the bandsite. Returns the band ID in ShortFromResult(hres).
  1905. //
  1906. // IBandSite::EnumBands(uBand, *pdwBandID)
  1907. // Enumerate the bands. If uBand is -1, pdwBandID is ignored and this
  1908. // method returns the count of bands in the bandsite. Call this method
  1909. // with uBand starting at 0 to begin enumerating. Returns S_OK and the
  1910. // band ID in *pdwBandID of the next band.
  1911. //
  1912. // IBandSite::QueryBand(dwBandID, ppstb, pdwState, pszName, cchName)
  1913. // Get info about a band.
  1914. //
  1915. // IBandSite::SetBandState(dwBandID, dwState)
  1916. // Set the band's state.
  1917. //
  1918. // IBandSite::RemoveBand(dwBandID)
  1919. // Remove the band.
  1920. //
  1921. // IBandSite::GetBandObject(dwBandID, riid, ppv)
  1922. // Get an object that support riid for the band.
  1923. //
  1924. // IBandSite::GetBandSiteInfo(pbsinfo)
  1925. // Get info about the bandsite.
  1926. //
  1927. // IBandSite::SetBandSiteInfo(pbsinfo)
  1928. // Set info about the bandsite.
  1929. //
  1930. //-------------------------------------------------------------------------
  1931. cpp_quote("#include <pshpack8.h>")
  1932. typedef struct tagBANDSITEINFO {
  1933. DWORD dwMask; // BSIM_* flags
  1934. DWORD dwState; // BSSF_* flags
  1935. DWORD dwStyle; // BSIS_* flags
  1936. } BANDSITEINFO;
  1937. cpp_quote("#include <poppack.h>") // Return to byte packing
  1938. // BSID_BANDREMOVED means removed *or* hidden ;Internal
  1939. enum {
  1940. BSID_BANDADDED,
  1941. BSID_BANDREMOVED,
  1942. };
  1943. // Field mask
  1944. cpp_quote("#define BSIM_STATE 0x00000001")
  1945. cpp_quote("#define BSIM_STYLE 0x00000002")
  1946. // State flags
  1947. cpp_quote("#define BSSF_VISIBLE 0x00000001")
  1948. cpp_quote("#define BSSF_NOTITLE 0x00000002")
  1949. cpp_quote("#define BSSF_UNDELETEABLE 0x00001000")
  1950. // Style flags
  1951. cpp_quote("#define BSIS_AUTOGRIPPER 0x00000000")
  1952. cpp_quote("#define BSIS_NOGRIPPER 0x00000001")
  1953. cpp_quote("#define BSIS_ALWAYSGRIPPER 0x00000002")
  1954. cpp_quote("#define BSIS_LEFTALIGN 0x00000004")
  1955. cpp_quote("#define BSIS_SINGLECLICK 0x00000008")
  1956. cpp_quote("#define BSIS_NOCONTEXTMENU 0x00000010")
  1957. cpp_quote("#define BSIS_NODROPTARGET 0x00000020")
  1958. cpp_quote("#define BSIS_NOCAPTION 0x00000040")
  1959. cpp_quote("#define BSIS_PREFERNOLINEBREAK 0x00000080")
  1960. cpp_quote("#define BSIS_LOCKED 0x00000100")
  1961. cpp_quote("#define SID_SBandSite IID_IBandSite")
  1962. cpp_quote("#define CGID_BandSite IID_IBandSite")
  1963. [
  1964. object,
  1965. uuid(4CF504B0-DE96-11D0-8B3F-00A0C911E8E5)
  1966. ]
  1967. interface IBandSite : IUnknown
  1968. {
  1969. HRESULT AddBand([in] IUnknown* punk);
  1970. HRESULT EnumBands([in] UINT uBand, [out] DWORD* pdwBandID);
  1971. HRESULT QueryBand([in] DWORD dwBandID, [out] IDeskBand** ppstb, [out] DWORD* pdwState, [out, size_is(cchName)] LPWSTR pszName, [in] int cchName);
  1972. HRESULT SetBandState([in] DWORD dwBandID, [in] DWORD dwMask, [in] DWORD dwState);
  1973. HRESULT RemoveBand([in] DWORD dwBandID);
  1974. HRESULT GetBandObject([in] DWORD dwBandID, [in] REFIID riid, [out, iid_is(riid)] void **ppv);
  1975. HRESULT SetBandSiteInfo([in] const BANDSITEINFO *pbsinfo);
  1976. HRESULT GetBandSiteInfo([in, out] BANDSITEINFO *pbsinfo);
  1977. };
  1978. cpp_quote("#endif // _WIN32_IE >= 0x0400")
  1979. [
  1980. uuid(d92995f8-cf5e-4a76-bf59-ead39ea2b97e),
  1981. helpstring("shell name space walking callback interface"),
  1982. ]
  1983. interface INamespaceWalkCB : IUnknown
  1984. {
  1985. HRESULT FoundItem([in] IShellFolder *psf, [in] LPCITEMIDLIST pidl);
  1986. HRESULT EnterFolder([in] IShellFolder *psf, [in] LPCITEMIDLIST pidl);
  1987. HRESULT LeaveFolder([in] IShellFolder *psf, [in] LPCITEMIDLIST pidl);
  1988. HRESULT InitializeProgressDialog([out, string] LPWSTR *ppszTitle, [out, string] LPWSTR *ppszCancel);
  1989. };
  1990. [
  1991. uuid(57ced8a7-3f4a-432c-9350-30f24483f74f),
  1992. helpstring("shell name space walk, used to expand data objects, views or recurse folders"),
  1993. ]
  1994. interface INamespaceWalk : IUnknown
  1995. {
  1996. enum
  1997. {
  1998. NSWF_NONE_IMPLIES_ALL = 0x00000001,
  1999. NSWF_ONE_IMPLIES_ALL = 0x00000002,
  2000. NSWF_DONT_TRAVERSE_LINKS = 0x00000004,
  2001. NSWF_DONT_ACCUMULATE_RESULT = 0x00000008,
  2002. NSWF_TRAVERSE_STREAM_JUNCTIONS = 0x00000010,
  2003. NSWF_FILESYSTEM_ONLY = 0x00000020,
  2004. NSWF_SHOW_PROGRESS = 0x00000040,
  2005. NSWF_FLAG_VIEWORDER = 0x00000080,
  2006. NSWF_IGNORE_AUTOPLAY_HIDA = 0x00000100,
  2007. };
  2008. // punkToWalk can be an IShellView site, IShellFolder or IDataObject
  2009. HRESULT Walk([in] IUnknown *punkToWalk, [in] DWORD dwFlags, [in] int cDepth, [in] INamespaceWalkCB *pnswcb);
  2010. HRESULT GetIDArrayResult([out] UINT *pcItems, [out, size_is(sizeof(LPITEMIDLIST *)), length_is(*pcItems)] LPITEMIDLIST **pppidl);
  2011. };
  2012. [
  2013. uuid(A9521922-0812-4d44-9EC3-7FD38C726F3D),
  2014. helpstring("callback objects for CRegTreeOptions items"),
  2015. local
  2016. ]
  2017. interface IRegTreeItem : IUnknown
  2018. {
  2019. HRESULT GetCheckState([out] BOOL *pbCheck);
  2020. HRESULT SetCheckState([in] BOOL bCheck);
  2021. };
  2022. //-------------------------------------------------------------------------
  2023. //
  2024. // IMenuPopup interface
  2025. //
  2026. // This interface provides methods to navigate thru a menu.
  2027. //
  2028. // [Member functions]
  2029. //
  2030. // IMenuPopup::Popup(ppt, prcExclude, dwFlags)
  2031. // Invoke the menu, located at the point *ppt (in screen coordinates).
  2032. // The optional prcExclude points to the rectangle to exclude when
  2033. // positioning the menu, otherwise it should be NULL. dwFlags may be:
  2034. //
  2035. // MDBPU_SETFOCUS: the menu can take the focus.
  2036. //
  2037. // Returns S_OK if the object implements the popup menu as a modeless
  2038. // menu. Otherwise it returns S_FALSE, and the menu is finished.
  2039. //
  2040. // IMenuPopup::OnSelect(dwSelectType)
  2041. // This method handles selection notifications.
  2042. //
  2043. // IMenuPopup::SetSubMenu(pmp, fSet)
  2044. // Sets the given menu bar interface to be the submenu of this
  2045. // object's interface. Set fSet == FALSE to remove the submenu.
  2046. //
  2047. //-------------------------------------------------------------------------
  2048. // Type values for IMenuPopup::OnSelect
  2049. enum
  2050. {
  2051. MPOS_EXECUTE = 0, // Execute the selected menu item
  2052. MPOS_FULLCANCEL, // Cancel the entire menu
  2053. MPOS_CANCELLEVEL, // Cancel the current cascaded menu
  2054. MPOS_SELECTLEFT, // select one to the left of the cur selection
  2055. MPOS_SELECTRIGHT, // select one to the right of the cur selection
  2056. MPOS_CHILDTRACKING // the child got a tracking select (mouse moved over)
  2057. };
  2058. // Flags for IMenuPopup::Popup
  2059. enum
  2060. {
  2061. MPPF_SETFOCUS = 0x00000001, // Menu can take the focus
  2062. MPPF_INITIALSELECT = 0x00000002, // Select the first item
  2063. MPPF_NOANIMATE = 0x00000004, // Do not animate this show
  2064. MPPF_KEYBOARD = 0x00000010, // The menu is activated by keyboard
  2065. MPPF_REPOSITION = 0x00000020, // Resposition the displayed bar.
  2066. MPPF_FORCEZORDER = 0x00000040, // internal: Tells menubar to ignore Submenu positions
  2067. MPPF_FINALSELECT = 0x00000080, // Select the last item
  2068. MPPF_TOP = 0x20000000, // Popup menu up from point
  2069. MPPF_LEFT = 0x40000000, // Popup menu left from point
  2070. MPPF_RIGHT = 0x60000000, // Popup menu right from point
  2071. MPPF_BOTTOM = 0x80000000, // Popup menu below point
  2072. MPPF_POS_MASK = 0xE0000000 // Menu Position Mask
  2073. };
  2074. [
  2075. uuid(D1E7AFEB-6A2E-11d0-8C78-00C04FD918B4),
  2076. object,
  2077. pointer_default(unique),
  2078. local
  2079. ]
  2080. interface IMenuPopup : IDeskBar
  2081. {
  2082. HRESULT Popup([in] POINTL *ppt, [in] RECTL *prcExclude, DWORD dwFlags);
  2083. HRESULT OnSelect(DWORD dwSelectType);
  2084. HRESULT SetSubMenu([in] IMenuPopup* pmp, BOOL fSet);
  2085. };
  2086. // BindHandler GUIDs for IShellItem::BindToHandler (defined in shlguid.h)")
  2087. // BHID_SFObject restricts usage to IShellFolder::BindToObject()")
  2088. // BHID_SFUIObject restricts usage to IShellFolder::GetUIObjectOf()")
  2089. // BHID_SFViewObject restricts usage to IShellFolder::CreateViewObject()")
  2090. // BHID_LocalCopyHelper creates and initializes CLSID_LocalCopyHelper")
  2091. // BHID_LinkTargetItem CLSID_ShellItem initialized with the target this item (SFGAO_LINK only)")
  2092. // BHID_Storage attempts to get the stg/stm riid from BTO, but defaults to shell implementations on failure")
  2093. [
  2094. helpstring("Shell Namespace helper"),
  2095. uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
  2096. object,
  2097. pointer_default(unique)
  2098. ]
  2099. interface IShellItem : IUnknown
  2100. {
  2101. HRESULT BindToHandler(
  2102. [in] IBindCtx *pbc,
  2103. [in] REFGUID rbhid,
  2104. [in] REFIID riid,
  2105. [out, iid_is(riid)] void **ppvOut);
  2106. HRESULT GetParent([out] IShellItem **ppsi);
  2107. typedef [v1_enum] enum
  2108. {
  2109. SIGDN_NORMALDISPLAY = 0x00000000,
  2110. SIGDN_PARENTRELATIVEPARSING = 0x80018001,
  2111. SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8001c001,
  2112. SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000,
  2113. SIGDN_PARENTRELATIVEEDITING = 0x80031001,
  2114. SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000,
  2115. SIGDN_FILESYSPATH = 0x80058000,
  2116. SIGDN_URL = 0x80068000,
  2117. } SIGDN;
  2118. HRESULT GetDisplayName(
  2119. [in] SIGDN sigdnName,
  2120. [out, string] LPOLESTR *ppszName);
  2121. HRESULT GetAttributes(
  2122. [in] SFGAOF sfgaoMask,
  2123. [out] SFGAOF *psfgaoAttribs);
  2124. // SICHINT_DISPLAY iOrder based on display in a folder view
  2125. // SICHINT_ALLFIELDS exact instance compare
  2126. // SICHINT_CANONICAL iOrder based on canonical name (better performance)
  2127. [v1_enum] enum
  2128. {
  2129. SICHINT_DISPLAY = 0x00000000,
  2130. SICHINT_ALLFIELDS = 0x80000000,
  2131. SICHINT_CANONICAL = 0x10000000,
  2132. };
  2133. typedef DWORD SICHINTF;
  2134. HRESULT Compare(
  2135. [in] IShellItem *psi,
  2136. [in] SICHINTF hint,
  2137. [out] int *piOrder);
  2138. };
  2139. // image recompression object, given the cx, cy and a quality that we need go through the steps
  2140. // of creating a stream that we can give to somebody containing an image that size. if the
  2141. // image is < that size then return S_FALSE.
  2142. [
  2143. uuid(505f1513-6b3e-4892-a272-59f8889a4d3e),
  2144. helpstring("Image Recompression Object"),
  2145. pointer_default(unique),
  2146. object
  2147. ]
  2148. interface IImageRecompress : IUnknown
  2149. {
  2150. HRESULT RecompressImage(IShellItem *psi, int cx, int cy, int iQuality, IStorage *pstg, IStream **ppstrmOut);
  2151. }
  2152. [
  2153. helpstring("IDefViewSafety"),
  2154. uuid(9A93B3FB-4E75-4c74-871A-2CDA667F39A5),
  2155. object,
  2156. pointer_default(unique)
  2157. ]
  2158. interface IDefViewSafety : IUnknown
  2159. {
  2160. HRESULT IsSafePage();
  2161. };
  2162. [
  2163. uuid(0811AEBE-0B87-4C54-9E72-548CF649016B),
  2164. object,
  2165. pointer_default(unique)
  2166. ]
  2167. interface IContextMenuSite : IUnknown
  2168. {
  2169. HRESULT DoContextMenuPopup([in] IUnknown* punkContextMenu, [in] UINT fFlags, [in] POINT pt);
  2170. };
  2171. [
  2172. helpstring("Modal Window"),
  2173. uuid(b4db1657-70d7-485e-8e3e-6fcb5a5c1802),
  2174. object,
  2175. pointer_default(unique)
  2176. ]
  2177. interface IModalWindow : IUnknown
  2178. {
  2179. HRESULT Show([in] HWND hwndParent);
  2180. };
  2181. //
  2182. // Delegate Item IDs are in a partially known format so the delegate (inner) and
  2183. // delgating (outer) folders share the pidl contents. the inner folder allocates
  2184. // its pidls using the IMalloc provided by the outer folder via SetItemAlloc()
  2185. // that pidl must conform to the delegate item format.
  2186. //
  2187. cpp_quote("#include <pshpack1.h>")
  2188. typedef struct tagDELEGATEITEMID
  2189. {
  2190. WORD cbSize; // size of entire item ID (points to the NULL or next item)
  2191. WORD wOuter; // Private data owned by the outer folder
  2192. WORD cbInner; // Size of delegate's data
  2193. BYTE rgb[1]; // Inner folder's data (opaque to outer folder)
  2194. // followed by outer folder's data.
  2195. } DELEGATEITEMID;
  2196. cpp_quote("#include <poppack.h>")
  2197. cpp_quote("typedef const UNALIGNED DELEGATEITEMID *PCDELEGATEITEMID;")
  2198. cpp_quote("typedef UNALIGNED DELEGATEITEMID *PDELEGATEITEMID;")
  2199. [
  2200. helpstring("shell name space delegate folder interface"),
  2201. uuid(ADD8BA80-002B-11D0-8F0F-00C04FD7D062),
  2202. object,
  2203. pointer_default(unique)
  2204. ]
  2205. interface IDelegateFolder : IUnknown
  2206. {
  2207. // use to give the delegate folder the IMalloc interface that it
  2208. // needs to use to alloc and free item IDs.
  2209. // These IDs are in the form of DELEGATEITEMIDs
  2210. // and it is the delegates job to pack its data into the pidl
  2211. // in the delegate format
  2212. HRESULT SetItemAlloc([in] IMalloc *pmalloc);
  2213. };
  2214. cpp_quote("// INTERFACE: IBrowserFrameOptions")
  2215. cpp_quote("//")
  2216. cpp_quote("// This interface was implemented so a browser or host can ask a ShellView/ShelNameSpace what")
  2217. cpp_quote("// kind of 'Behavior' is appropriate for that view.")
  2218. cpp_quote("//")
  2219. cpp_quote("// IBrowserFrameOptions::GetBrowserOptions()")
  2220. cpp_quote("// dwMask is the logical OR of bits to look for. pdwOptions is not optional and")
  2221. cpp_quote("// it's return value will always equal or will be a subset of dwMask.")
  2222. cpp_quote("// If the function succeeds, the return value must be S_OK and pdwOptions needs to be filled in.")
  2223. cpp_quote("// If the function fails, pdwOptions needs to be filled in with BFO_NONE.")
  2224. cpp_quote("//")
  2225. [
  2226. uuid(10DF43C8-1DBE-11d3-8B34-006097DF5BD4),
  2227. object,
  2228. local
  2229. ]
  2230. interface IBrowserFrameOptions : IUnknown
  2231. {
  2232. typedef [unique] IBrowserFrameOptions * LPBROWSERFRAMEOPTIONS;
  2233. enum
  2234. {
  2235. BFO_NONE = 0x00000000, // Do nothing.
  2236. BFO_BROWSER_PERSIST_SETTINGS = 0x00000001, // Does this item want the browser stream? (Same window position as IE browser windows?)
  2237. BFO_RENAME_FOLDER_OPTIONS_TOINTERNET = 0x00000002, // Rename "Folder Options" to "Internet Options" in the Tools or View menu?
  2238. BFO_BOTH_OPTIONS = 0x00000004, // Keep both "Folder Options" and "Internet Options" in the Tools or View menu?
  2239. BIF_PREFER_INTERNET_SHORTCUT = 0x00000008, // NSE would prefer a .url shortcut over a .lnk shortcut
  2240. BFO_BROWSE_NO_IN_NEW_PROCESS = 0x00000010, // Specify this flag if you don't want the "Browse in New Process" via invoking a shortcut.
  2241. BFO_ENABLE_HYPERLINK_TRACKING = 0x00000020, // Does this NSE want it's display name tracked to determine when hyperlinks should be tagged as previously used?
  2242. BFO_USE_IE_OFFLINE_SUPPORT = 0x00000040, // Use "Internet Explorer"'s offline support?
  2243. BFO_SUBSTITUE_INTERNET_START_PAGE = 0x00000080, // Does this NSE want to use the Start Page support?
  2244. BFO_USE_IE_LOGOBANDING = 0x00000100, // Use the Brand block in the Toolbar. (Spinning globe or whatever it is this year)
  2245. BFO_ADD_IE_TOCAPTIONBAR = 0x00000200, // Should " - Internet Explorer" be appended to display name in the Captionbar
  2246. BFO_USE_DIALUP_REF = 0x00000400, // Should the DialUp ref count get a ref while the browse is navigated to this location? This will also enable the ICW and Software update.
  2247. BFO_USE_IE_TOOLBAR = 0x00000800, // Should the IE toolbar be used?
  2248. BFO_NO_PARENT_FOLDER_SUPPORT = 0x00001000, // Can you NOT navigate to a parent folder? Used for Backspace button to parent folder or the View.GoTo.ParentFolder feature.
  2249. BFO_NO_REOPEN_NEXT_RESTART = 0x00002000, // Browser windows are NOT reopened the next time the shell boots if the windows were left open on the previous logoff. Does this NSE want the same feature?
  2250. BFO_GO_HOME_PAGE = 0x00004000, // Add "Home Page" to menu (Go).
  2251. BFO_PREFER_IEPROCESS = 0x00008000, // prefers to use IEXPLORE.EXE over EXPLORER.EXE
  2252. BFO_SHOW_NAVIGATION_CANCELLED = 0x00010000, // If navigation is aborted, show the "Action Cancelled" HTML page.
  2253. BFO_QUERY_ALL = 0xFFFFFFFF, // Return all values set.
  2254. };
  2255. typedef DWORD BROWSERFRAMEOPTIONS;
  2256. HRESULT GetFrameOptions([in] BROWSERFRAMEOPTIONS dwMask, [out] BROWSERFRAMEOPTIONS * pdwOptions);
  2257. }
  2258. cpp_quote("#include <pshpack8.h>")
  2259. typedef struct tagSMDATA
  2260. {
  2261. DWORD dwMask; // SMDM_* values
  2262. DWORD dwFlags; // Not used
  2263. HMENU hmenu; // Static HMENU portion.
  2264. HWND hwnd; // HWND owning the HMENU
  2265. UINT uId; // Id of the item in the menu (-1 for menu itself)
  2266. UINT uIdParent; // Id of the item spawning this menu
  2267. UINT uIdAncestor; // Id of the very top item in the chain of ShellFolders
  2268. IUnknown* punk; // IUnkown of the menuband
  2269. LPITEMIDLIST pidlFolder; // pidl of the ShellFolder portion
  2270. LPITEMIDLIST pidlItem; // pidl of the item in the ShellFolder portion
  2271. IShellFolder* psf; // IShellFolder for the shell folder portion
  2272. void* pvUserData; // User defined Data associated with a pane.
  2273. } SMDATA, *LPSMDATA;
  2274. cpp_quote("// Mask")
  2275. cpp_quote("#define SMDM_SHELLFOLDER 0x00000001 // This is for an item in the band")
  2276. cpp_quote("#define SMDM_HMENU 0x00000002 // This is for the Band itself")
  2277. cpp_quote("#define SMDM_TOOLBAR 0x00000004 // Plain toolbar, not associated with a shell folder or hmenu")
  2278. cpp_quote("// Flags (bitmask)")
  2279. typedef struct tagSMINFO
  2280. {
  2281. DWORD dwMask; // SMIM_*
  2282. DWORD dwType; // SMIT_*
  2283. DWORD dwFlags; // SMIF_*
  2284. int iIcon;
  2285. } SMINFO, * PSMINFO;
  2286. typedef struct tagSHCSCHANGENOTIFYSTRUCT
  2287. {
  2288. LONG lEvent; // Change notify Event
  2289. LPCITEMIDLIST pidl1; // Pidl 1 Passed in from the Change notify
  2290. LPCITEMIDLIST pidl2; // Pidl 2 Passed in from the Change notify
  2291. } SMCSHCHANGENOTIFYSTRUCT, *PSMCSHCHANGENOTIFYSTRUCT;
  2292. cpp_quote("#include <poppack.h>") /* Return to byte packing */
  2293. // Mask flags
  2294. enum
  2295. {
  2296. SMIM_TYPE = 0x00000001,
  2297. SMIM_FLAGS = 0x00000002,
  2298. SMIM_ICON = 0x00000004
  2299. };
  2300. // Types for mbiinfo.dwType
  2301. enum
  2302. {
  2303. SMIT_SEPARATOR = 0x00000001,
  2304. SMIT_STRING = 0x00000002
  2305. };
  2306. // Flags for mbiinfo.dwFlags
  2307. enum
  2308. {
  2309. SMIF_ICON = 0x00000001, // Show an icon
  2310. SMIF_ACCELERATOR = 0x00000002, // Underline the character marked w/ '&'
  2311. SMIF_DROPTARGET = 0x00000004, // Item is a drop target
  2312. SMIF_SUBMENU = 0x00000008, // Item has a submenu
  2313. SMIF_CHECKED = 0x00000020, // Item has a Checkmark
  2314. SMIF_DROPCASCADE = 0x00000040, // Item can cascade out during drag/drop
  2315. SMIF_HIDDEN = 0x00000080, // Don't display item
  2316. SMIF_DISABLED = 0x00000100, // Should be unselectable. Gray.
  2317. SMIF_TRACKPOPUP = 0x00000200, // Should be unselectable. Gray.
  2318. SMIF_DEMOTED = 0x00000400, // Display item in "Demoted" state.
  2319. SMIF_ALTSTATE = 0x00000800, // Displayed in "Altered State"
  2320. SMIF_DRAGNDROP = 0x00001000, // If item that is being dragged hovers over an item for long enough then it SMC_EXECs that item
  2321. SMIF_NEW = 0x00002000, // Item is newly-installed or otherwise attractive (XP)
  2322. };
  2323. cpp_quote("#define SMC_INITMENU 0x00000001 // The callback is called to init a menuband")
  2324. cpp_quote("#define SMC_CREATE 0x00000002")
  2325. cpp_quote("#define SMC_EXITMENU 0x00000003 // The callback is called when menu is collapsing")
  2326. cpp_quote("#define SMC_GETINFO 0x00000005 // The callback is called to return DWORD values")
  2327. cpp_quote("#define SMC_GETSFINFO 0x00000006 // The callback is called to return DWORD values")
  2328. cpp_quote("#define SMC_GETOBJECT 0x00000007 // The callback is called to get some object")
  2329. cpp_quote("#define SMC_GETSFOBJECT 0x00000008 // The callback is called to get some object")
  2330. cpp_quote("#define SMC_SFEXEC 0x00000009 // The callback is called to execute an shell folder item")
  2331. cpp_quote("#define SMC_SFSELECTITEM 0x0000000A // The callback is called when an item is selected")
  2332. cpp_quote("#define SMC_REFRESH 0x00000010 // Menus have completely refreshed. Reset your state.")
  2333. cpp_quote("#define SMC_DEMOTE 0x00000011 // Demote an item")
  2334. cpp_quote("#define SMC_PROMOTE 0x00000012 // Promote an item, wParam = SMINV_* flag")
  2335. cpp_quote("#define SMC_DEFAULTICON 0x00000016 // Returns Default icon location in wParam, index in lParam")
  2336. cpp_quote("#define SMC_NEWITEM 0x00000017 // Notifies item is not in the order stream.")
  2337. cpp_quote("#define SMC_CHEVRONEXPAND 0x00000019 // Notifies of a expansion via the chevron")
  2338. cpp_quote("#define SMC_DISPLAYCHEVRONTIP 0x0000002A // S_OK display, S_FALSE not.")
  2339. cpp_quote("#define SMC_SETSFOBJECT 0x0000002D // Called to save the passed object")
  2340. cpp_quote("#define SMC_SHCHANGENOTIFY 0x0000002E // Called when a Change notify is received. lParam points to SMCSHCHANGENOTIFYSTRUCT")
  2341. cpp_quote("#define SMC_CHEVRONGETTIP 0x0000002F // Called to get the chevron tip text. wParam = Tip title, Lparam = TipText Both MAX_PATH")
  2342. cpp_quote("#define SMC_SFDDRESTRICTED 0x00000030 // Called requesting if it's ok to drop. wParam = IDropTarget.")
  2343. [
  2344. uuid(4CA300A1-9B8D-11d1-8B22-00C04FD918D0),
  2345. object,
  2346. pointer_default(unique),
  2347. local // cannot marshal because method has polymorphic parameters
  2348. ]
  2349. interface IShellMenuCallback : IUnknown
  2350. {
  2351. // psmd is [in,out] because SMC_MAPACCELERATOR returns a value in uId
  2352. HRESULT CallbackSM([in,out] LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  2353. };
  2354. //-------------------------------------------------------------------------
  2355. //
  2356. // IShellMenu interface
  2357. //
  2358. //-------------------------------------------------------------------------
  2359. cpp_quote("#define SMINIT_DEFAULT 0x00000000 // No Options")
  2360. cpp_quote("#define SMINIT_RESTRICT_DRAGDROP 0x00000002 // Don't allow Drag and Drop")
  2361. cpp_quote("#define SMINIT_TOPLEVEL 0x00000004 // This is the top band.")
  2362. cpp_quote("#define SMINIT_CACHED 0x00000010")
  2363. // These are mutually Exclusive
  2364. cpp_quote("#define SMINIT_VERTICAL 0x10000000 // This is a vertical menu")
  2365. cpp_quote("#define SMINIT_HORIZONTAL 0x20000000 // This is a horizontal menu (does not inherit)")
  2366. cpp_quote("#define ANCESTORDEFAULT (UINT)-1")
  2367. cpp_quote("#define SMSET_TOP 0x10000000 // Bias this namespace to the top of the menu")
  2368. cpp_quote("#define SMSET_BOTTOM 0x20000000 // Bias this namespace to the bottom of the menu")
  2369. cpp_quote("#define SMSET_DONTOWN 0x00000001 // The Menuband doesn't own the non-ref counted object")
  2370. // and should not destroy it.
  2371. cpp_quote("#define SMINV_REFRESH 0x00000001")
  2372. cpp_quote("#define SMINV_ID 0x00000008")
  2373. [
  2374. uuid(EE1F7637-E138-11d1-8379-00C04FD918D0),
  2375. object,
  2376. pointer_default(unique), /* some of our pointers can be NULL (as noted) */
  2377. local
  2378. ]
  2379. interface IShellMenu : IUnknown
  2380. {
  2381. HRESULT Initialize([in] IShellMenuCallback* psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags);
  2382. HRESULT GetMenuInfo([out] IShellMenuCallback** ppsmc, [out] UINT* puId, [out] UINT* puIdAncestor, [out] DWORD* pdwFlags);
  2383. HRESULT SetShellFolder(IShellFolder* psf, [in] LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags);
  2384. HRESULT GetShellFolder([out] DWORD* pdwFlags, [out] LPITEMIDLIST* ppidl, [in] REFIID riid, [out, iid_is(riid)] void** ppv);
  2385. HRESULT SetMenu([in] HMENU hmenu, [in] HWND hwnd, DWORD dwFlags);
  2386. HRESULT GetMenu([out /* can be null */] HMENU* phmenu, [out /* can be null */] HWND* phwnd, [out /* can be null */] DWORD* pdwFlags);
  2387. HRESULT InvalidateItem([in /* can be null */] LPSMDATA psmd, DWORD dwFlags);
  2388. HRESULT GetState([out] LPSMDATA psmd);
  2389. HRESULT SetMenuToolbar([in] IUnknown* punk, DWORD dwFlags);
  2390. };
  2391. //
  2392. // NOTE - this typelib is never registered anywhere
  2393. // objects that want their typelibs to be registered
  2394. // in shell32 should add their coclass to shldisp.idl
  2395. //
  2396. [
  2397. uuid(50a7e9b1-70ef-11d1-b75a-00a0c90564fe), // LIBID_ShellObjects
  2398. helpstring("Microsoft Shell Objects"),
  2399. lcid(0x0000),
  2400. version(1.0)
  2401. ]
  2402. library ShellObjects
  2403. {
  2404. // CLSID_QueryCancelAutoPlay
  2405. [ uuid(331F1768-05A9-4ddd-B86E-DAE34DDC998A) ] coclass QueryCancelAutoPlay { interface IQueryCancelAutoPlay; }
  2406. // CLSID_DriveSizeCategorizer
  2407. [ uuid(94357B53-CA29-4b78-83AE-E8FE7409134F) ] coclass DriveSizeCategorizer { interface ICategorizer; }
  2408. // CLSID_DriveTypeCategorizer
  2409. [ uuid(B0A8F3CF-4333-4bab-8873-1CCB1CADA48B) ] coclass DriveTypeCategorizer { interface ICategorizer; }
  2410. // CLSID_FreeSpaceCategorizer
  2411. [ uuid(B5607793-24AC-44c7-82E2-831726AA6CB7) ] coclass FreeSpaceCategorizer { interface ICategorizer; }
  2412. // CLSID_TimeCategorizer
  2413. [ uuid(3bb4118f-ddfd-4d30-a348-9fb5d6bf1afe) ] coclass TimeCategorizer { interface ICategorizer; }
  2414. // CLSID_SizeCategorizer
  2415. [ uuid(55d7b852-f6d1-42f2-aa75-8728a1b2d264) ] coclass SizeCategorizer { interface ICategorizer; }
  2416. // CLSID_AlphabeticalCategorizer
  2417. [ uuid(3c2654c6-7372-4f6b-b310-55d6128f49d2) ] coclass AlphabeticalCategorizer { interface ICategorizer; }
  2418. // CLSID_MergedCategorizer
  2419. [ uuid(8e827c11-33e7-4bc1-b242-8cd9a1c2b304) ] coclass MergedCategorizer { interface ICategorizer; }
  2420. // CLSID_ImageProperties
  2421. [ uuid(7ab770c7-0e23-4d7a-8aa2-19bfad479829) ] coclass ImageProperties { interface IPersistFile; }
  2422. // CLSID_ImageProperties
  2423. [ uuid(d912f8cf-0396-4915-884e-fb425d32943b) ] coclass PropertiesUI { interface IPropertyUI; }
  2424. // CLSID_UserNotification
  2425. [ uuid(0010890e-8789-413c-adbc-48f5b511b3af) ] coclass UserNotification { interface IUserNotification; }
  2426. // CLSID_UserEventTimerCallback
  2427. [ uuid(15fffd13-5140-41b8-b89a-c8d5759cd2b2) ] coclass UserEventTimerCallback { interface IUserEventTimerCallback; }
  2428. // CLSID_UserEventTimer
  2429. [ uuid(864A1288-354C-4D19-9D68-C2742BB14997) ] coclass UserEventTimer { interface IUserEventTimer; }
  2430. // CLSID_NetCrawler
  2431. [ uuid(601ac3dc-786a-4eb0-bf40-ee3521e70bfb) ] coclass NetCrawler { interface INetCrawler; }
  2432. // CLSID_CDBurn
  2433. [ uuid(fbeb8a05-beee-4442-804e-409d6c4515e9) ] coclass CDBurn { interface ICDBurn; }
  2434. // CLSID_TaskbarList
  2435. [ uuid(56FDF344-FD6D-11d0-958A-006097C9A090) ] coclass TaskbarList { interface ITaskbarList; }
  2436. // For supporting HTML wizard extensions we provide this object, it implements the IWizardExtenion
  2437. // and allows the site to specific via an IPropertyBag an URL which should be displayed. The property
  2438. // bag is requested from the SID_WebWizardHost, and it used inturn to return parameter information
  2439. // back to the site (eg. any information that the displayed HTML would like to communicate).
  2440. // CLSID_WebWizardHost
  2441. [ uuid(c827f149-55c1-4d28-935e-57e47caed973) ] coclass WebWizardHost { interface IWebWizardExtension; }
  2442. // CLSID_PublishDropTarget
  2443. [ uuid(CC6EEFFB-43F6-46c5-9619-51D571967F7D) ] coclass PublishDropTarget { interface IDropTarget; }
  2444. // CLSID_PublishingWizard
  2445. [ uuid(6b33163c-76a5-4b6c-bf21-45de9cd503a1) ] coclass PublishingWizard { interface IPublishingWizard; }
  2446. cpp_quote("#define SID_PublishingWizard CLSID_PublishingWizard")
  2447. // CLSID_InternetPrintOrdering
  2448. [ uuid(add36aa8-751a-4579-a266-d66f5202ccbb) ] coclass InternetPrintOrdering { interface IDropTarget; }
  2449. // CLSID_FolderViewHost
  2450. [ uuid(20b1cb23-6968-4eb9-b7d4-a66d00d07cee) ] coclass FolderViewHost { interface IFolderViewHost; }
  2451. // CLSID_NamespaceWalker
  2452. [ uuid(72eb61e0-8672-4303-9175-f2e4c68b2e7c) ] coclass NamespaceWalker { interface INamespaceWalk; }
  2453. // CLSID_ImageRecompress
  2454. [ uuid(6e33091c-d2f8-4740-b55e-2e11d1477a2c) ] coclass ImageRecompress { interface IImageRecompress; }
  2455. // CLSID_TrayBandSiteService
  2456. [ uuid(F60AD0A0-E5E1-45cb-B51A-E15B9F8B2934) ] coclass TrayBandSiteService { interface IBandSite; }
  2457. // CLSID_PassportWizard
  2458. [ uuid(58f1f272-9240-4f51-b6d4-fd63d1618591) ] coclass PassportWizard { interface IPassportWizard; }
  2459. };
  2460. cpp_quote("#endif // !__shobjidlp_h__ ;internal") // ;internal