Source code of Windows XP (NT5)
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.

2370 lines
92 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7. import "objidl.idl";
  8. import "shtypes.idl";
  9. import "shobjidl.idl";
  10. import "unknwn.idl";
  11. import "wtypes.idl";
  12. import "prsht.idl";
  13. import "msxml.idl";
  14. //
  15. // Forward Declarations
  16. //
  17. interface IDispatch;
  18. cpp_quote("#include <pshpack8.h>")
  19. cpp_quote("#include <poppack.h>") /* Return to byte packing */
  20. [
  21. helpstring("Interface to Customize Icons For Shell Objects"),
  22. uuid(7E23D323-36D6-4eb2-A654-387832868EA3),
  23. object,
  24. ]
  25. interface ICustomIconManager : IUnknown
  26. {
  27. HRESULT SetIcon([in, string] LPCWSTR pszIconPath, [in] int iIcon);
  28. HRESULT GetIcon([out, size_is(cch)] LPWSTR pszIconPath, [in] int cch, [out] int *piIconIndex);
  29. HRESULT GetDefaultIconHandle([out] HICON *phIcon);
  30. HRESULT SetDefaultIcon();
  31. }
  32. typedef [v1_enum] enum tagBNSTATE
  33. {
  34. BNS_NORMAL = 0, // Normal state that we are in
  35. BNS_BEGIN_NAVIGATE = 1, // A Begin navigate event has happened.
  36. BNS_NAVIGATE = 2 // A Navigate event has happened..."
  37. } BNSTATE; // The navigate state..."
  38. cpp_quote("#ifdef MIDL_PASS")
  39. typedef DWORD RGBQUAD;
  40. cpp_quote("#endif")
  41. [
  42. uuid(4D4BE85C-9BF6-4218-999A-8EA489F08EF7),
  43. helpstring("Image List private interface for saving to a stream in a compatible manner."),
  44. local
  45. ]
  46. interface IImageListPersistStream : IUnknown
  47. {
  48. HRESULT LoadEx(DWORD dwFlags, IStream* pstm);
  49. HRESULT SaveEx(DWORD dwFlags, IStream* pstm);
  50. };
  51. [
  52. uuid(E94CC23B-0916-4ba6-93F4-AA52B5355EE8),
  53. helpstring("Image List private interface."),
  54. local
  55. ]
  56. interface IImageListPriv : IUnknown
  57. {
  58. HRESULT SetFlags(UINT flags);
  59. HRESULT GetFlags(UINT* pflags);
  60. HRESULT SetColorTable(int start, int len, RGBQUAD *prgb, int* pi);
  61. HRESULT GetPrivateGoo(HBITMAP* hbmp, HDC* hdc, HBITMAP* hbmpMask, HDC* hdcMask);
  62. HRESULT GetMirror(REFIID riid, PVOID* ppv);
  63. HRESULT CopyDitherImage( WORD iDst, int xDst, int yDst, IUnknown* punk, int iSrc, UINT fStyle);
  64. };
  65. [
  66. uuid(01e13875-2e58-4671-be46-59945432be6e),
  67. local
  68. ]
  69. interface IMarkupCallback : IUnknown
  70. {
  71. HRESULT GetState(UINT uState);
  72. HRESULT Notify(int nCode, int iLink);
  73. HRESULT InvalidateRect(RECT* prc);
  74. HRESULT OnCustomDraw(DWORD dwDrawStage, HDC hdc, const RECT *prc, DWORD dwItemSpec, UINT uItemState, LRESULT *pdwResult);
  75. };
  76. cpp_quote("#define MARKUPSIZE_CALCWIDTH 0 // calculates width without restriction")
  77. cpp_quote("#define MARKUPSIZE_CALCHEIGHT 1 // prc->right contains max width")
  78. cpp_quote("#define MARKUPLINKTEXT_URL 0 // get the URL")
  79. cpp_quote("#define MARKUPLINKTEXT_ID 1 // get the id text associated with the url")
  80. cpp_quote("#define MARKUPLINKTEXT_TEXT 2 // get the plain text associated with the url")
  81. cpp_quote("#define MARKUPSTATE_FOCUSED 0x00000001")
  82. cpp_quote("#define MARKUPSTATE_ENABLED 0x00000002")
  83. cpp_quote("#define MARKUPSTATE_VISITED 0x00000004")
  84. cpp_quote("#define MARKUPSTATE_ALLOWMARKUP 0x80000000")
  85. cpp_quote("#define MARKUPMESSAGE_KEYEXECUTE 0")
  86. cpp_quote("#define MARKUPMESSAGE_CLICKEXECUTE 1")
  87. cpp_quote("#define MARKUPMESSAGE_WANTFOCUS 2")
  88. typedef HANDLE HTHEME;
  89. [
  90. uuid(50cf8c58-029d-41bf-b8dd-4ce4f95d9257),
  91. local
  92. ]
  93. interface IControlMarkup : IUnknown
  94. {
  95. HRESULT SetCallback(IUnknown* punk);
  96. HRESULT GetCallback(REFIID riid, [out, iid_is(riid)] void** ppvUnk);
  97. HRESULT SetFonts(HFONT hFont, HFONT hFontUnderline);
  98. HRESULT GetFonts(HFONT* phFont, HFONT* phFontUnderline);
  99. HRESULT SetText(LPCWSTR pwszText);
  100. HRESULT GetText(BOOL bRaw, LPWSTR pwszText, DWORD *pdwCch);
  101. HRESULT SetLinkText(int iLink, UINT uMarkupLinkText, LPCWSTR pwszText);
  102. HRESULT GetLinkText(int iLink, UINT uMarkupLinkText, LPWSTR pwszText, DWORD *pdwCch);
  103. HRESULT SetRenderFlags(UINT uDT);
  104. HRESULT GetRenderFlags(UINT *puDT, HTHEME *phTheme, int *piPartId, int *piStateIdNormal, int *piStateIdLink);
  105. HRESULT SetThemeRenderFlags(UINT uDT, HTHEME hTheme, int iPartId, int iStateIdNormal, int iStateIdLink);
  106. HRESULT GetState(int iLink, UINT uStateMask, UINT* puState);
  107. HRESULT SetState(int iLink, UINT uStateMask, UINT uState);
  108. HRESULT DrawText(HDC hdcClient, LPCRECT prcClient);
  109. HRESULT SetLinkCursor();
  110. HRESULT CalcIdealSize(HDC hdc, UINT uMarkUpCalc, RECT* prc);
  111. HRESULT SetFocus();
  112. HRESULT KillFocus();
  113. HRESULT IsTabbable();
  114. HRESULT OnButtonDown( POINT pt );
  115. HRESULT OnButtonUp( POINT pt);
  116. HRESULT OnKeyDown(UINT uVitKey);
  117. HRESULT HitTest(POINT pt, UINT* pidLink);
  118. // Reinsert this if you'd like to use it to conveniently process WM_BUTTONDOWN,
  119. // WM_BUTTONUP, WM_KEYDOWN messages. The "correct" way is to process these messages
  120. // yourself and use OnButtonDown, OnButtonUp, OnKeyDown instead.
  121. //HRESULT HandleEvent(BOOL keys, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  122. };
  123. interface IBasePropPage;
  124. interface IAdvancedDialog;
  125. cpp_quote("#if _WIN32_IE >= 0x0600")
  126. cpp_quote("// INTERFACE: IThemeUIPages")
  127. cpp_quote("// DESCRIPTION:")
  128. cpp_quote("// This interface is used by all the pages in the Display Control Panel. They allow the")
  129. cpp_quote("// base pages (Theme, Background, ScreenSaver, Appearance, and Settings) to specify that")
  130. cpp_quote("// they want to add pages to the Advanced Display Properties dialog. (Theme Settings, ")
  131. cpp_quote("// Appearance, Web, and Effects)")
  132. cpp_quote("// DisplayAdvancedDialog() will open the adv dialog. When this object opens the dialog,")
  133. cpp_quote("// it will add the appropriate pages, check when anyone's state gets dirty,")
  134. cpp_quote("// and then merge the state from the advanced pages back into the base pages.")
  135. cpp_quote("// This object will see if the IAdvancedDialog pages get dirty, and if one is and the")
  136. cpp_quote("// user clicked OK instead of CANCEL, then it will use IAdvancedDialog::OnClose()")
  137. cpp_quote("// to let the IAdvancedDialog object merge it's state into IBasePropPage.")
  138. cpp_quote("// This object is used to allow desk.cpl, shell32.dll, and ThemeUI.dll control the dialog.")
  139. cpp_quote("// ")
  140. cpp_quote("// This object may implement IEnumUnknown to allow callers to access the list of IBasePropPage")
  141. cpp_quote("// objects. IPersist::GetClassID() should be used to identify one IBasePropPage object")
  142. cpp_quote("// from another. This is also true for IAdvancedDialog objects.")
  143. cpp_quote("// ")
  144. cpp_quote("// AddPage: This is used by desk.cpl to ask ThemeUI for the pages it wants to add to the base dlg.")
  145. cpp_quote("// This allows the pages to be put in a specific order.")
  146. cpp_quote("// AddAdvancedPage: This is used by shell32.dll's Background tab to let ThemeUI know")
  147. cpp_quote("// that it wants to add a page to the advanced dialog (the Web tab).")
  148. cpp_quote("// DisplayAdvancedDialog: This is used by any of the base pages to open the advanced page.")
  149. cpp_quote("// ApplyPressed: Each page in the base dialog needs to call this method when they receive")
  150. cpp_quote("// PSN_APPLY. This will allow the IThemeUIPages to notify every object")
  151. cpp_quote("// that the state should be applied, even if their dlgproc was never activated.")
  152. cpp_quote("// ")
  153. cpp_quote("// Values for nPageID in IThemeUIPages::AddPage()")
  154. cpp_quote("#define PAGE_DISPLAY_THEMES 0")
  155. cpp_quote("#define PAGE_DISPLAY_APPEARANCE 1")
  156. cpp_quote("#define PAGE_DISPLAY_SETTINGS 2")
  157. cpp_quote("// ")
  158. cpp_quote("// Values for dwFlags in IThemeUIPages::ApplyPressed()")
  159. cpp_quote("#define TUIAP_NONE 0x00000000")
  160. cpp_quote("#define TUIAP_CLOSE_DIALOG 0x00000001")
  161. cpp_quote("#define TUIAP_WAITFORAPPLY 0x00000002")
  162. cpp_quote("// Values for dwEM in IThemeUIPages::SetExecMode()")
  163. cpp_quote("#define EM_NORMAL 0x00000001")
  164. cpp_quote("#define EM_SETUP 0x00000002")
  165. cpp_quote("#define EM_DETECT 0x00000003")
  166. cpp_quote("#define EM_INVALID_MODE 0x00000004")
  167. [
  168. uuid(7bba4934-ac4b-471c-a3e7-252c5ff3e8dd),
  169. helpstring("Theme UI property pages private interface."),
  170. local
  171. ]
  172. interface IThemeUIPages : IUnknown
  173. {
  174. HRESULT AddPage([in] LPFNSVADDPROPSHEETPAGE pfnAddPage, [in] LPARAM lParam, [in] long nPageID);
  175. HRESULT AddBasePage([in] IBasePropPage * pBasePage);
  176. HRESULT ApplyPressed([in] DWORD dwFlags);
  177. HRESULT GetBasePagesEnum([out] IEnumUnknown ** ppEnumUnknown);
  178. HRESULT UpdatePreview([in] DWORD dwFlags);
  179. HRESULT AddFakeSettingsPage([in] LPVOID pVoid);
  180. HRESULT SetExecMode([in] DWORD dwEM);
  181. HRESULT GetExecMode([out] DWORD* pdwEM);
  182. HRESULT LoadMonitorBitmap([in] BOOL fFillDesktop, [out] HBITMAP* phbmMon);
  183. HRESULT DisplaySaveSettings([in] PVOID pContext, [in] HWND hwnd, [out] int* piRet);
  184. };
  185. cpp_quote("// INTERFACE: IAdvancedDialog")
  186. cpp_quote("// DESCRIPTION:")
  187. cpp_quote("// ")
  188. cpp_quote("// DisplayAdvancedDialog: Display the Advanced Dialog.")
  189. cpp_quote("// hwndParent: Parent the dialog on this hwnd.")
  190. cpp_quote("// pBasePage: Load the state from this propertybag. Save the state here if OK is pressed.")
  191. cpp_quote("// pfEnableApply: Tell the parent dialog if they should enable the Apply button.")
  192. [
  193. uuid(9DD92CA7-BF27-4fcb-AE95-1EAC48FC254D),
  194. helpstring("An advanced property page private negociation interface."),
  195. local
  196. ]
  197. interface IAdvancedDialog : IUnknown
  198. {
  199. HRESULT DisplayAdvancedDialog([in] HWND hwndParent, [in] IPropertyBag * pBasePage, [in] BOOL * pfEnableApply);
  200. };
  201. cpp_quote("// INTERFACE: IBasePropPage")
  202. cpp_quote("// DESCRIPTION:")
  203. cpp_quote("// This interface is implemented by IShellPropSheetExt objects which want to add pages to")
  204. cpp_quote("// the advanced dialog. When one of the base dialog pages clicks on a button that")
  205. cpp_quote("// should open the advanced dialog, IThemeUIPages::DisplayAdvancedDialog() will call")
  206. cpp_quote("// each object's IBasePropPage::GetAdvancedPage() method. The base page will then")
  207. cpp_quote("// create an IAdvancedDialog object to add the advanced pages and track the state. If the")
  208. cpp_quote("// advanced dlg clicks OK, then the state should move back into the IBasePropPage")
  209. cpp_quote("// object, via IAdvancedDialog::OnClose(, pBasePropPage). Then the base dlg object can")
  210. cpp_quote("// persist the state when the dialog receives an OK or APPLY command.")
  211. cpp_quote("// This object may want to implement IObjectWithSite so it can get a IUnknown pointer to")
  212. cpp_quote("// the IThemeUIPages object. This will allow this object's base pages to open the")
  213. cpp_quote("// advanced dialog via IBasePropPage::GetAdvancedPage().")
  214. cpp_quote("// ")
  215. cpp_quote("// GetAdvancedPage: The callee will create the IAdvancedDialog object and return it.")
  216. cpp_quote("// Note that the state may be dirty if the user already opened and closed the")
  217. cpp_quote("// advanced dialog without clicking Apply.")
  218. cpp_quote("// OnClose: The page will be called when the base dialog is closing. This will allow")
  219. cpp_quote("// the object to persist it's state.")
  220. typedef [
  221. helpstring("Constants that define the OnApply action")
  222. ] enum tagPropPageOnApply
  223. {
  224. PPOAACTION_CANCEL, // = 0
  225. PPOAACTION_OK, // = 1
  226. PPOAACTION_APPLY // = 2
  227. } PROPPAGEONAPPLY;
  228. [
  229. uuid(B34E525B-9EB4-433b-8E0F-019C4F21D7E7),
  230. helpstring("A base property page private negociation interface."),
  231. local
  232. ]
  233. interface IBasePropPage : IShellPropSheetExt
  234. {
  235. HRESULT GetAdvancedDialog([out] IAdvancedDialog ** ppAdvDialog);
  236. HRESULT OnApply([in] PROPPAGEONAPPLY oaAction);
  237. };
  238. cpp_quote("// INTERFACE: IPreviewSystemMetrics")
  239. cpp_quote("// DESCRIPTION:")
  240. cpp_quote("// This object will allow the negociation with a preview of the system metrics.")
  241. [
  242. uuid(FC0A77D2-2ADF-4ede-A885-523A3A74A145),
  243. helpstring("This object will allow the negociation with a preview of the system metrics."),
  244. local
  245. ]
  246. interface IPreviewSystemMetrics : IUnknown
  247. {
  248. HRESULT RefreshColors(void);
  249. HRESULT UpdateDPIchange(void);
  250. HRESULT UpdateCharsetChanges(void);
  251. HRESULT DeskSetCurrentScheme([in, string] LPCWSTR pwzSchemeName);
  252. };
  253. cpp_quote("#define SZ_PBPROP_SCREENSAVER_PATH TEXT(\"ScreenSaver_Path\")")
  254. cpp_quote("#define SZ_PBPROP_BACKGROUND_PATH TEXT(\"Background_Path\")")
  255. cpp_quote("#define SZ_PBPROP_BACKGROUNDSRC_PATH TEXT(\"BackgroundSrc_Path\") // The source path of the background. This is before it was converted to a .bmp.")
  256. cpp_quote("#define SZ_PBPROP_BACKGROUND_TILE TEXT(\"Background_TILE\") // VT_UI4 with WPSTYLE_ flags from WALLPAPEROPT in IActiveDesktop::SetWallpaperOptions()")
  257. cpp_quote("#define SZ_PBPROP_VISUALSTYLE_PATH TEXT(\"VisualStyle_Path\") // VT_BSTR with the visual style path (.mstheme file)")
  258. cpp_quote("#define SZ_PBPROP_VISUALSTYLE_COLOR TEXT(\"VisualStyle_Color\") // VT_BSTR with the visual style Color Style")
  259. cpp_quote("#define SZ_PBPROP_VISUALSTYLE_SIZE TEXT(\"VisualStyle_Size\") // VT_BSTR with the visual style size")
  260. cpp_quote("#define SZ_PBPROP_SYSTEM_METRICS TEXT(\"SystemMetrics\") // VT_BYREF byref pointer to SYSTEMMETRICSALL")
  261. cpp_quote("#define SZ_PBPROP_PREVIEW1 TEXT(\"Preview1\") // VT_UNKNOWN to object w/IThemePreview")
  262. cpp_quote("#define SZ_PBPROP_PREVIEW2 TEXT(\"Preview2\") // VT_UNKNOWN to object w/IThemePreview")
  263. cpp_quote("#define SZ_PBPROP_PREVIEW3 TEXT(\"Preview3\") // VT_UNKNOWN to object w/IThemePreview")
  264. cpp_quote("#define SZ_PBPROP_CUSTOMIZE_THEME TEXT(\"Theme_CustomizeTheme\") // VT_EMPTY. Used to indicate that the theme settings have changed")
  265. cpp_quote("#define SZ_PBPROP_WEBCOMPONENTS TEXT(\"WebComponents\") // VT_UNKNOWN. Get or Set the IActiveDesktop interface containing the ActiveDesktop components")
  266. cpp_quote("#define SZ_PBPROP_OPENADVANCEDDLG TEXT(\"OpenAdvancedDialog\") // VT_BOOL. Tells the IPropertyBag to open the Advanced dialog when opening. If read, this indicates if the base dialog should go away when the Adv dlg closes.")
  267. cpp_quote("#define SZ_PBPROP_BACKGROUND_COLOR TEXT(\"BackgroundColor\") // VT_UI4. Get or set the COLORREF (RGB) color for the background system metric.")
  268. cpp_quote("#define SZ_PBPROP_THEME_LAUNCHTHEME TEXT(\"ThemeLaunchTheme\") // VT_LPWSTR. This will be the path to the .theme file to open.")
  269. cpp_quote("#define SZ_PBPROP_APPEARANCE_LAUNCHMSTHEME TEXT(\"AppearanceLaunchMSTheme\") // VT_LPWSTR. This will be the path to the .mstheme file to open.")
  270. cpp_quote("#define SZ_PBPROP_PREOPEN TEXT(\"PreOpen\") // VARIANT is NULL. This is sent right before the dialog opens.")
  271. cpp_quote("#define SZ_PBPROP_DPI_MODIFIED_VALUE TEXT(\"Settings_DPIModifiedValue\") // VT_I4 specifying the currently modified DPI")
  272. cpp_quote("#define SZ_PBPROP_DPI_APPLIED_VALUE TEXT(\"Settings_DPIAppliedValue\") // VT_I4 specifying the currently applied DPI")
  273. cpp_quote("// Display Control Panel flags to specify an opening page.")
  274. cpp_quote("// You can launch \"rundll32.exe shell32.dll,Control_RunDLL desk.cpl ,@Settings\" ")
  275. cpp_quote("// which will launch the Display CPL to the Settings tab.")
  276. cpp_quote("// These names are canonical so they will work on all languages. The tab order")
  277. cpp_quote("// will change when admin policies are applied or when the OS revs the UI and")
  278. cpp_quote("// these names will always work.")
  279. cpp_quote("#define SZ_DISPLAYCPL_OPENTO_THEMES TEXT(\"Themes\") // Themes tab")
  280. cpp_quote("#define SZ_DISPLAYCPL_OPENTO_DESKTOP TEXT(\"Desktop\") // Desktop tab")
  281. cpp_quote("#define SZ_DISPLAYCPL_OPENTO_SCREENSAVER TEXT(\"ScreenSaver\") // Screen Saver tab")
  282. cpp_quote("#define SZ_DISPLAYCPL_OPENTO_APPEARANCE TEXT(\"Appearance\") // Appearance tab")
  283. cpp_quote("#define SZ_DISPLAYCPL_OPENTO_SETTINGS TEXT(\"Settings\") // Settings tab")
  284. cpp_quote("#endif // _WIN32_IE >= 0x0600")
  285. //
  286. // SHAssocEnumHandlers returns an IEnumAssocHandlers object.
  287. //
  288. [
  289. helpstring("Enumerate handlers"),
  290. uuid(973810ad-9599-4b88-9e4d-6ee98c9552da),
  291. object,
  292. pointer_default(unique),
  293. local
  294. ]
  295. interface IAssocHandler : IUnknown
  296. {
  297. HRESULT GetName([string, out] LPWSTR *ppsz);
  298. HRESULT GetUIName([string, out] LPWSTR *ppsz);
  299. HRESULT GetIconLocation([string, out]LPWSTR *ppszPath, int *pIndex);
  300. HRESULT IsRecommended();
  301. HRESULT MakeDefault([in, string] LPCWSTR pszDescription);
  302. HRESULT Exec([in] HWND hwnd, [in, string] LPCWSTR pszFile);
  303. // CHEATING here, need to move CMINVOKECOMMANDINFOEX into shtypes.idl
  304. HRESULT Invoke([in] void *pici, [in, string] LPCWSTR pszFile);
  305. };
  306. [
  307. helpstring("Enumerate handlers"),
  308. uuid(973810ae-9599-4b88-9e4d-6ee98c9552da),
  309. object,
  310. pointer_default(unique),
  311. local
  312. ]
  313. interface IEnumAssocHandlers : IUnknown
  314. {
  315. HRESULT Next(
  316. [in] ULONG celt,
  317. [out, size_is(celt), length_is(*pceltFetched)] IAssocHandler **rgelt,
  318. [out] ULONG *pceltFetched);
  319. // HRESULT Skip([in] ULONG celt);
  320. // HRESULT Reset();
  321. // HRESULT Clone([out] IEnumAssocHandlers **ppEnumHandlers);
  322. };
  323. //-------------------------------------------------------------------------
  324. //
  325. // Hardware Event interfaces
  326. //
  327. //-------------------------------------------------------------------------
  328. ///////////////////////////////////////////////////////////////////////////////
  329. //
  330. [
  331. object,
  332. uuid(99BC7510-0A96-43fa-8BB1-C928A0302EFB),
  333. helpstring("Hardware Event Device Info Interface"),
  334. pointer_default(unique)
  335. ]
  336. interface IHWDevice : IUnknown
  337. {
  338. HRESULT Init([in, string] LPCWSTR pszDeviceID);
  339. HRESULT AutoplayHandler([in, string] LPCWSTR pszEventType,
  340. [in, string] LPCWSTR pszHandler);
  341. };
  342. cpp_quote("#define HWDEVCUSTOMPROP_USEVOLUMEPROCESSING 0x00000001")
  343. [
  344. object,
  345. uuid(77D5D69C-D6CE-4026-B625-26964EEC733F),
  346. helpstring("HW Device Custom Properties"),
  347. pointer_default(unique)
  348. ]
  349. interface IHWDeviceCustomProperties : IUnknown
  350. {
  351. HRESULT InitFromDeviceID([in, string] LPCWSTR pszDeviceID, [in] DWORD dwFlags);
  352. HRESULT InitFromDevNode([in, string] LPCWSTR pszDevNode, [in] DWORD dwFlags);
  353. HRESULT GetDWORDProperty([in, string] LPCWSTR pszPropName,
  354. [out] DWORD* pdwProp);
  355. // Will not retrieve REG_MULTI_SZ values
  356. HRESULT GetStringProperty([in, string] LPCWSTR pszPropName,
  357. [out, string] LPWSTR* ppszProp);
  358. // Will not retrieve REG_SZ values
  359. // The MultiSz string is in ppblob->asData
  360. HRESULT GetMultiStringProperty([in, string] LPCWSTR pszPropName,
  361. [in] BOOL fMergeMultiSz, [out] WORD_BLOB** ppblob);
  362. HRESULT GetBlobProperty([in, string] LPCWSTR pszPropName,
  363. [out] BYTE_BLOB** ppblob);
  364. };
  365. ///////////////////////////////////////////////////////////////////////////////
  366. //
  367. [
  368. object,
  369. uuid(66057ABA-FFDB-4077-998E-7F131C3F8157),
  370. helpstring("Autoplay Handler Enumerator Interface"),
  371. pointer_default(unique)
  372. ]
  373. interface IEnumAutoplayHandler : IUnknown
  374. {
  375. HRESULT Next([out, string] LPWSTR* ppszHandler,
  376. [out, string] LPWSTR* ppszAction,
  377. [out, string] LPWSTR* ppszProvider,
  378. [out, string] LPWSTR* ppszIconLocation);
  379. };
  380. ///////////////////////////////////////////////////////////////////////////////
  381. //
  382. // We want to make sure not to use 0x1 as it is S_FALSE
  383. cpp_quote("#define HANDLERDEFAULT_USERCHOSENDEFAULT 0x00000002")
  384. cpp_quote("#define HANDLERDEFAULT_EVENTHANDLERDEFAULT 0x00000004")
  385. cpp_quote("#define HANDLERDEFAULT_MORERECENTHANDLERSINSTALLED 0x00000008")
  386. cpp_quote("#define HANDLERDEFAULT_DEFAULTSAREDIFFERENT 0x00000010")
  387. cpp_quote("#define HANDLERDEFAULT_MAKERETURNVALUE(a) MAKE_HRESULT(0, FACILITY_ITF, (a))")
  388. cpp_quote("#define HANDLERDEFAULT_GETFLAGS(a) HRESULT_CODE((a))")
  389. [
  390. object,
  391. uuid(335E9E5D-37FC-4d73-8BA8-FD4E16B28134),
  392. helpstring("Autoplay Handler Interface"),
  393. pointer_default(unique)
  394. ]
  395. interface IAutoplayHandler : IUnknown
  396. {
  397. HRESULT Init([in, string] LPCWSTR pszDeviceID,
  398. [in, string] LPCWSTR pszEventType);
  399. HRESULT InitWithContent([in, string] LPCWSTR pszDeviceID,
  400. [in, string] LPCWSTR pszEventType,
  401. [in, string] LPCWSTR pszContentTypeHandler);
  402. HRESULT EnumHandlers([out] IEnumAutoplayHandler** ppenum);
  403. // Will return other S_* success codes than S_OK and S_FALSE.
  404. HRESULT GetDefaultHandler([out, string] LPWSTR* ppszHandler);
  405. HRESULT SetDefaultHandler([in, string] LPCWSTR pszHandler);
  406. };
  407. ///////////////////////////////////////////////////////////////////////////////
  408. //
  409. [
  410. object,
  411. uuid(557730F6-41FA-4d11-B9FD-F88AB155347F),
  412. helpstring("Autoplay Handler Properties Interface"),
  413. pointer_default(unique)
  414. ]
  415. interface IAutoplayHandlerProperties : IUnknown
  416. {
  417. HRESULT Init([in, string] LPCWSTR pszHandler);
  418. HRESULT GetInvokeProgIDAndVerb([out, string] LPWSTR* ppszInvokeProgID,
  419. [out, string] LPWSTR* ppszInvokeVerb);
  420. };
  421. ///////////////////////////////////////////////////////////////////////////////
  422. //
  423. cpp_quote("#include <pshpack8.h>")
  424. typedef struct tagVOLUMEINFO
  425. {
  426. DWORD dwState; // State of volume
  427. LPWSTR pszDeviceIDVolume; // \\?\STORAGE#Volume#...{...GUID...}
  428. LPWSTR pszVolumeGUID; // \\?\Volume{...GUID...}
  429. DWORD dwVolumeFlags; // see HWDVF_... flags
  430. DWORD dwDriveType; // see HWDT_... flags
  431. DWORD dwDriveCapability; // see HWDDC_... flags
  432. LPWSTR pszLabel;
  433. LPWSTR pszFileSystem;
  434. DWORD dwFileSystemFlags;
  435. DWORD dwMaxFileNameLen;
  436. DWORD dwRootAttributes;
  437. DWORD dwSerialNumber; //
  438. DWORD dwDriveState; // see HWDDS_...;
  439. DWORD dwMediaState; // see HWDMS_...;
  440. DWORD dwMediaCap; // see HWDMC_...;
  441. LPWSTR pszAutorunIconLocation; // Autorun IconLocation from autorun.inf
  442. LPWSTR pszAutorunLabel; // Autorun Label from autorun.inf
  443. LPWSTR pszIconLocationFromService; // Icon location from Custom Properties
  444. LPWSTR pszNoMediaIconLocationFromService; // Icon location from Custom Properties
  445. LPWSTR pszLabelFromService; // Label from Custom Properties
  446. } VOLUMEINFO;
  447. typedef struct tagVOLUMEINFO2
  448. {
  449. DWORD cbSize;
  450. WCHAR szDeviceIDVolume[200];
  451. WCHAR szVolumeGUID[50];
  452. WCHAR szLabel[33];
  453. WCHAR szFileSystem[30];
  454. DWORD dwState;
  455. DWORD dwVolumeFlags;
  456. DWORD dwDriveType;
  457. DWORD dwDriveCapability;
  458. DWORD dwFileSystemFlags;
  459. DWORD dwMaxFileNameLen;
  460. DWORD dwRootAttributes;
  461. DWORD dwSerialNumber;
  462. DWORD dwDriveState;
  463. DWORD dwMediaState;
  464. DWORD dwMediaCap;
  465. DWORD oAutorunIconLocation;
  466. DWORD oAutorunLabel;
  467. DWORD oIconLocationFromService;
  468. DWORD oNoMediaIconLocationFromService;
  469. DWORD oLabelFromService;
  470. WCHAR szOptionalStrings[1];
  471. } VOLUMEINFO2;
  472. typedef struct tagHWDEVICEINFO
  473. {
  474. DWORD cbSize;
  475. WCHAR szDeviceIntfID[200];
  476. GUID guidInterface;
  477. DWORD dwState;
  478. DWORD dwDeviceFlags;
  479. } HWDEVICEINFO;
  480. cpp_quote("#define SHHARDWAREEVENT_VOLUMEARRIVED 0x00000001")
  481. cpp_quote("#define SHHARDWAREEVENT_VOLUMEUPDATED 0x00000002")
  482. cpp_quote("#define SHHARDWAREEVENT_VOLUMEREMOVED 0x00000004")
  483. cpp_quote("#define SHHARDWAREEVENT_MOUNTPOINTARRIVED 0x00000008")
  484. cpp_quote("#define SHHARDWAREEVENT_MOUNTPOINTREMOVED 0x00000010")
  485. cpp_quote("#define SHHARDWAREEVENT_DEVICEARRIVED 0x00000020")
  486. cpp_quote("#define SHHARDWAREEVENT_DEVICEUPDATED 0x00000040")
  487. cpp_quote("#define SHHARDWAREEVENT_DEVICEREMOVED 0x00000080")
  488. cpp_quote("#define SHHARDWAREEVENT_VOLUMEMOUNTED 0x00000100")
  489. cpp_quote("#define SHHARDWAREEVENT_VOLUMEDISMOUNTED 0x00000200")
  490. // dont use these escaped misnames..
  491. cpp_quote("#define SHHARDWAREEVENT_MOUNTDEVICEARRIVED 0x00000020 // is really DEVICEARRIVED")
  492. cpp_quote("#define SHHARDWAREEVENT_MOUNTDEVICEUPDATED 0x00000040 // is really DEVICEUPDATED")
  493. cpp_quote("#define SHHARDWAREEVENT_MOUNTDEVICEREMOVED 0x00000080 // is really DEVICEREMOVED")
  494. cpp_quote("#define MAX_FILESYSNAME 30")
  495. cpp_quote("#define MAX_LABEL_NTFS 32 // not including the NULL")
  496. cpp_quote("#define MAX_LABEL MAX_LABEL_NTFS + 1")
  497. cpp_quote("#define MAX_ICONLOCATION MAX_PATH + 12 // + 12 for comma and index")
  498. cpp_quote("#define MAX_VOLUMEINFO2 (sizeof(VOLUMEINFO2) + (4 * MAX_ICONLOCATION + 1 * MAX_LABEL) * sizeof(WCHAR))")
  499. typedef struct tagSHHARDWAREEVENT
  500. {
  501. DWORD cbSize;
  502. DWORD dwEvent;
  503. BYTE rgbPayLoad[1];
  504. } SHHARDWAREEVENT;
  505. typedef struct tagMTPTADDED
  506. {
  507. WCHAR szMountPoint[260/*MAX_PATH*/];
  508. WCHAR szDeviceIDVolume[200/*MAX_DEVICEID*/];
  509. } MTPTADDED;
  510. cpp_quote("#include <poppack.h>") /* Return to byte packing */
  511. // All this information comes from the HW. No information that is not HW
  512. // related should be added to this.
  513. // Media State
  514. cpp_quote("#define HWDMS_PRESENT 0x10000000")
  515. cpp_quote("#define HWDMS_FORMATTED 0x20000000")
  516. //cpp_quote("#define HWDMS_WRITEPROTECTED_SUPPORTDETECTION 0x40000000")
  517. //cpp_quote("#define HWDMS_WRITEPROTECTED 0x80000000")
  518. // Media Capabilities
  519. cpp_quote("#define HWDMC_WRITECAPABILITY_SUPPORTDETECTION 0x00000001")
  520. cpp_quote("#define HWDMC_CDROM 0x00000002")
  521. cpp_quote("#define HWDMC_CDRECORDABLE 0x00000004")
  522. cpp_quote("#define HWDMC_CDREWRITABLE 0x00000008")
  523. cpp_quote("#define HWDMC_DVDROM 0x00000010")
  524. cpp_quote("#define HWDMC_DVDRECORDABLE 0x00000020")
  525. cpp_quote("#define HWDMC_DVDREWRITABLE 0x00000040")
  526. cpp_quote("#define HWDMC_DVDRAM 0x00000080")
  527. cpp_quote("#define HWDMC_ANALOGAUDIOOUT 0x00000100")
  528. cpp_quote("#define HWDMC_RANDOMWRITE 0x00001000")
  529. cpp_quote("#define HWDMC_HASAUTORUNINF 0x00002000")
  530. cpp_quote("#define HWDMC_HASAUTORUNCOMMAND 0x00004000")
  531. cpp_quote("#define HWDMC_HASDESKTOPINI 0x00008000")
  532. cpp_quote("#define HWDMC_HASDVDMOVIE 0x00010000")
  533. cpp_quote("#define HWDMC_HASAUDIOTRACKS 0x00020000")
  534. cpp_quote("#define HWDMC_HASDATATRACKS 0x00040000")
  535. cpp_quote("#define HWDMC_HASAUDIOTRACKS_UNDETERMINED 0x00080000")
  536. cpp_quote("#define HWDMC_HASDATATRACKS_UNDETERMINED 0x00100000")
  537. cpp_quote("#define HWDMC_HASUSEAUTOPLAY 0x00200000")
  538. cpp_quote("#define HWDMC_CDTYPEMASK (HWDMC_CDROM | HWDMC_CDRECORDABLE | HWDMC_CDREWRITABLE | HWDMC_DVDROM | HWDMC_DVDRECORDABLE | HWDMC_DVDREWRITABLE | HWDMC_DVDRAM)")
  539. // Drive State
  540. //cpp_quote("#define HWDDS_PRESENT_SUPPORTDETECTION 0x10000000")
  541. //cpp_quote("#define HWDDS_PRESENT 0x20000000")
  542. //cpp_quote("#define HWDDS_SLEEPING_SUPPORTDETECTION 0x40000000")
  543. //cpp_quote("#define HWDDS_SLEEPING 0x80000000")
  544. // Drive Capabilities
  545. cpp_quote("#define HWDDC_CAPABILITY_SUPPORTDETECTION HWDMC_WRITECAPABILITY_SUPPORTDETECTION ")
  546. cpp_quote("#define HWDDC_CDROM HWDMC_CDROM ")
  547. cpp_quote("#define HWDDC_CDRECORDABLE HWDMC_CDRECORDABLE ")
  548. cpp_quote("#define HWDDC_CDREWRITABLE HWDMC_CDREWRITABLE ")
  549. cpp_quote("#define HWDDC_DVDROM HWDMC_DVDROM ")
  550. cpp_quote("#define HWDDC_DVDRECORDABLE HWDMC_DVDRECORDABLE ")
  551. cpp_quote("#define HWDDC_DVDREWRITABLE HWDMC_DVDREWRITABLE ")
  552. cpp_quote("#define HWDDC_DVDRAM HWDMC_DVDRAM ")
  553. cpp_quote("#define HWDDC_ANALOGAUDIOOUT HWDMC_ANALOGAUDIOOUT ")
  554. cpp_quote("#define HWDDC_RANDOMWRITE HWDMC_RANDOMWRITE")
  555. cpp_quote("#define HWDDC_NOSOFTEJECT 0x00002000")
  556. cpp_quote("#define HWDDC_FLOPPYSOFTEJECT 0x00004000")
  557. cpp_quote("#define HWDDC_REMOVABLEDEVICE 0x00008000")
  558. cpp_quote("#define HWDDC_CDTYPEMASK HWDMC_CDTYPEMASK")
  559. // Volume flags
  560. cpp_quote("#define HWDVF_STATE_SUPPORTNOTIFICATION 0x00000001")
  561. cpp_quote("#define HWDVF_STATE_ACCESSDENIED 0x00000002")
  562. cpp_quote("#define HWDVF_STATE_DISMOUNTED 0x00000004")
  563. cpp_quote("#define HWDVF_STATE_HASAUTOPLAYHANDLER 0x00000008")
  564. cpp_quote("#define HWDVF_STATE_DONOTSNIFFCONTENT 0x00000010")
  565. cpp_quote("#define HWDVF_STATE_JUSTDOCKED 0x00000020")
  566. // Drive Type
  567. // Watch out not to have these conflict with capabilities reporting
  568. cpp_quote("#define HWDTS_FLOPPY35 0x00000001")
  569. cpp_quote("#define HWDTS_FLOPPY525 0x00000002")
  570. cpp_quote("#define HWDTS_REMOVABLEDISK 0x00000004")
  571. cpp_quote("#define HWDTS_FIXEDDISK 0x00000008")
  572. cpp_quote("#define HWDTS_CDROM 0x00000010")
  573. // Device Flags
  574. cpp_quote("#define HWDDF_HASDEVICEHANDLER 0x00000001")
  575. cpp_quote("#define HWDDF_HASDEVICEHANDLER_UNDETERMINED 0x00000002")
  576. cpp_quote("#define HWDDF_REMOVABLEDEVICE 0x00000004")
  577. cpp_quote("#define HWDDF_REMOVABLEDEVICE_UNDETERMINED 0x00000008")
  578. [
  579. object,
  580. uuid(99B732C2-9B7B-4145-83A4-C45DF791FD99),
  581. helpstring("Hardware Device Callback Interface"),
  582. pointer_default(unique)
  583. ]
  584. interface IHardwareDeviceCallback : IUnknown
  585. {
  586. HRESULT VolumeAddedOrUpdated(
  587. [in] BOOL fAdded, // TRUE: Added, FALSE: Updated
  588. [in] VOLUMEINFO* pvolinfo);
  589. HRESULT VolumeRemoved([in, string] LPCWSTR pszDeviceIDVolume);
  590. HRESULT MountPointAdded(
  591. [in, string] LPCWSTR pszMountPoint, // "c:\", or "d:\MountFolder\"
  592. [in, string] LPCWSTR pszDeviceIDVolume);// \\?\STORAGE#Volume#...{...GUID...}
  593. HRESULT MountPointRemoved([in, string] LPCWSTR pszMountPoint);
  594. HRESULT DeviceAdded([in, string] LPCWSTR pszDeviceID,
  595. [in] GUID guidDeviceID);
  596. HRESULT DeviceUpdated([in, string] LPCWSTR pszDeviceID);
  597. HRESULT DeviceRemoved([in, string] LPCWSTR pszDeviceID);
  598. };
  599. [
  600. object,
  601. uuid(553A4A55-681C-440e-B109-597B9219CFB2),
  602. helpstring("Hardware Device Enumerator"),
  603. pointer_default(unique)
  604. ]
  605. interface IHardwareDevicesEnum : IUnknown
  606. {
  607. HRESULT Next(
  608. [out, string] LPWSTR* ppszDeviceID,
  609. [out] GUID* pguidDeviceID);
  610. };
  611. [
  612. object,
  613. uuid(3342BDE1-50AF-4c5d-9A19-DABD01848DAE),
  614. helpstring("Hardware Device Volumes Enumerator"),
  615. pointer_default(unique)
  616. ]
  617. interface IHardwareDevicesVolumesEnum : IUnknown
  618. {
  619. HRESULT Next([out] VOLUMEINFO* pvolinfo);
  620. };
  621. [
  622. object,
  623. uuid(EE93D145-9B4E-480c-8385-1E8119A6F7B2),
  624. helpstring("Hardware Device MountPoints Enumerator"),
  625. pointer_default(unique)
  626. ]
  627. interface IHardwareDevicesMountPointsEnum : IUnknown
  628. {
  629. HRESULT Next(
  630. [out, string] LPWSTR* ppszMountPoint, // "c:\", or "d:\MountFolder\"
  631. [out, string] LPWSTR* ppszDeviceIDVolume);// \\?\STORAGE#Volume#...{...GUID...}
  632. };
  633. // HWDEV: HardWareDevice EnumVolume
  634. cpp_quote("#define HWDEV_GETCUSTOMPROPERTIES 0x000000001")
  635. [
  636. object,
  637. uuid(CC271F08-E1DD-49bf-87CC-CD6DCF3F3D9F),
  638. helpstring("Hardware Device Interface"),
  639. pointer_default(unique)
  640. ]
  641. interface IHardwareDevices : IUnknown
  642. {
  643. HRESULT EnumVolumes([in] DWORD dwFlags, [out] IHardwareDevicesVolumesEnum** ppenum);
  644. HRESULT EnumMountPoints([out] IHardwareDevicesMountPointsEnum** ppenum);
  645. HRESULT EnumDevices([out] IHardwareDevicesEnum** ppenum);
  646. HRESULT Advise([in] DWORD dwProcessID,
  647. [in] ULONG_PTR hThread, [in] ULONG_PTR pfctCallback, [out] DWORD* pdwToken);
  648. HRESULT Unadvise([in] DWORD dwToken);
  649. };
  650. [
  651. uuid(ec35e37a-6579-4f3c-93cd-6e62c4ef7636),
  652. local
  653. ]
  654. interface IStartMenuPin : IUnknown
  655. {
  656. cpp_quote("#define SMPIN_POS(i) (LPCITEMIDLIST)MAKEINTRESOURCE((i)+1)")
  657. cpp_quote("#define SMPINNABLE_EXEONLY 0x00000001") // allow only EXEs to be pinned
  658. cpp_quote("#define SMPINNABLE_REJECTSLOWMEDIA 0x00000002") // reject slow media
  659. HRESULT EnumObjects([out] IEnumIDList **ppenumIDList);
  660. //
  661. // Pin: pidlFrom = NULL, pidlTo = pidl
  662. // Unpin: pidlFrom = pidl, pidlTo = NULL
  663. // Update: pidlFrom = old, pidlTo = new
  664. // Move: pidlFrom = pidl, pidlTo = SMPINPOS(iPos)
  665. HRESULT Modify(LPCITEMIDLIST pidlFrom, LPCITEMIDLIST pidlTo);
  666. HRESULT GetChangeCount([out] ULONG *pulOut);
  667. //
  668. // pdto = data object to test
  669. // dwFlags is an SMPINNABLE_* flag
  670. // *ppidl receives pidl being pinned
  671. //
  672. HRESULT IsPinnable([in] IDataObject *pdto,
  673. [in] DWORD dwFlags,
  674. [optional,out] LPITEMIDLIST *ppidl); // S_FALSE if not
  675. //
  676. // Find the pidl on the pin list and resolve the shortcut that
  677. // tracks it.
  678. //
  679. // Returns S_OK if the pidl changed and was resolved.
  680. // Returns S_FALSE if the pidl did not change.
  681. // Returns an error if the Resolve failed.
  682. //
  683. HRESULT Resolve([in] HWND hwnd, DWORD dwFlags, [in] LPCITEMIDLIST pidl, [out] LPITEMIDLIST *ppidlResolved);
  684. }
  685. cpp_quote("#if _WIN32_IE >= 0x0600")
  686. typedef struct tagCATLIST
  687. {
  688. const GUID* pguid;
  689. const SHCOLUMNID* pscid;
  690. } CATLIST;
  691. [
  692. uuid(509767BF-AC06-49f8-9E76-8BBC17F0EE93),
  693. local
  694. ]
  695. interface IDefCategoryProvider : IUnknown
  696. {
  697. HRESULT Initialize(const GUID* pguid, // Default GUID to group by
  698. const SHCOLUMNID* pscid, // Default SCID to group by
  699. const SHCOLUMNID* pscidExclude, // array of SHCOLUMNIDs to exlude. Terminated by GUID_NULL
  700. HKEY hkey, // The registry key to add categorizers from (Close key after call)
  701. const CATLIST* pcl, // an array of CATLIST entries terminated by a NULL entry
  702. IShellFolder* psf); // The shell folder that implements IShellFolder2 to group. Needs to implement IPersistFolder2
  703. }
  704. cpp_quote("#define MB_STATE_TRACK 1")
  705. cpp_quote("#define MB_STATE_MENU 2")
  706. cpp_quote("#define MB_STATE_ITEM 4")
  707. [
  708. uuid(b6664df7-0c46-460e-ba97-82ed46d0289e),
  709. local
  710. ]
  711. interface IInitAccessible : IUnknown
  712. {
  713. HRESULT InitAcc([in] int iState, [in] IMenuBand *pmb, [in] int iIndex, [in] HMENU hmenu, [in] WORD wID);
  714. };
  715. [
  716. uuid(4a7efa30-795c-4167-8676-b78fc5330cc7),
  717. local
  718. ]
  719. interface IInitTrackPopupBar : IUnknown
  720. {
  721. HRESULT InitTrackPopupBar([in] void* pvContext, [in] int iID, [in] HMENU hmenu, [in] HWND hwnd);
  722. };
  723. // ICompositeFolder::InitComposite
  724. // initializes a composite folder with the information necessary to aggregate
  725. // the child folders
  726. typedef [v1_enum] enum _CFITYPE
  727. {
  728. CFITYPE_CSIDL = 0, // Use COMPFOLDERINIT.csidl
  729. CFITYPE_PIDL, // Use COMPFOLDERINIT.pidl
  730. CFITYPE_PATH, // Use COMPFOLDERINIT.pszPath
  731. } CFITYPE;
  732. [v1_enum] enum
  733. {
  734. CFINITF_CHILDREN = 0x0000, // each composite folder will show up as a child
  735. CFINITF_FLAT = 0x0001, // each folder's children show up flat together
  736. };
  737. typedef UINT CFINITF;
  738. typedef struct _COMPFOLDERINIT
  739. {
  740. UINT uType;
  741. [switch_type(UINT), switch_is(uType)] union
  742. {
  743. [case(CFITYPE_CSIDL)] int csidl;
  744. [case(CFITYPE_PIDL)] LPCITEMIDLIST pidl;
  745. [case(CFITYPE_PATH)] [string] LPOLESTR pszPath;
  746. } DUMMYUNIONNAME;
  747. LPOLESTR pszName;
  748. } COMPFOLDERINIT;
  749. [
  750. helpstring("ICompositeFolder"),
  751. uuid(601ac3dd-786a-4eb0-bf40-ee3521e70bfb), // IID_ICompositeFolder
  752. object,
  753. pointer_default(unique)
  754. ]
  755. interface ICompositeFolder : IUnknown
  756. {
  757. HRESULT InitComposite(
  758. [in] WORD wSignature,
  759. [in] REFCLSID refclsid,
  760. [in] CFINITF flags,
  761. [in] ULONG celt,
  762. [in, size_is(celt)] const COMPFOLDERINIT *rgCFs);
  763. HRESULT BindToParent(
  764. [in] LPCITEMIDLIST pidl,
  765. [in] REFIID riid,
  766. [out, iid_is(riid)] void **ppv,
  767. [out] LPITEMIDLIST *ppidlLast);
  768. };
  769. cpp_quote("#endif // _WIN32_IE >= 0x0600")
  770. cpp_quote("#include <pshpack8.h>")
  771. typedef struct _tagSHELLREMINDER
  772. {
  773. DWORD cbSize;
  774. LPWSTR pszName;
  775. LPWSTR pszTitle;
  776. LPWSTR pszText;
  777. LPWSTR pszTooltip;
  778. LPWSTR pszIconResource;
  779. LPWSTR pszShellExecute;
  780. GUID* pclsid;
  781. DWORD dwShowTime;
  782. DWORD dwRetryInterval;
  783. DWORD dwRetryCount;
  784. DWORD dwTypeFlags;
  785. } SHELLREMINDER;
  786. cpp_quote("#include <poppack.h>")
  787. [
  788. uuid(6c6d9735-2d86-40e1-b348-08706b9908c0), // IID_IEnumShellReminder
  789. local
  790. ]
  791. interface IEnumShellReminder : IUnknown
  792. {
  793. HRESULT Next(
  794. [in] ULONG celt,
  795. [out, size_is(celt), length_is(*pceltFetched)] SHELLREMINDER** rgelt,
  796. [out] ULONG *pceltFetched);
  797. HRESULT Skip([in] ULONG celt);
  798. HRESULT Reset();
  799. HRESULT Clone([out] IEnumShellReminder **ppesr);
  800. };
  801. [
  802. uuid(968edb91-8a70-4930-8332-5f15838a64f9), // IID_IShellReminderManager
  803. local
  804. ]
  805. interface IShellReminderManager : IUnknown
  806. {
  807. HRESULT Add(const SHELLREMINDER* psr);
  808. HRESULT Delete(LPCWSTR pszName);
  809. HRESULT Enum(IEnumShellReminder** ppesr);
  810. };
  811. cpp_quote("#if _WIN32_IE >= 0x0400")
  812. [
  813. object,
  814. uuid(5dd6b79a-3ab7-49c0-ab82-6b2da7d78d75)
  815. ]
  816. interface IDeskBandEx : IUnknown
  817. {
  818. HRESULT MoveBand();
  819. };
  820. cpp_quote("#endif // _WIN32_IE >= 0x0400")
  821. cpp_quote("#include <pshpack8.h>")
  822. typedef struct tagNOTIFYITEM
  823. {
  824. LPWSTR pszExeName;
  825. LPWSTR pszIconText;
  826. HICON hIcon;
  827. HWND hWnd;
  828. DWORD dwUserPref;
  829. UINT uID;
  830. GUID guidItem;
  831. } NOTIFYITEM, *LPNOTIFYITEM;
  832. cpp_quote("#include <poppack.h>")
  833. [
  834. object,
  835. uuid(d782ccba-afb0-43f1-94db-fda3779eaccb), // IID_INotificationCB
  836. pointer_default(unique)
  837. ]
  838. interface INotificationCB : IUnknown
  839. {
  840. HRESULT Notify([in] DWORD dwMessage, [in] LPNOTIFYITEM pNotifyItem);
  841. };
  842. [
  843. object,
  844. uuid(fb852b2c-6bad-4605-9551-f15f87830935), // IID_ITrayNotify
  845. pointer_default(unique)
  846. ]
  847. interface ITrayNotify : IUnknown
  848. {
  849. HRESULT RegisterCallback([in] INotificationCB* pNotifyCB);
  850. HRESULT SetPreference([in] LPNOTIFYITEM pNotifyItem);
  851. HRESULT EnableAutoTray([in] BOOL bTraySetting);
  852. };
  853. [
  854. uuid(3037B6E1-0B58-4c34-AA63-A958D2A4413D),
  855. local
  856. ]
  857. interface IMagic : IUnknown
  858. {
  859. enum
  860. {
  861. MAGIC_ALIGN_BOTTOMLEFT = 0x00000001,
  862. MAGIC_ALIGN_BOTTOMRIGHT = 0x00000002,
  863. MAGIC_ALIGN_TOPLEFT = 0x00000003,
  864. MAGIC_ALIGN_TOPRIGHT = 0x00000004,
  865. MAGIC_ALIGN_CENTER = 0x00000005,
  866. };
  867. typedef DWORD MAGIC_ALIGN;
  868. [helpstring("Plays an animation (Alpha specified in uId + 1) for each frame in interval. The bitmap is divided by frames to get the size")]
  869. HRESULT Illusion(HMODULE hmod, UINT uId, UINT cFrames, UINT interval, MAGIC_ALIGN align, RECT rc);
  870. HRESULT BlinkFrom(HDC hdcFrom, RECT* rc);
  871. HRESULT BlinkMove(RECT* rc);
  872. HRESULT BlinkTo(HDC hdcTo, UINT cFrames);
  873. }
  874. // a resouce map object defines via XML the mapping of canonical IDs for resources
  875. // to the resources that should be loaded for controls.
  876. //
  877. // a client will CoCreate this object, and call IPersistFile::Load to specify the URL
  878. // to a XML file which contains the mapping. then whe the client is read to start
  879. // mapping resources they do the following:
  880. //
  881. // // from the resource map, pick up the defn for a wizard with the id 'WebPublishing'
  882. // LoadResourceMap(L"wizard", L"WebPublishing");
  883. //
  884. // // load the caption resource from that defn
  885. // LoadString(NULL, L"caption"), szBuffer, ARRAYSIZE(szBuffer))
  886. //
  887. // resources can also be scoped on a particular sub-resource (eg. a dialog in a particular
  888. // map). this is achived by selecting a scope for the resources, eg:
  889. //
  890. // // select the dialog 'welcome' from the current resource map
  891. // IXMLDOMNode *pdn;
  892. // hr = SelectResourceScope(L"dialog", L"welcome", &pdn);
  893. // if (SUCCEEDED(hr))
  894. // {
  895. // // load the caption string
  896. // LoadString(pdn, L"caption", szBuffer, ARRAYSIZE(szBuffer))
  897. // }
  898. [
  899. uuid(9c50a798-5d90-4130-83da-38da83456711),
  900. helpstring("Resource Mapping Object"),
  901. local
  902. ]
  903. interface IResourceMap : IUnknown
  904. {
  905. HRESULT LoadResourceMap([in, string] LPCWSTR pszResourceClass, [in, string] LPCWSTR pszID);
  906. HRESULT SelectResourceScope([in, string] LPCWSTR pszResourceType, [in, string] LPCWSTR pszID, [in, out] IXMLDOMNode **ppdnScope);
  907. HRESULT LoadString([in] IXMLDOMNode *pdnScope, [in, string] LPCWSTR pszID, [in, out] LPWSTR pszBuffer, [in] int cch);
  908. HRESULT LoadBitmap([in] IXMLDOMNode *pdnScope, [in, string] LPCWSTR pszID, [in, out] HBITMAP *pbm);
  909. };
  910. cpp_quote("#define SID_ResourceMap IID_IResourceMap")
  911. cpp_quote("#define HNET_SHARECONNECTION 0x00000001")
  912. cpp_quote("#define HNET_FIREWALLCONNECTION 0x00000002")
  913. cpp_quote("#define HNET_SHAREPRINTERS 0x00000004")
  914. cpp_quote("#define HNET_SETCOMPUTERNAME 0x00000008")
  915. cpp_quote("#define HNET_SETWORKGROUPNAME 0x00000010")
  916. cpp_quote("#define HNET_SHAREFOLDERS 0x00000020")
  917. cpp_quote("#define HNET_BRIDGEPRIVATE 0x00000040")
  918. cpp_quote("#define HNET_ICSCLIENT 0x00000080 // Only on W9x")
  919. cpp_quote("#define HNET_LOG 0x80000000 // Output results to a log file before configuring homenet (TODO)")
  920. [
  921. object,
  922. uuid(543c4fa4-52dd-421a-947a-4d7f92b8860a), // IID_IHomeNetworkWizard
  923. pointer_default(unique)
  924. ]
  925. interface IHomeNetworkWizard : IUnknown
  926. {
  927. HRESULT ConfigureSilently(LPCWSTR pszPublicConnection, DWORD hnetFlags, BOOL* pfRebootRequired);
  928. HRESULT ShowWizard(HWND hwndParent, BOOL* pfRebootRequired);
  929. };
  930. [
  931. helpstring("Shell Namespace enumerator"),
  932. uuid(70629033-e363-4a28-a567-0db78006e6d7),
  933. object,
  934. pointer_default(unique)
  935. ]
  936. interface IEnumShellItems : IUnknown
  937. {
  938. HRESULT Next(
  939. [in] ULONG celt,
  940. [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
  941. [out] ULONG *pceltFetched);
  942. HRESULT Skip([in] ULONG celt);
  943. HRESULT Reset();
  944. HRESULT Clone([out] IEnumShellItems **ppenum);
  945. };
  946. [
  947. helpstring("IParentAndItem"),
  948. uuid(b3a4b685-b685-4805-99d9-5dead2873236), // IID_IParentAndItem
  949. object,
  950. pointer_default(unique)
  951. ]
  952. interface IParentAndItem : IUnknown
  953. {
  954. // 2 ways to init
  955. // pidlParent == NULL
  956. // psf is folder, pidlChild is child relative to psf
  957. HRESULT SetParentAndItem([in] LPCITEMIDLIST pidlParent, [in] IShellFolder *psf, [in] LPCITEMIDLIST pidlChild);
  958. // all params optional
  959. // ppidlParent gets full pidl to parent of item
  960. // ppsf gets parent folder for item
  961. // ppidlChild gets item relitve to psf
  962. HRESULT GetParentAndItem([out] LPITEMIDLIST *ppidlParent, [out] IShellFolder **ppsf, [out] LPITEMIDLIST *ppidlChild);
  963. };
  964. // BindHandler GUIDs for IShellItemArray::BindToHandler (defined in shlguid.h)")
  965. // BHID_DataObject Ask shellItemArray for its Dataobject")
  966. [
  967. helpstring("Shell Item Container"),
  968. uuid(787F8E92-9837-4011-9F83-7DE593BDC002),
  969. object,
  970. pointer_default(unique)
  971. ]
  972. interface IShellItemArray : IUnknown
  973. {
  974. typedef [v1_enum] enum
  975. {
  976. SIATTRIBFLAGS_AND = 0x00000001, // if multiple items and the attirbutes together.
  977. SIATTRIBFLAGS_OR = 0x00000002, // if multiple items or the attributes together.
  978. SIATTRIBFLAGS_APPCOMPAT = 0x00000003, // Call GetAttributes directly on the ShellFolder for multiple attributes
  979. SIATTRIBFLAGS_MASK = 0x00000003,
  980. } SIATTRIBFLAGS;
  981. HRESULT BindToHandler(
  982. [in] IBindCtx *pbc,
  983. [in] REFGUID rbhid,
  984. [in] REFIID riid,
  985. [out, iid_is(riid)] void **ppvOut);
  986. HRESULT GetAttributes(
  987. [in] SIATTRIBFLAGS dwAttribFlags,
  988. [in] SFGAOF sfgaoMask,
  989. [out] SFGAOF *psfgaoAttribs);
  990. HRESULT GetCount(
  991. [out] DWORD *pdwNumItems);
  992. HRESULT GetItemAt(
  993. [in] DWORD dwIndex,
  994. [out] IShellItem **ppsi);
  995. HRESULT EnumItems(
  996. [out] IEnumShellItems **ppenumShellItems);
  997. };
  998. [
  999. uuid(198a5f2d-e19f-49ea-9033-c975e0f376ec),
  1000. object,
  1001. ]
  1002. interface IItemHandler : IPersist
  1003. {
  1004. HRESULT SetItem(IShellItem *psi);
  1005. HRESULT GetItem(IShellItem **ppsi);
  1006. };
  1007. [
  1008. helpstring("IShellFolderNames"),
  1009. uuid(6cd8f9cc-dfe7-48f2-a60a-3831e26af734),
  1010. object,
  1011. pointer_default(unique)
  1012. ]
  1013. interface IShellFolderNames : IUnknown
  1014. {
  1015. [v1_enum] enum
  1016. {
  1017. SIPDNF_FROMEDITING = 0x00000001,
  1018. };
  1019. typedef UINT SIPDNF;
  1020. HRESULT ParseIncremental(
  1021. [in] SIPDNF flags,
  1022. [in, string] LPCOLESTR pszName,
  1023. [in] IBindCtx *pbc,
  1024. [out] LPITEMIDLIST *ppidl,
  1025. [out] UINT *pcchNext);
  1026. HRESULT GetDisplayName(
  1027. [in] LPCITEMIDLIST pidl,
  1028. [in] SIGDN sigdnName,
  1029. [out, string] LPOLESTR *ppszName);
  1030. };
  1031. [
  1032. helpstring("IFolderItemsView"),
  1033. uuid(0be044ca-f8a3-49b8-bdb2-5f5319e9de89),
  1034. object,
  1035. pointer_default(unique)
  1036. ]
  1037. interface IFolderItemsView : IUnknown
  1038. {
  1039. HRESULT GetCurrentViewMode([out] UINT *pViewMode);
  1040. HRESULT SetCurrentViewMode([in] UINT ViewMode);
  1041. HRESULT GetFolder([in] REFIID riid, [out, iid_is(riid)] void **ppv);
  1042. HRESULT GetFolderItem([out] IShellItem **ppsiFolder);
  1043. HRESULT ItemCount([in] UINT *pcItems);
  1044. HRESULT EnumItems([out] IEnumShellItems **ppenum);
  1045. HRESULT SelectedItemCount([out] UINT *pcSelected);
  1046. HRESULT EnumSelectedItems([out] IEnumShellItems **ppenum);
  1047. // view index based methods
  1048. HRESULT Item([in] int iViewIndex, [out] IShellItem **ppsi);
  1049. HRESULT ItemIndex([in] IShellItem *psi, [out] int *piViewIndex);
  1050. // uses IShellView, SVSI_ flags
  1051. HRESULT SelectItem([in] int iViewIndex, [in] SVSIF svsif);
  1052. // index of item with SVSI_SELECTIONMARK
  1053. HRESULT SelectionMark([in] int *piViewIndex);
  1054. };
  1055. [
  1056. helpstring("Assist legacy applications to use IShellItem"),
  1057. uuid(679d9e36-f8f9-11d2-8deb-00c04f6837d5),
  1058. object,
  1059. ]
  1060. interface ILocalCopy : IUnknown
  1061. {
  1062. // flags for ILocalCopy methods")
  1063. // LCDOWN_READONLY read only helper, Upload() fails with E_ACCESSDENIED")
  1064. // LCDOWN_SAVEAS write only helper, no download required for Download()")
  1065. // LC_FORCEROUNDTRIP never use local cache (always roundtrip both Upload() and Download())")
  1066. enum
  1067. {
  1068. LCDOWN_READONLY = 0x00000001,
  1069. LC_SAVEAS = 0x00000002,
  1070. LC_FORCEROUNDTRIP = 0x00000010,
  1071. };
  1072. typedef DWORD LCFLAGS;
  1073. HRESULT Download([in] LCFLAGS flags, [in] IBindCtx *pbc, [out, string] LPWSTR *ppszPath);
  1074. HRESULT Upload([in] LCFLAGS flags, [in] IBindCtx *pbc);
  1075. };
  1076. [
  1077. uuid(985F64F0-D410-4E02-BE22-DA07F2B5C5E1),
  1078. object,
  1079. pointer_default(unique)
  1080. ]
  1081. interface IDefViewFrame3 : IUnknown
  1082. {
  1083. // for borrowing/returning the listview
  1084. HRESULT GetWindowLV(HWND * phwnd);
  1085. HRESULT ShowHideListView(); // must call before returning from function that called GetWindowLV2!!!
  1086. HRESULT OnResizeListView();
  1087. HRESULT ReleaseWindowLV();
  1088. // to help with context menu operations on the listview
  1089. HRESULT DoRename(); // REVIEW: needs QueryRename() and needs to be on a different interface (IContextMenuUIHelper? has to be able to be a different object than IContextMenuSite...)
  1090. };
  1091. cpp_quote("#define DS_BACKUPDISPLAYCPL 0x00000001")
  1092. [
  1093. uuid(610d76de-7861-4715-9d08-b6e297c3985b),
  1094. helpstring("For enumerating and displaying display settings"),
  1095. local
  1096. ]
  1097. interface IDisplaySettings : IUnknown
  1098. {
  1099. HRESULT SetMonitor([in] DWORD dwMonitor);
  1100. HRESULT GetModeCount([out] DWORD* pdwCount, [in] BOOL fOnlyPreferredModes);
  1101. HRESULT GetMode([in] DWORD dwMode, [in] BOOL fOnlyPreferredModes, [out] DWORD* pdwWidth, [out] DWORD* pdwHeight, [out] DWORD* pdwColor);
  1102. HRESULT SetSelectedMode([in] HWND hwnd, [in] DWORD dwWidth, [in] DWORD dwHeight, [in] DWORD dwColor, [out] BOOL* pfApplied, [in] DWORD dwFlags);
  1103. HRESULT GetSelectedMode([out] DWORD* pdwWidth, [out] DWORD* pdwHeight, [out] DWORD* pdwColor);
  1104. HRESULT GetAttached([out] BOOL* pfAttached);
  1105. HRESULT SetPruningMode([in] BOOL fIsPruningOn);
  1106. HRESULT GetPruningMode([out] BOOL* pfCanBePruned, [out] BOOL* pfIsPruningReadOnly, [out] BOOL* pfIsPruningOn);
  1107. };
  1108. [
  1109. uuid(b80df3d8-82db-4e8d-8097-8c2c0e746470),
  1110. helpstring("For getting around IDLs default interface requirement"),
  1111. local
  1112. ]
  1113. interface IScreenResFixer : IUnknown
  1114. {
  1115. };
  1116. typedef struct tagTREEWALKERSTATS {
  1117. int nFiles; // number of files we have seen
  1118. int nFolders; // number of folders we have seen (does not include the root)
  1119. int nDepth; // the current depth
  1120. DWORD dwClusterSize; // cluster size of the disk we are currently on
  1121. ULONGLONG ulTotalSize; // total size of all files we have seen
  1122. ULONGLONG ulActualSize; // total size on disk of all files, taking into account compression, sparse files, and cluster slop
  1123. } TREEWALKERSTATS;
  1124. // All callbacks receives fully-qualified paths to the item found, being
  1125. // entered, being left, etc.
  1126. //
  1127. // Return values for all methods:
  1128. // S_OK -- Normal, continue processing files, skip the problem file in error case
  1129. // S_FALSE -- Conitnue but quit the current directory
  1130. // E_NOTIMPL -- same as S_OK
  1131. // E_* -- Stop right away.
  1132. [
  1133. uuid(95CE8411-7027-11D1-B879-006008059382),
  1134. helpstring("The callback interface for IShellTreeWalker"),
  1135. ]
  1136. interface IShellTreeWalkerCallBack : IUnknown
  1137. {
  1138. HRESULT FoundFile([in, string] LPCWSTR pwszPath, [in] TREEWALKERSTATS *ptws, [in] WIN32_FIND_DATAW * pwfd);
  1139. HRESULT EnterFolder([in, string] LPCWSTR pwszPath, [in] TREEWALKERSTATS *ptws, [in] WIN32_FIND_DATAW * pwfd);
  1140. HRESULT LeaveFolder([in, string] LPCWSTR pwszPath, [in] TREEWALKERSTATS *ptws);
  1141. HRESULT HandleError([in, string] LPCWSTR pwszPath, [in] TREEWALKERSTATS *ptws, [in] HRESULT hrError);
  1142. };
  1143. [
  1144. uuid(95CE8410-7027-11D1-B879-006008059382),
  1145. helpstring("The common File System tree traversal interface in shell"),
  1146. ]
  1147. interface IShellTreeWalker : IUnknown
  1148. {
  1149. enum
  1150. {
  1151. WT_FOLDERFIRST = 0x00000001, // default to files first
  1152. WT_MAXDEPTH = 0x00000002, // specify the maximum depth we go into
  1153. WT_FOLDERONLY = 0x00000004, // only walks directories: default is to only return files
  1154. WT_NOTIFYFOLDERENTER = 0x00000008, // notifies whenever entering a folder :default is to notify on every file
  1155. WT_NOTIFYFOLDERLEAVE = 0x00000010, // notifies whenever leaving a folder
  1156. WT_GOINTOREPARSEPOINT = 0x00000020, // default is to stop at any reparse points
  1157. WT_EXCLUDEWALKROOT = 0x00000040, // default is to EnterFolder the starting point
  1158. WT_ALL = 0x0000007F, // ;internal
  1159. };
  1160. typedef DWORD STWFLAGS;
  1161. // dwFlags -- search flags: details above
  1162. // pwszWalkRoot -- the root directory to start from
  1163. // pwszWalkSpec -- the spec used to match files
  1164. // iMaxDepth -- maximum depth to go into
  1165. // pstwcb -- pointer to the callback interface
  1166. //
  1167. // Return Value:
  1168. // S_OK -- succeeded
  1169. // E_* -- failed
  1170. HRESULT WalkTree([in] DWORD dwFlags, [in, string] LPCWSTR pwszWalkRoot, [in, string] LPCWSTR pwszWalkSpec, [in] int iMaxPath, [in] IShellTreeWalkerCallBack * pstwcb);
  1171. };
  1172. cpp_quote("_inline void FreeIDListArray(LPITEMIDLIST *ppidls, UINT cItems)")
  1173. cpp_quote("{ ")
  1174. cpp_quote(" UINT i; ")
  1175. cpp_quote(" for (i = 0; i < cItems; i++) ")
  1176. cpp_quote(" { ")
  1177. cpp_quote(" CoTaskMemFree(ppidls[i]); ")
  1178. cpp_quote(" } ")
  1179. cpp_quote(" CoTaskMemFree(ppidls); ")
  1180. cpp_quote("} ")
  1181. [
  1182. uuid(EC6FE84F-DC14-4FBB-889F-EA50FE27FE0F),
  1183. pointer_default(unique)
  1184. ]
  1185. interface IUIElement : IUnknown
  1186. {
  1187. HRESULT get_Name([in] IShellItemArray *psiItemArray, [out, string] LPWSTR *ppszName);
  1188. HRESULT get_Icon([in] IShellItemArray *psiItemArray, [out, string] LPWSTR *ppszIcon); // we support icon resource strings like: "shell32,-123"
  1189. HRESULT get_Tooltip([in] IShellItemArray *psiItemArray, [out, string] LPWSTR *ppszInfotip);
  1190. };
  1191. typedef enum tagUISTATE
  1192. {
  1193. UIS_ENABLED = 0,
  1194. UIS_DISABLED = 1,
  1195. UIS_HIDDEN = 2
  1196. } UISTATE;
  1197. [
  1198. uuid(4026DFB9-7691-4142-B71C-DCF08EA4DD9C),
  1199. pointer_default(unique)
  1200. ]
  1201. interface IUICommand : IUIElement
  1202. {
  1203. HRESULT get_CanonicalName([out] GUID* pguidCommandName);
  1204. HRESULT get_State([in] IShellItemArray *psiItemArray, [in] BOOL fOkToBeSlow, [out] UISTATE* puisState);
  1205. HRESULT Invoke([in] IShellItemArray *psiItemArray, [in, optional] IBindCtx *pbc);
  1206. };
  1207. [
  1208. uuid(869447DA-9F84-4E2A-B92D-00642DC8A911),
  1209. pointer_default(unique)
  1210. ]
  1211. interface IEnumUICommand : IUnknown
  1212. {
  1213. HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] IUICommand** pUICommand, [out] ULONG *pceltFetched);
  1214. HRESULT Skip([in] ULONG celt);
  1215. HRESULT Reset();
  1216. HRESULT Clone([out] IEnumUICommand **ppenum);
  1217. };
  1218. [
  1219. uuid(2CB95001-FC47-4064-89B3-328F2FE60F44),
  1220. pointer_default(unique)
  1221. ]
  1222. interface IUICommandTarget : IUnknown
  1223. {
  1224. HRESULT get_Name([in] REFGUID guidCanonicalName, [in] IShellItemArray *psiItemArray, [out, string] LPWSTR *ppszName);
  1225. HRESULT get_Icon([in] REFGUID guidCanonicalName, [in] IShellItemArray *psiItemArray, [out, string] LPWSTR *ppszIcon); // we support icon resource strings like: "shell32,-123"
  1226. HRESULT get_Tooltip([in] REFGUID guidCanonicalName, [in] IShellItemArray *psiItemArray, [out, string] LPWSTR *ppszInfotip);
  1227. HRESULT get_State([in] REFGUID guidCanonicalName, [in] IShellItemArray *psiItemArray, [out] UISTATE* puisState);
  1228. HRESULT Invoke([in] REFGUID guidCanonicalName, [in] IShellItemArray *psiItemArray, [in, optional] IBindCtx *pbc);
  1229. };
  1230. interface ITransferDest;
  1231. typedef GUID STGTRANSCONFIRMATION, *LPSTGTRANSCONFIRMATION;
  1232. // Custom Confirmation
  1233. //
  1234. // Contains the information required to display a custom confirmation. In addition
  1235. // to this information, data about the item as obtained from the STATSTG structure
  1236. // can also be used.
  1237. typedef struct tagCUSTOMCONFIRMATION
  1238. {
  1239. DWORD cbSize; // sizeof this structure
  1240. DWORD dwFlags; // CCF_*flags to controll what is displayed
  1241. DWORD dwButtons; // CCB_*value that determines what options are valid responses
  1242. LPWSTR pwszTitle; // The title of this confirmation, for example what would be used as a dialog title.
  1243. LPWSTR pwszDescription; // The description of problem being confirmed
  1244. HICON hicon; // OPTIONAL. If provided, the icon is displayed as an indication of what type of operation is being confirmed
  1245. LPWSTR pwszAdvancedDetails; // OPTIONAL. If provided, contains further details about what is being confirmed.
  1246. } CUSTOMCONFIRMATION, *LPCUSTOMCONFIRMATION;
  1247. // Implementing this interface implies that your storage is filesystem
  1248. // based. If the source and destination are both filesystem based then
  1249. // moves and copies can be done using win32 filesystem APIs.
  1250. [
  1251. object,
  1252. uuid(E820910B-1910-404D-AFAF-5D7298B9B28D),
  1253. helpstring("IFileSystemStorage"),
  1254. pointer_default(unique)
  1255. ]
  1256. interface IFileSystemStorage : IUnknown
  1257. {
  1258. // Returns the full filesystem path to the stogage
  1259. HRESULT GetPath([out] WCHAR *pszName, [in] DWORD cch);
  1260. HRESULT GetAttributes([in, string] const WCHAR *pszName, [in] DWORD dwMask, [out] DWORD *pdwAttribs);
  1261. };
  1262. //-------------------------------------------------------------------------
  1263. //
  1264. // IStorageProcessor interface
  1265. //
  1266. //
  1267. // [Member functions]
  1268. //
  1269. // IStorageProcessor::Run(pstgSrc, pstgDest, dwOperation, dwOptions)
  1270. // Launches an operation on the specified storage(s).
  1271. //
  1272. //-------------------------------------------------------------------------
  1273. // Storage operation tags.
  1274. typedef [v1_enum] enum tagSTGOP
  1275. {
  1276. STGOP_MOVE = 1,
  1277. STGOP_COPY = 2,
  1278. STGOP_SYNC = 3,
  1279. STGOP_DIFF = 4,
  1280. STGOP_REMOVE = 5,
  1281. STGOP_RENAME = 6,
  1282. STGOP_STATS = 7,
  1283. STGOP_COPY_PREFERHARDLINK = 8,
  1284. } STGOP, *LPSTGOP;
  1285. // Options governing the overall operation
  1286. typedef [v1_enum] enum tagSTGPROCOPTIONS
  1287. {
  1288. STOPT_ROOTONLY = 0x00000004, // Operation applies only and directly to the root
  1289. STOPT_NOCONFIRMATIONS = 0x00000008, // No confirmations at all
  1290. STOPT_NOPROGRESSUI = 0x00000010, // No default progress UI
  1291. STOPT_NOSTATS = 0x00000020, // no stats calculations
  1292. } STGPROCOPTIONS, *LPSTGPROCOPTIONS;
  1293. // dynamic storage object, used for collecting items before passing to the storage
  1294. // transfer engine.
  1295. [
  1296. helpstring("Interface to in-memory bundle PIDLs, IStreams, IStorages"),
  1297. uuid(c7bfc3d0-8939-4d9d-8973-654099329956),
  1298. object,
  1299. ]
  1300. interface IDynamicStorage : IUnknown
  1301. {
  1302. typedef [v1_enum] enum
  1303. {
  1304. DSTGF_NONE = 0x0,
  1305. DSTGF_ALLOWDUP = 0x1,
  1306. } DSTGF;
  1307. HRESULT AddIDList([in] DWORD cpidl, [in, size_is(cpidl)] LPITEMIDLIST* rgpidl, DSTGF dstgf);
  1308. HRESULT BindToItem([in, string] LPCWSTR pwszName, [in] REFIID riid, [out, iid_is(riid)] void **ppv);
  1309. HRESULT EnumItems([out] IEnumShellItems **ppesi);
  1310. };
  1311. //-------------------------------------------------------------------------
  1312. //
  1313. // ITransferAdviseSink interface
  1314. //
  1315. //-------------------------------------------------------------------------
  1316. // ITransferAdviseSink response codes
  1317. cpp_quote("#define STRESPONSE_CONTINUE S_OK")
  1318. cpp_quote("#define STRESPONSE_RENAME MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 20)")
  1319. cpp_quote("#define STRESPONSE_SKIP MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 21)")
  1320. cpp_quote("#define STRESPONSE_CANCEL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 22)")
  1321. cpp_quote("#define STRESPONSE_RETRY HRESULT_FROM_WIN32(ERROR_RETRY)")
  1322. [
  1323. object,
  1324. uuid(D082C196-A2B2-41ff-A5E5-80EFF91B7D79),
  1325. helpstring("ITransferAdviseSink"),
  1326. pointer_default(unique)
  1327. ]
  1328. interface ITransferAdviseSink : IQueryContinue
  1329. {
  1330. // Before an operation such as a copy, move, or delete is about
  1331. // to be performed the storage will advise the sink via this method.
  1332. HRESULT PreOperation ( [in] const STGOP op,
  1333. [in] IShellItem *psiItem,
  1334. [in] IShellItem *psiDest);
  1335. // When the storage believes that user confirmation or acknowledgement
  1336. // is required, it asks the advise to seek it via this method.
  1337. // pwszItem is [in,out] non-const because rename can massage the name.
  1338. HRESULT ConfirmOperation( [in] IShellItem *psiItem,
  1339. [in] IShellItem *psiDest,
  1340. [in] STGTRANSCONFIRMATION stc,
  1341. [in, unique] LPCUSTOMCONFIRMATION pcc);
  1342. // As the operation (copy, move, etc) proceeds the storage calls
  1343. // this method on the sink. There is no guarantee of service but
  1344. // intervals of one second between updates are ideal.
  1345. HRESULT OperationProgress( [in] const STGOP op,
  1346. [in] IShellItem *psiItem,
  1347. [in] IShellItem *psiDest,
  1348. [in] ULONGLONG ulTotal,
  1349. [in] ULONGLONG ulComplete);
  1350. // When an operation is complete or if it is aborted the storage advises
  1351. // the sink via this method and provides the final status (S_OK, failure,
  1352. // etc) of the task. Certain operations can provide extra information
  1353. // describing the results, such as when a file is renamed on a copy collision.
  1354. HRESULT PostOperation( [in] const STGOP op,
  1355. [in] IShellItem *psiItem,
  1356. [in] IShellItem *psiDest,
  1357. [in] HRESULT hrResult);
  1358. }
  1359. //-------------------------------------------------------------------------
  1360. //
  1361. // ITransferDest interface
  1362. //
  1363. //-------------------------------------------------------------------------
  1364. cpp_quote("#define STGX_MOVE_MOVE 0x00000000")
  1365. cpp_quote("#define STGX_MOVE_COPY 0x00000001")
  1366. cpp_quote("#define STGX_MOVE_ONLYIFEXISTS 0x00000002 // Only perform if target already exists")
  1367. cpp_quote("#define STGX_MOVE_ATOMIC 0x00000004 // Operation must be immediate, all-or-nothing. If a storage must be walked and each sub-element moved/copied that is not atomic, but if the entire storage can be moved/copied in one step that is atomic. If a move must be done as a seperate copy and a delete that is not atomic.")
  1368. cpp_quote("#define STGX_MOVE_TESTONLY 0x00000008 // Test whether operation is valid only, do not perform. Useful in testing for ATOMIC before trying an operation.")
  1369. cpp_quote("#define STGX_MOVE_NORECURSION 0x00000010 // When moving/copying storages, do not move/copy their contents")
  1370. cpp_quote("#define STGX_MOVE_FORCE 0x00001000")
  1371. cpp_quote("#define STGX_MOVE_PREFERHARDLINK 0x00002000 // default to hard linking instead of a full file copy/move")
  1372. typedef DWORD STGXMOVE;
  1373. cpp_quote("#define STGX_MODE_READ 0x00000000L")
  1374. cpp_quote("#define STGX_MODE_WRITE 0x00000001L")
  1375. cpp_quote("#define STGX_MODE_READWRITE 0x00000002L")
  1376. cpp_quote("#define STGX_MODE_ACCESSMASK 0x0000000FL")
  1377. cpp_quote("#define STGX_MODE_SHARE_DENY_NONE 0x00000040L")
  1378. cpp_quote("#define STGX_MODE_SHARE_DENY_READ 0x00000030L")
  1379. cpp_quote("#define STGX_MODE_SHARE_DENY_WRITE 0x00000020L")
  1380. cpp_quote("#define STGX_MODE_SHARE_EXCLUSIVE 0x00000010L")
  1381. cpp_quote("#define STGX_MODE_SHAREMASK 0x000000F0L")
  1382. cpp_quote("#define STGX_MODE_OPEN 0x00000100L // default is to open an existing item and fail if its not there")
  1383. cpp_quote("#define STGX_MODE_CREATE 0x00000200L // Create a new item. If an old item has the same name delete it first.")
  1384. cpp_quote("#define STGX_MODE_FAILIFTHERE 0x00000400L // Use with CREATE. Create a new item but fail if an item with that name already exists.")
  1385. cpp_quote("#define STGX_MODE_OPENEXISTING 0x00000800L // Use with CREATE. If the item already exists open the item, otherwise create the item.")
  1386. cpp_quote("#define STGX_MODE_CREATIONMASK 0x00000F00L")
  1387. cpp_quote("#define STGX_MODE_FORCE 0x00001000")
  1388. typedef DWORD STGXMODE;
  1389. cpp_quote("#define STGX_DESTROY_FORCE 0x00001000")
  1390. typedef DWORD STGXDESTROY;
  1391. typedef [v1_enum] enum tagSTGXTYPE
  1392. {
  1393. STGX_TYPE_ANY = 0x00000000L,
  1394. STGX_TYPE_STORAGE = 0x00000001L,
  1395. STGX_TYPE_STREAM = 0x00000002L,
  1396. } STGXTYPE;
  1397. cpp_quote("#define STGX_E_INCORRECTTYPE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_STORAGE, 0x300) // Tried to open a storage/stream but a stream.storage with the same name already exists")
  1398. cpp_quote("#define STGX_E_NOADVISESINK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_STORAGE, 0x301) // Needed to confirm something but no advise sink was set")
  1399. cpp_quote("#define STGX_E_CANNOTRECURSE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_STORAGE, 0x302) // A move or copy of a storage failed to recurse. The storage itself was copied, but none of its contents were.")
  1400. [
  1401. object,
  1402. uuid(9FE3A135-2915-493b-A8EE-3AB21982776C),
  1403. helpstring("ITransferDest"),
  1404. pointer_default(unique)
  1405. ]
  1406. interface ITransferDest : IUnknown
  1407. {
  1408. HRESULT Advise(
  1409. [in] ITransferAdviseSink *pAdvise,
  1410. [out,retval] DWORD *pdwCookie);
  1411. HRESULT Unadvise([in] DWORD dwCookie);
  1412. // Create or open an element, either storage or stream
  1413. HRESULT OpenElement(
  1414. [in, string] const WCHAR *pwcsName,
  1415. [in] STGXMODE grfMode,
  1416. [in, out] DWORD *pdwType,
  1417. [in] REFIID riid,
  1418. [out, iid_is(riid)] void **ppunk);
  1419. HRESULT CreateElement(
  1420. [in, string] const WCHAR *pwcsName,
  1421. [in] IShellItem *psiTemplate,
  1422. [in] STGXMODE grfMode,
  1423. [in] DWORD dwType,
  1424. [in] REFIID riid,
  1425. [out, iid_is(riid)] void **ppunk);
  1426. // Move or copy an element, either storage or stream
  1427. HRESULT MoveElement(
  1428. [in] IShellItem *psiItem, // item to be moved (source)
  1429. [in, string] WCHAR *pwcsNewName, // Pointer to new name of element in destination
  1430. [in] STGXMOVE grfOptions); // Options (STGMOVEEX_ enum)
  1431. HRESULT DestroyElement(
  1432. [in, string] const WCHAR *pwcsName,
  1433. [in] STGXDESTROY grfOptions);
  1434. //HRESULT RenameElement( is this really necessary? We can OpenElements IShellItem and do whatever we want
  1435. // [in, string] const WCHAR *pwcsName,
  1436. // [in, string] const WCHAR *pwcsNewName);
  1437. };
  1438. [
  1439. object,
  1440. uuid(5AE334C5-06DD-4321-B44F-63B1D23F2E57),
  1441. helpstring("IStorageProcessor"),
  1442. pointer_default(unique)
  1443. ]
  1444. interface IStorageProcessor : IUnknown
  1445. {
  1446. HRESULT Advise(
  1447. [in] ITransferAdviseSink *pAdvise,
  1448. [out,retval] DWORD *dwCookie);
  1449. HRESULT Unadvise(
  1450. [in] DWORD dwCookie);
  1451. HRESULT Run([in] IEnumShellItems *penum,
  1452. [in] IShellItem *psiDest,
  1453. [in] STGOP dwOperation,
  1454. [in] DWORD dwOptions);
  1455. HRESULT SetProgress([in] IActionProgress *pap);
  1456. };
  1457. // Custom Confirmation Flags
  1458. //
  1459. // For use in the dwFlags member of a CUSTOMCONFIRMATION struct.
  1460. cpp_quote("#define CCF_SHOW_SOURCE_INFO 0x00000001 // if set, information about the source will be shown. Information will be gotten from IShellFolder if possible, or a STATSTG structure otherwise.")
  1461. cpp_quote("#define CCF_SHOW_DESTINATION_INFO 0x00000002 // If set, information about the destination will be shown. Information will be gotten from IShellFolder if possible, or a STATSTG structure otherwise.")
  1462. cpp_quote("#define CCF_USE_DEFAULT_ICON 0x00000004 // If set, hicon is ignored and a default is selected based on the current operation.")
  1463. // Custom Confirmation Buttons
  1464. //
  1465. // For use in the dwButtons member of a CUSTOMCONFIRMATION struct.
  1466. cpp_quote("#define CCB_YES_SKIP_CANCEL 1")
  1467. cpp_quote("#define CCB_RENAME_SKIP_CANCEL 2")
  1468. cpp_quote("#define CCB_YES_SKIP_RENAME_CANCEL 3")
  1469. cpp_quote("#define CCB_RETRY_SKIP_CANCEL 4")
  1470. cpp_quote("#define CCB_OK 5")
  1471. // Confirmation Response.
  1472. //
  1473. // These are the possible results that IStgTransConfirmation::Confirm can return.
  1474. typedef [v1_enum] enum tagCONFIRMATIONRESPONSE
  1475. {
  1476. CONFRES_CONTINUE = 0x00000000, // When warned of side effects, user said "Yes, do it anyway"
  1477. CONFRES_SKIP = 0x00000001, // Skip the current item, but continue with any other items if possible
  1478. CONFRES_RETRY = 0x00000002, // Retry the given operation because the user has made some extrenal change that should effect the outcome
  1479. CONFRES_RENAME = 0x00000003, // Try the operation again, but use a different name for the destination (i.e. rename on collision or truncate name on "path to long
  1480. CONFRES_CANCEL = 0x00000004, // Cancel this and all further operations
  1481. CONFRES_UNDO = 0x00000005, // Cancel the current operation and undo any operations already completed if possible. If undo is unavailable, treat like "cancel".
  1482. } CONFIRMATIONRESPONSE, *LPCONFIRMATIONRESPONSE;
  1483. // Describes the source, destination, and operation that needs to be confirmed
  1484. typedef struct tagCONFIRMOP
  1485. {
  1486. STGOP dwOperation; // the type of operation requiring a confirmation (i.e. STGOP_*value)
  1487. STGTRANSCONFIRMATION stc; // the condition that needs to be confirmed
  1488. CUSTOMCONFIRMATION *pcc; // OPTIONAL: If non-NULL, points to custom information to be displayed in the confirmation. Must be provided if a custom STGTRANSCONFIRMATION is provided.
  1489. UINT cRemaining; // the count of operations remaining after the operation being confirmed.
  1490. IShellItem *psiItem; // the sorce
  1491. IShellItem *psiDest; // the destination, or destination item in case target already exists
  1492. LPCWSTR pwszRenameTo; // used only during "rename" confirmations, contains the new target name
  1493. IUnknown *punkSite; // the parent site for the dialog we will create
  1494. } CONFIRMOP, *PCONFIRMOP;
  1495. [
  1496. object,
  1497. uuid(FC45985F-07F8-48E3-894C-7DEE8ED66EE5),
  1498. helpstring("ITransferConfirmation Interface"),
  1499. pointer_default(unique)
  1500. ]
  1501. interface ITransferConfirmation : IUnknown
  1502. {
  1503. // Warns of any side effects and confirms that the operation should proceed.
  1504. HRESULT Confirm([in] CONFIRMOP *pcop, [out] LPCONFIRMATIONRESPONSE pcr, [out] BOOL *pbAll);
  1505. };
  1506. [
  1507. uuid(c3d92d66-68ad-4b2a-86f5-4dfe97fbd2c7),
  1508. helpstring("private helpers for cd burning"),
  1509. ]
  1510. interface ICDBurnPriv : IUnknown
  1511. {
  1512. HRESULT GetMediaCapabilities([out] DWORD *pdwCaps, [out] BOOL *pfUDF);
  1513. HRESULT GetContentState([out] BOOL *pfStagingHasFiles, [out] BOOL *pfDiscHasFiles);
  1514. HRESULT IsWizardUp(); // S_OK means wizard is up, S_FALSE means its not.
  1515. };
  1516. [
  1517. uuid(98467961-4f27-4a1f-9629-22b06d0b5ccb),
  1518. helpstring("drive folder extension"),
  1519. ]
  1520. interface IDriveFolderExt : IUnknown
  1521. {
  1522. HRESULT DriveMatches([in] int iDrive);
  1523. HRESULT Bind([in] LPCITEMIDLIST pidl, [in] IBindCtx *pbc, [in] REFIID riid, [out, iid_is(riid)] void **ppv);
  1524. HRESULT GetSpace([out] ULONGLONG *pcbTotal, [out] ULONGLONG *pcbFree);
  1525. };
  1526. cpp_quote("#if _WIN32_IE >= 0x0600")
  1527. [
  1528. uuid(da22171f-70b4-43db-b38f-296741d1494c),
  1529. helpstring("used to modify the behavior of an IQueryInfo implementation"),
  1530. ]
  1531. interface ICustomizeInfoTip : IUnknown
  1532. {
  1533. HRESULT SetPrefixText([in, string] LPCWSTR pszPrefix);
  1534. HRESULT SetExtraProperties([in, size_is(cscid)] const SHCOLUMNID *pscid, [in] UINT cscid);
  1535. };
  1536. [
  1537. uuid(fadb55b4-d382-4fc4-81d7-abb325c7f12a),
  1538. helpstring("fades a rectangle on the screen"),
  1539. local,
  1540. ]
  1541. interface IFadeTask : IUnknown
  1542. {
  1543. HRESULT FadeRect([in] LPCRECT prc);
  1544. };
  1545. //
  1546. // If a shell folder exposes ISetFolderEnumRestriction, you can use
  1547. // SetEnumRestriction to specify bits that are always set or always cleared
  1548. // in the grfFlags parameter to IShellFolder::EnumObjects.
  1549. //
  1550. [
  1551. uuid(76347b91-9846-4ce7-9a57-69b910d16123),
  1552. local
  1553. ]
  1554. interface ISetFolderEnumRestriction : IUnknown
  1555. {
  1556. HRESULT SetEnumRestriction(DWORD dwRequired, DWORD dwForbidden);
  1557. };
  1558. cpp_quote("#endif // _WIN32_IE >= 0x0600")
  1559. [
  1560. object,
  1561. uuid(5747C63F-1DE8-423f-980F-00CB07F4C45B),
  1562. pointer_default(unique),
  1563. local
  1564. ]
  1565. interface IObjectWithRegistryKey : IUnknown
  1566. {
  1567. HRESULT SetKey([in] HKEY hk);
  1568. HRESULT GetKey([out] HKEY *phk);
  1569. }
  1570. //
  1571. // 0--| IQuerySource - direct wrapper for single HKEY
  1572. //
  1573. // IQuerySource is an abstract representation of the
  1574. // methods typically used to directly access a registry HKEY.
  1575. // This allows querying against existing keys, while not
  1576. // binding objects implemented with IQuerySource to always
  1577. // use HKEYs for all sources. IQS implementations that do
  1578. // wrap an HKEY should also expose IObjectWithRegistryKey.
  1579. //
  1580. [
  1581. object,
  1582. uuid(c7478486-7583-49e7-a6c2-faf8f02bc30e),
  1583. pointer_default(unique)
  1584. ]
  1585. interface IQuerySource : IUnknown
  1586. {
  1587. HRESULT EnumValues([out] IEnumString **ppenum);
  1588. HRESULT EnumSources([out] IEnumString **ppenum);
  1589. HRESULT QueryValueString(
  1590. [in, string] LPCWSTR pszSubSource,
  1591. [in, string] LPCWSTR pszValue,
  1592. [out, string] LPWSTR *ppsz);
  1593. HRESULT QueryValueDword(
  1594. [in, string] LPCWSTR pszSubSource,
  1595. [in, string] LPCWSTR pszValue,
  1596. [out] DWORD *pdw);
  1597. HRESULT QueryValueExists(
  1598. [in, string] LPCWSTR pszSubSource,
  1599. [in, string] LPCWSTR pszValue);
  1600. // used for Query/SetValueDirect
  1601. // in QueryValueDirect pblob->fFlags = qvt
  1602. [v1_enum] enum
  1603. {
  1604. QVT_EMPTY = 0, // REG_NONE
  1605. QVT_STRING = 1, // REG_SZ
  1606. QVT_EXPANDABLE_STRING = 2, // REG_EXPAND_SZ
  1607. QVT_BINARY = 3, // REG_BINARY
  1608. QVT_DWORD = 4, // REG_DWORD
  1609. QVT_MULTI_STRING = 7, // REG_MULTI_SZ
  1610. };
  1611. HRESULT QueryValueDirect(
  1612. [in, string] LPCWSTR pszSubSource,
  1613. [in, string] LPCWSTR pszValue,
  1614. [out] FLAGGED_BYTE_BLOB **ppblob);
  1615. HRESULT OpenSource(
  1616. [in] LPCWSTR pszSubSource,
  1617. [in] BOOL fCreate,
  1618. [out] IQuerySource **ppqs);
  1619. HRESULT SetValueDirect(
  1620. [in, string] LPCWSTR pszSubSource,
  1621. [in, string] LPCWSTR pszValue,
  1622. [in] ULONG qvt,
  1623. [in] DWORD cbData,
  1624. [in, size_is(cbData)] BYTE *pbData);
  1625. };
  1626. [
  1627. object,
  1628. uuid(3c44ba76-de0e-4049-b6e4-6b31a5262707),
  1629. pointer_default(unique)
  1630. ]
  1631. interface IPersistString2 : IPersist
  1632. {
  1633. HRESULT SetString([in, string] LPCWSTR psz);
  1634. HRESULT GetString([out, string] LPWSTR *ppsz);
  1635. };
  1636. [
  1637. object,
  1638. uuid(b3dcb623-4280-4eb1-84b3-8d07e84f299a),
  1639. pointer_default(unique)
  1640. ]
  1641. interface IObjectWithQuerySource : IUnknown
  1642. {
  1643. HRESULT SetSource([in] IQuerySource *pqs);
  1644. HRESULT GetSource([in] REFIID riid, [out, iid_is(riid)] void **ppv);
  1645. };
  1646. typedef [v1_enum] enum tagASSOCQUERY
  1647. {
  1648. // each ASSOCQUERY identifier is composed of
  1649. // HIWORD: the type and capabilities (AQF bits)
  1650. // LOWORD: the ordinal relative to its type
  1651. AQ_NOTHING = 0,
  1652. // simple queries where pszCue is unused (AQF type 0x000)
  1653. AQS_FRIENDLYTYPENAME = 0x00170000, // friendly name of the document type
  1654. AQS_DEFAULTICON = 0x00070001, // Default icon resource string call PathParseIconLocation() to use
  1655. AQS_CONTENTTYPE = 0x80070002, // MIME Content type
  1656. AQS_CLSID = 0x00070003, // CLSID associated with class
  1657. AQS_PROGID = 0x00070004, // ProgID associated with class
  1658. // simple queries where pszCue identifies the value (AQF type 0x010)
  1659. AQN_NAMED_VALUE = 0x010f0000, // querys directly for value named by pszCue
  1660. AQNS_NAMED_MUI_STRING = 0x01170001, // as ASSOCQUERY_NAMED_VALUE and loads it using MUI semantics SHLoadIndirectString()
  1661. AQNS_SHELLEX_HANDLER = 0x81070002, // ..\Shellex\%pszCue% returns a CLSID string for the value.
  1662. // queries that require delegation to the static verb element for completion, pszCue is the verb (AQF type 0x020)
  1663. AQVS_COMMAND = 0x02070000, // ...\shell\verb\command, template for CreateProcess()
  1664. AQVS_DDECOMMAND = 0x02070001, // ...\shell\verb\ddeexec, template for DDE conversation
  1665. AQVS_DDEIFEXEC = 0x02070002, // ...\shell\verb\ddeexec\ifexec, replaces DDECOMMAND after calling CreateProcess(AQVS_COMMAND)
  1666. AQVS_DDEAPPLICATION = 0x02070003, // ...\shell\verb\ddeexec\application, Application name in DDE broadcast
  1667. AQVS_DDETOPIC = 0x02070004, // ...\shell\verb\ddeexec\topic, Topic Name in DDE broadcast
  1668. AQV_NOACTIVATEHANDLER = 0x02060005, // ...\shell\verb\ddeexec!NoActivateHandler restrict attempts to activate window
  1669. AQVD_MSIDESCRIPTOR = 0x02060006, // Component Descriptor to pass to MSI APIs
  1670. AQVS_APPLICATION_PATH = 0x02010007, // path to executable
  1671. AQVS_APPLICATION_FRIENDLYNAME = 0x02170008, // friendly name of associated application
  1672. // delegate objects retrievable through QueryObject (AQF type 0x022)
  1673. AQVO_SHELLVERB_DELEGATE = 0x02200000, // CAssocShellVerbElement init'd with ...\shell\verb
  1674. AQVO_APPLICATION_DELEGATE = 0x02200001, // CAssocApplicationElement init'd with AQVS_APPLICATION_PATH
  1675. // flags that hint to the implementation the purpose of the ASSOCQUERY
  1676. AQF_STRING = 0x00010000, // supports QueryString()
  1677. AQF_EXISTS = 0x00020000, // supports QueryExists()
  1678. AQF_DIRECT = 0x00040000, // supports QueryDirect()
  1679. AQF_DWORD = 0x00080000, // supports QueryDword()
  1680. AQF_MUISTRING = 0x00100000, // supports QueryString(), but also does a SHLoadIndirectString()
  1681. AQF_OBJECT = 0x00200000, // supports QueryObject()
  1682. AQF_CUEIS_UNUSED = 0x00000000, // pszCue is unused, in IAssociation* Query methods
  1683. AQF_CUEIS_NAME = 0x01000000, // pszCue is the name of the value being queried for, in IAssociation* Query methods
  1684. AQF_CUEIS_SHELLVERB = 0x02000000, // pszCue is the Shell\Verb, in IAssociation* Query methods
  1685. AQF_QUERY_INITCLASS = 0x80000000, // for values that hang off the extension, etc.
  1686. } ASSOCQUERY;
  1687. //
  1688. // 0--| IAssociationElement - indirect wrapper for HKEY and subkeys/values
  1689. //
  1690. // IAssociationElement wraps the logic used to access values
  1691. // under an HKEY. The methods are essentially identical, just changing
  1692. // for the return type.
  1693. // * ASSOCQUERY - enum names the query for the association. the
  1694. // query's bits define what methods and return values are valid.
  1695. // NOTE - Not all ASSOCQUERY's are supported by all elements.
  1696. // * pszCue - string that is used with some queries.
  1697. // if (query & AQF_CUEIS_SHELLVERB) then pszCue is the static verb
  1698. // if (query & AQF_CUEIS_NAME) then pszCue is name for the value or subkey
  1699. //
  1700. [
  1701. object,
  1702. uuid(e58b1abf-9596-4dba-8997-89dcdef46992),
  1703. pointer_default(unique)
  1704. ]
  1705. interface IAssociationElement : IUnknown
  1706. {
  1707. HRESULT QueryString(
  1708. [in] ASSOCQUERY query,
  1709. [in, string] LPCWSTR pszCue,
  1710. [out, string] LPWSTR *ppsz);
  1711. HRESULT QueryDword(
  1712. [in] ASSOCQUERY query,
  1713. [in, string] LPCWSTR pszCue,
  1714. [out] DWORD *pdw);
  1715. HRESULT QueryExists(
  1716. [in] ASSOCQUERY query,
  1717. [in, string] LPCWSTR pszCue);
  1718. HRESULT QueryDirect(
  1719. [in] ASSOCQUERY query,
  1720. [in, string] LPCWSTR pszCue,
  1721. [out] FLAGGED_BYTE_BLOB **ppblob);
  1722. HRESULT QueryObject(
  1723. [in] ASSOCQUERY query,
  1724. [in, string] LPCWSTR pszCue,
  1725. [in] REFIID riid,
  1726. [out, iid_is(riid)] void **ppv);
  1727. };
  1728. [
  1729. object,
  1730. uuid(a6b0fb57-7523-4439-9425-ebe99823b828),
  1731. pointer_default(unique)
  1732. ]
  1733. interface IEnumAssociationElements : IUnknown
  1734. {
  1735. HRESULT Next(
  1736. [in] ULONG celt,
  1737. [out, size_is(celt), length_is(*pceltFetched)] IAssociationElement ** rgelt,
  1738. [out] ULONG *pceltFetched);
  1739. HRESULT Skip([in] ULONG celt);
  1740. HRESULT Reset();
  1741. HRESULT Clone([out] IEnumAssociationElements **ppenum);
  1742. };
  1743. [v1_enum] enum tagASSOCELEM
  1744. {
  1745. ASSOCELEM_DATA = 0x00000001, // InsertElements(ASSOCELEM_DATA)
  1746. ASSOCELEM_USER = 0x00000002, // APPLICATION or progid
  1747. ASSOCELEM_DEFAULT = 0x00000004, // ClsId or progid
  1748. ASSOCELEM_SYSTEM_EXT = 0x00000010, // HKCR\SFA\.ext
  1749. ASSOCELEM_SYSTEM_PERCEIVED = 0x00000020, // HKCR\SFA\PerceivedType
  1750. ASSOCELEM_SYSTEM = 0x00000030, // use SystemFileAssociations
  1751. ASSOCELEM_BASEIS_FOLDER = 0x00000100, // HKCR\Folder
  1752. ASSOCELEM_BASEIS_STAR = 0x00000200, // HKCR\*
  1753. ASSOCELEM_BASE = 0x00000300, // FOLDER | STAR
  1754. ASSOCELEM_EXTRA = 0x00010000, // InsertElements(ASSOCELEM_EXTRA)
  1755. ASSOCELEMF_INCLUDE_SLOW = 0x80000000, // include elements that maybe slow
  1756. ASSOCELEM_MASK_QUERYNORMAL = 0x0000FFFF,
  1757. ASSOCELEM_MASK_ENUMCONTEXTMENU = -1, // context menus usually try everything
  1758. ASSOCELEM_MASK_ALL = -1,
  1759. };
  1760. typedef DWORD ASSOCELEM_MASK;
  1761. [
  1762. object,
  1763. uuid(ee9165bf-a4d9-474b-8236-6735cb7e28b6),
  1764. pointer_default(unique)
  1765. ]
  1766. interface IAssociationArrayInitialize : IUnknown
  1767. {
  1768. HRESULT InitClassElements(
  1769. [in] ASSOCELEM_MASK maskBase, // FOLDER || STAR
  1770. [in] LPCWSTR pszClass);
  1771. HRESULT InsertElements(
  1772. [in] ASSOCELEM_MASK mask,
  1773. [in] IEnumAssociationElements *peae);
  1774. HRESULT FilterElements([in] ASSOCELEM_MASK maskInclude);
  1775. };
  1776. //
  1777. // 0--| IAssociationArray - manages querying an array of IAssociationElement's
  1778. // IAssociationArray wraps an array of objects implementing IAssociationElement.
  1779. // It calls the elements in priority order, starting with the most specific
  1780. // (ASSOCELEM_DATA) to the least specific (ASSOCELEM_EXTRA). IAssociationArray
  1781. // combined with IAssociationArrayInitialize is a superset of IQueryAssociations.
  1782. //
  1783. // Which elements are in the array and how they are initialized depends on
  1784. // how IAssociationArrayInitialize::InitClassElements() was called.
  1785. // _________________________________
  1786. // | CLSID_QueryAssociations |
  1787. // 0--| IAssociationArrayInitialize |
  1788. // 0--| IAssociationArray |
  1789. // 0--| IQueryAssociations |
  1790. // |_________________________________|
  1791. // | | ________________________________
  1792. // | | | CLSID_AssocShellElement |
  1793. // | +--<0--|IPersistString2 - initializer |
  1794. // +----<0--|IAssociationElement |
  1795. // 0--|IObjectWithQuerySource |
  1796. // |________________________________|
  1797. // | ________________________
  1798. // | | IQuerySource on HKEY |
  1799. // +-<0--|IQuerySource |
  1800. // 0--|IObjectWithRegistryKey |
  1801. // |________________________|
  1802. [
  1803. object,
  1804. uuid(3b877e3c-67de-4f9a-b29b-17d0a1521c6a),
  1805. pointer_default(unique)
  1806. ]
  1807. interface IAssociationArray : IUnknown
  1808. {
  1809. HRESULT EnumElements(
  1810. [in] ASSOCELEM_MASK mask,
  1811. [out] IEnumAssociationElements **ppeae);
  1812. HRESULT QueryString(
  1813. [in] ASSOCELEM_MASK mask,
  1814. [in] ASSOCQUERY query,
  1815. [in, string] LPCWSTR pszCue,
  1816. [out, string] LPWSTR *ppsz);
  1817. HRESULT QueryDword(
  1818. [in] ASSOCELEM_MASK mask,
  1819. [in] ASSOCQUERY query,
  1820. [in, string] LPCWSTR pszCue,
  1821. [out] DWORD *pdw);
  1822. HRESULT QueryExists(
  1823. [in] ASSOCELEM_MASK mask,
  1824. [in] ASSOCQUERY query,
  1825. [in, string] LPCWSTR pszCue);
  1826. HRESULT QueryDirect(
  1827. [in] ASSOCELEM_MASK mask,
  1828. [in] ASSOCQUERY query,
  1829. [in, string] LPCWSTR pszCue,
  1830. [out] FLAGGED_BYTE_BLOB **ppblob);
  1831. HRESULT QueryObject(
  1832. [in] ASSOCELEM_MASK mask,
  1833. [in] ASSOCQUERY query,
  1834. [in, string] LPCWSTR pszCue,
  1835. [in] REFIID riid,
  1836. [out, iid_is(riid)] void **ppv);
  1837. };
  1838. //
  1839. // IAlphaThumbnailExtractor
  1840. //
  1841. // private interface used by CFolderExtractImage
  1842. //
  1843. [
  1844. uuid(0F97F9D3-A7E2-4db7-A9B4-C540BD4B80A9),
  1845. local
  1846. ]
  1847. interface IAlphaThumbnailExtractor : IUnknown
  1848. {
  1849. HRESULT RequestAlphaThumbnail();
  1850. };
  1851. cpp_quote("#if (_WIN32_IE >= 0x0600)")
  1852. //
  1853. // IQueryPropertyFlags
  1854. //
  1855. // Private interface used by CPropStgColumns, implemented by the shmedia property storage
  1856. // Used to determine properties that are expensive to extract.
  1857. //
  1858. [
  1859. uuid(85DCA855-9B96-476d-8F35-7AF1E733CAAE),
  1860. local
  1861. ]
  1862. interface IQueryPropertyFlags : IUnknown
  1863. {
  1864. HRESULT GetFlags(const PROPSPEC *pspec, SHCOLSTATEF *pcsFlags);
  1865. };
  1866. cpp_quote("#endif // _WIN32_IE >= 0x0600)")
  1867. [
  1868. uuid(f4f1ef99-4d0e-43ca-90b6-2e30e4056975)
  1869. ]
  1870. library ShellPrivateObjects
  1871. {
  1872. // CLSID_HWEventSettings
  1873. [ uuid(5560c070-114e-4e97-929a-7e39f40debc7) ] coclass HWEventSettings { interface IAutoplayHandler; }
  1874. // CLSID_AutoplayHandlerProperties
  1875. [ uuid(11F6B41F-3BE5-4ce3-AF60-398551797DF6) ] coclass AutoplayHandlerProperties { interface IAutoplayHandlerProperties; }
  1876. // CLSID_HWDevice
  1877. [ uuid(aac41048-53e3-4867-a0aa-5fbceae7e5f5) ] coclass HWDevice { interface IHWDevice; }
  1878. // CLSID_HardwareDevices
  1879. [ uuid(dd522acc-f821-461a-a407-50b198b896dc) ] coclass HardwareDevices { interface IHardwareDevices; }
  1880. // CLSID_HWDeviceCustomProperties
  1881. [ uuid(555F3418-D99E-4e51-800A-6E89CFD8B1D7) ] coclass HWDeviceCustomProperties { interface IHWDeviceCustomProperties; }
  1882. // CLSID_IDefCategoryProvider
  1883. [ uuid(B2F2E083-84FE-4a7e-80C3-4B50D10D646E) ] coclass DefCategoryProvider { interface IDefCategoryProvider; }
  1884. // CLSID_VersionColProvider
  1885. [ uuid(66742402-F9B9-11D1-A202-0000F81FEDEE) ] coclass VersionColProvider { interface IPersist; }
  1886. // CLSID_ThemeUIPages
  1887. [ uuid(B12AE898-D056-4378-A844-6D393FE37956) ] coclass ThemeUIPages { interface IThemeUIPages; }
  1888. // CLSID_ScreenSaverPage
  1889. [ uuid(ADB9F5A4-E73E-49b8-99B6-2FA317EF9DBC) ] coclass ScreenSaverPage { interface IPropertyBag; }
  1890. // CLSID_ScreenResFixer
  1891. [ uuid(5a3d988e-820d-4aaf-ba87-440081768a17) ] coclass ScreenResFixer { interface IScreenResFixer; }
  1892. // CLSID_SettingsPage
  1893. [ uuid(4c892621-6757-4fe0-ad8c-a6301be7fba2) ] coclass SettingsPage { interface IBasePropPage; }
  1894. // CLSID_DisplaySettings
  1895. [ uuid(c79d1575-b8c6-4862-a284-788836518b97) ] coclass DisplaySettings { interface IDisplaySettings; }
  1896. // CLSID_VideoThumbnail
  1897. [ uuid(c5a40261-cd64-4ccf-84cb-c394da41d590) ] coclass VideoThumbnail { interface IPersist; }
  1898. // ThumbnailFCNHandler is already defined in uuidcom.lib -> uuid.lib
  1899. // [ uuid(cefc65d8-66d8-11d1-8d8c-0000f804b057)] coclass ThumbnailFCNHandler { interface IThumbnailExtractor; }
  1900. // CLSID_StartMenuPin
  1901. [ uuid(a2a9545d-a0c2-42b4-9708-a0b2badd77c8) ] coclass StartMenuPin { interface IStartMenuPin; }
  1902. // CLSID_ClientExtractIcon, with dummy interface to make midl happy
  1903. [ uuid(25585dc7-4da0-438d-ad04-e42c8d2d64b9) ] coclass ClientExtractIcon { interface IPersist; }
  1904. // CLSID_MediaDeviceFolder
  1905. [ uuid(640167b4-59b0-47a6-b335-a6b3c0695aea) ] coclass MediaDeviceFolder { interface IShellFolder; }
  1906. // CLSID_CDBurnFolder
  1907. [ uuid(00eebf57-477d-4084-9921-7ab3c2c9459d) ] coclass CDBurnFolder { interface IShellFolder; }
  1908. // CLSID_BurnAudioCDExtension
  1909. [ uuid(f83cbf45-1c37-4ca1-a78a-28bcb91642ec) ] coclass BurnAudioCDExtension { interface ICDBurnExt; }
  1910. // CLSID_Accessible
  1911. [ uuid(7e653215-fa25-46bd-a339-34a2790f3cb7) ] coclass Accessible { interface IInitAccessible; }
  1912. // CLSID_TrackPopupBar
  1913. [ uuid(acf35015-526e-4230-9596-becbe19f0ac9) ] coclass TrackPopupBar { interface IInitTrackPopupBar; }
  1914. // CLSID_SharedDocuments
  1915. [ uuid(59031a47-3f72-44a7-89c5-5595fe6b30ee) ] coclass SharedDocuments { interface IShellFolder; }
  1916. // CLSID_PostBootReminder
  1917. [ uuid(7849596a-48ea-486e-8937-a2a3009f31a9) ] coclass PostBootReminder { interface IShellReminderManager; }
  1918. // CLSID_AudioMediaProperties
  1919. [ uuid(875CB1A1-0F29-45de-A1AE-CFB4950D0B78) ] coclass AudioMediaProperties { interface IPersist; }
  1920. // CLSID_VideoMediaProperties
  1921. [ uuid(40C3D757-D6E4-4b49-BB41-0E5BBEA28817) ] coclass VideoMediaProperties { interface IPersist; }
  1922. // CLSID_AVWavProperties
  1923. [ uuid(E4B29F9D-D390-480b-92FD-7DDB47101D71) ] coclass AVWavProperties { interface IPersist; }
  1924. // CLSID_AVAviProperties
  1925. [ uuid(87D62D94-71B3-4b9a-9489-5FE6850DC73E) ] coclass AVAviProperties { interface IPersist; }
  1926. // CLSID_AVMidiProperties
  1927. [ uuid(A6FD9E45-6E44-43f9-8644-08598F5A74D9) ] coclass AVMidiProperties { interface IPersist; }
  1928. // CLSID_TrayNotify
  1929. [ uuid(25dead04-1eac-4911-9e3a-ad0a4ab560fd) ] coclass TrayNotify { interface ITrayNotify; }
  1930. // CLSID_CompositeFolder
  1931. [ uuid(FEF10DED-355E-4e06-9381-9B24D7F7CC88) ] coclass CompositeFolder { interface ICompositeFolder; }
  1932. // CLSID_DynamicStorage
  1933. [ uuid(F46316E4-FB1B-46eb-AEDF-9520BFBB916A) ] coclass DynamicStorage { interface IDynamicStorage; }
  1934. // CLSID_Magic
  1935. [ uuid(8A037D15-3357-4b1c-90EB-7B40B74FC4B2) ] coclass Magic { interface IMagic; }
  1936. // CLSID_HomeNetworkWizard
  1937. [ uuid(2728520d-1ec8-4c68-a551-316b684c4ea7) ] coclass HomeNetworkWizard { interface IHomeNetworkWizard; }
  1938. // CLSID_StartMenuFolder
  1939. [ uuid(48e7caab-b918-4e58-a94d-505519c795dc) ] coclass StartMenuFolder { interface IShellFolder; }
  1940. // CLSID_ProgramsFolder
  1941. [ uuid(7be9d83c-a729-4d97-b5a7-1b7313c39e0a) ] coclass ProgramsFolder { interface IShellFolder; }
  1942. // CLSID_MoreDocumentsFolder
  1943. [ uuid(9387ae38-d19b-4de5-baf5-1f7767a1cf04) ] coclass MoreDocumentsFolder { interface IShellFolder; }
  1944. // CLSID_LocalCopyHelper
  1945. [ uuid(021003e9-aac0-4975-979f-14b5d4e717f8) ] coclass LocalCopyHelper { interface ILocalCopy; }
  1946. // CLSID_ShellItem
  1947. [ uuid(9ac9fbe1-e0a2-4ad6-b4ee-e212013ea917) ] coclass ShellItem { interface IShellItem; }
  1948. // CLSID_WirelessDevices
  1949. [ uuid(30dd6b9c-47b7-4df5-94ae-f779aa7eb644) ] coclass WirelessDevices { interface IShellFolder; }
  1950. // CLSID_FolderCustomize
  1951. [ uuid(ef43ecfe-2ab9-4632-bf21-58909dd177f0) ] coclass FolderCustomize { interface IShellExtInit; }
  1952. // A service to handle interfaces normally implemented for an Ole Control Site, like IOleControlSite, or
  1953. // most importantly in our case, IDispatch, which handles ambient properties for the site.
  1954. cpp_quote("#define SID_OleControlSite IID_IOleControlSite")
  1955. // CLSID_WorkgroupNetCrawler
  1956. [ uuid(72b3882f-453a-4633-aac9-8c3dced62aff) ] coclass WorkgroupNetCrawler { interface INetCrawler; }
  1957. // CLSID_WebDocsNetCrawler
  1958. [ uuid(8a2ecb17-9007-4b9a-b271-7509095c405f) ] coclass WebDocsNetCrawler { interface INetCrawler; }
  1959. // CLSID_PublishedShareNetCrawler
  1960. [ uuid(24eee191-5491-4dc3-bd03-c0627df6a70c) ] coclass PublishedShareNetCrawler { interface INetCrawler; }
  1961. // CLSID_ImagePropertyHandler
  1962. [ uuid(eb9b1153-3b57-4e68-959a-a3266bc3d7fe) ] coclass ImagePropertyHandler { interface IPersist; }
  1963. // CLSID_WebViewRegTreeItem
  1964. [ uuid(01E2E7C0-2343-407f-B947-7E132E791D3E) ] coclass WebViewRegTreeItem { interface IRegTreeItem; }
  1965. // CLSID_ThemesRegTreeItem
  1966. [ uuid(AABE54D4-6E88-4c46-A6B3-1DF790DD6E0D) ] coclass ThemesRegTreeItem { interface IRegTreeItem; }
  1967. // CLSID_CShellTreeWalker
  1968. [ uuid(95CE8412-7027-11D1-B879-006008059382) ] coclass CShellTreeWalker { interface IShellTreeWalker; }
  1969. // CLSID_StorageProcessor
  1970. [ uuid(6CF8E98C-5DD4-42A2-A948-BFE4CA1DC3EB) ] coclass StorageProcessor { interface IStorageProcessor; };
  1971. // CLSID_TransferConfirmationUI
  1972. [ uuid(6B831E4F-A50D-45FC-842F-16CE27595359) ] coclass TransferConfirmationUI { interface ITransferConfirmation; };
  1973. // CLSID_ShellAutoplay
  1974. [ uuid(995C996E-D918-4a8c-A302-45719A6F4EA7) ] coclass ShellAutoplay { interface IHWEventHandler; };
  1975. // CLSID_PrintPhotosDropTarget
  1976. [ uuid(60fd46de-f830-4894-a628-6fa81bc0190d) ] coclass PrintPhotosDropTarget { interface IDropTarget; };
  1977. // CLSID_OrganizeFolder
  1978. [ uuid(10612e23-7679-4dd9-95b8-8e71c461feb2) ] coclass OrganizeFolder { interface IPersist; }
  1979. // CLSID_FadeTask
  1980. [ uuid(7eb5fbe4-2100-49e6-8593-17e130122f91) ] coclass FadeTask { interface IFadeTask; }
  1981. [ uuid(c461837f-ea59-494a-b7c6-cd040e37185e) ] coclass AssocShellElement { interface IAssociationElement; }
  1982. [ uuid(9016d0dd-7c41-46cc-a664-bf22f7cb186a) ] coclass AssocProgidElement { interface IAssociationElement; }
  1983. [ uuid(57aea081-5ee9-4c27-b218-c4b702964c54) ] coclass AssocClsidElement { interface IAssociationElement; }
  1984. [ uuid(a6c4baad-4af5-4191-8685-c2c8953a148c) ] coclass AssocSystemElement { interface IAssociationElement; }
  1985. [ uuid(0dc5fb21-b93d-4e3d-bb2f-ce4e36a70601) ] coclass AssocPerceivedElement { interface IAssociationElement; }
  1986. [ uuid(0c2bf91b-8746-4fb1-b4d7-7c03f890b168) ] coclass AssocApplicationElement { interface IAssociationElement; }
  1987. [ uuid(7566df7a-42cc-475d-a025-1205ddf4911f) ] coclass AssocFolderElement { interface IAssociationElement; }
  1988. [ uuid(0633b720-6926-404c-b6b3-923b1a501743) ] coclass AssocStarElement { interface IAssociationElement; }
  1989. [ uuid(3c81e7fa-1f3b-464a-a350-114a25beb2a2) ] coclass AssocClientElement { interface IAssociationElement; }
  1990. [ uuid(f26a669a-bcbb-4e37-abf9-7325da15f931) ] coclass AutoPlayVerb { interface IDropTarget; }
  1991. }