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.

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