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

1181 lines
45 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7. midl_pragma warning( disable: 2400 )
  8. #include <olectl.h>
  9. import "ocidl.idl";
  10. #include "shdispid.h"
  11. [
  12. uuid(50a7e9b0-70ef-11d1-b75a-00a0c90564fe), // LIBID_Shell32
  13. helpstring("Microsoft Shell Controls And Automation"),
  14. lcid(0x0000),
  15. version(1.0)
  16. ]
  17. library Shell32
  18. {
  19. importlib("stdole2.tlb");
  20. [
  21. uuid(9BA05970-F6A8-11CF-A442-00A0C90A8F39), // IID_IFolderViewOC
  22. helpstring("Folder View Events Forwarder Object"),
  23. helpcontext(0x0000),
  24. hidden,
  25. oleautomation,
  26. dual,
  27. odl
  28. ]
  29. interface IFolderViewOC : IDispatch
  30. {
  31. [helpstring("Set the ShellFolderView object to monitor events of."), helpcontext(0x0000)]
  32. HRESULT SetFolderView([in] IDispatch *pdisp);
  33. }
  34. [
  35. uuid(62112AA2-EBE4-11cf-A5FB-0020AFE7292D), // IID_DShellFolderViewEvents
  36. helpstring("Event interface for ShellFolderView"),
  37. ]
  38. dispinterface DShellFolderViewEvents
  39. {
  40. properties:
  41. methods:
  42. [id(DISPID_SELECTIONCHANGED), helpstring("The Selection in the view changed."), helpcontext(0x0000)]
  43. void SelectionChanged();
  44. [id(DISPID_FILELISTENUMDONE), helpstring("The folder has finished enumerating (flashlight is gone)."), helpcontext(0x0000)]
  45. void EnumDone();
  46. [id(DISPID_VERBINVOKED), helpstring("A verb was invoked on an items in the view (return false to cancel)."), helpcontext(0x0000)]
  47. VARIANT_BOOL VerbInvoked();
  48. [id(DISPID_DEFAULTVERBINVOKED), helpstring("the default verb (double click) was invoked on an items in the view (return false to cancel)."), helpcontext(0x0000)]
  49. VARIANT_BOOL DefaultVerbInvoked();
  50. [id(DISPID_BEGINDRAG), helpstring("user started to drag an item (return false to cancel)."), helpcontext(0x0000)]
  51. VARIANT_BOOL BeginDrag();
  52. }
  53. [
  54. uuid(9BA05971-F6A8-11CF-A442-00A0C90A8F39), // CLSID_ShellFolderViewOC
  55. helpstring("Shell Folder View Events Router."),
  56. hidden
  57. ]
  58. coclass ShellFolderViewOC
  59. {
  60. [default] interface IFolderViewOC;
  61. [default, source] dispinterface DShellFolderViewEvents;
  62. }
  63. [
  64. uuid(4a3df050-23bd-11d2-939f-00a0c91eedba), // IID_DFConstraint
  65. helpstring("Constraint used in search command"),
  66. oleautomation,
  67. dual,
  68. ]
  69. interface DFConstraint : IDispatch
  70. {
  71. [propget, helpstring("Get the constraint name")]
  72. HRESULT Name([out, retval] BSTR *pbs);
  73. [propget, helpstring("Get the constraint Value")]
  74. HRESULT Value([out, retval] VARIANT *pv);
  75. }
  76. [
  77. uuid(1D2EFD50-75CE-11d1-B75A-00A0C90564FE), // IID_ISearchCommandExt
  78. helpstring("DocFind automation interface"),
  79. dual,
  80. oleautomation,
  81. ]
  82. interface ISearchCommandExt : IDispatch
  83. {
  84. // NOTE: these dispid's can't conflict with ADOCommand which starts at 0x60030009
  85. [id(1), helpstring("Clear out the results")]
  86. HRESULT ClearResults(void);
  87. [id(2), helpstring("Navigate to Search Results")]
  88. HRESULT NavigateToSearchResults(void);
  89. [id(3), propget, helpstring("Get the progress text")]
  90. HRESULT ProgressText([out, retval] BSTR *pbs);
  91. // We may want a set of flags:
  92. // SCE_DEFAULT = 0x0000,
  93. // SCE_NOUI = 0x0001,
  94. // SCE_DEFSAVERESULTS = 0x0002,
  95. // SCE_DEFNOSAVERESULTS = 0x0004
  96. // and a way to specify the filename through automation.
  97. // None of this is needed now, so simply use:
  98. //
  99. [id(4), helpstring("Save Search")]
  100. HRESULT SaveSearch(void);
  101. [id(5), helpstring("Get the last error information")]
  102. HRESULT GetErrorInfo([out] BSTR *pbs, [out,retval] int *phr);
  103. // ISearchCommandExt::SearchFor parameters
  104. typedef enum
  105. {
  106. SCE_SEARCHFORFILES = 0,
  107. SCE_SEARCHFORCOMPUTERS = 1,
  108. } SEARCH_FOR_TYPE;
  109. [id(6), helpstring("Search For Files/Folders(0) or Computers(1)")]
  110. HRESULT SearchFor([in] int iFor);
  111. [id(7), helpstring("Get Scope information - Indexed/NonIndexed/Mixed")]
  112. HRESULT GetScopeInfo([in] BSTR bsScope, [out] int *pdwScopeInfo);
  113. [id(8), helpstring("Restore the specified search file.")]
  114. HRESULT RestoreSavedSearch( [in] VARIANT *pvarFile );
  115. // Duplicates of the ADOCommand - only those we care about...
  116. [id(100), helpstring("Start the search")]
  117. HRESULT Execute([in, optional]VARIANT *RecordsAffected, [in, optional]VARIANT *Parameters,
  118. [in, optional]long Options);
  119. [id(101), helpstring("Create a parameter")]
  120. HRESULT AddConstraint([in]BSTR Name, [in]VARIANT Value);
  121. [id(102), helpstring("Enum through the constraints...")]
  122. HRESULT GetNextConstraint([in] VARIANT_BOOL fReset, [out, retval] DFConstraint **ppdfc);
  123. }
  124. typedef
  125. [
  126. uuid(418f4e6a-b903-11d1-b0a6-00c04fc33aa5),
  127. helpstring("Search Command Execute Errors")
  128. ]
  129. enum SearchCommandExecuteErrors {
  130. [helpstring("Path not found")] SCEE_PATHNOTFOUND = 1,
  131. [helpstring("Max files found")] SCEE_MAXFILESFOUND,
  132. [helpstring("Index search on Non Indexed Scope")] SCEE_INDEXSEARCH,
  133. [helpstring("Index Constraint Error")] SCEE_CONSTRAINT,
  134. [helpstring("Index search on Indexed and Non-Indexed Scopes")] SCEE_SCOPEMISMATCH,
  135. [helpstring("Case sensitive indexed search")] SCEE_CASESENINDEX,
  136. [helpstring("Indexing not complete")] SCEE_INDEXNOTCOMPLETE,
  137. } SearchCommandExecuteErrors;
  138. // Setup a set of Forward references
  139. interface FolderItem;
  140. interface FolderItems;
  141. interface FolderItemVerb;
  142. interface FolderItemVerbs;
  143. [
  144. uuid(BBCBDE60-C3FF-11CE-8350-444553540000), // IID_Folder
  145. helpstring("Definition of interface Folder"),
  146. oleautomation,
  147. dual,
  148. ]
  149. interface Folder : IDispatch
  150. {
  151. //Properties
  152. [id(0), propget, helpstring("Get the display name for the window")]
  153. HRESULT Title([out, retval] BSTR *pbs);
  154. [propget, helpstring("Get Application object")]
  155. HRESULT Application ([out, retval] IDispatch **ppid);
  156. [propget, helpstring("Get Parent object")]
  157. HRESULT Parent([out, retval] IDispatch **ppid);
  158. [propget, helpstring("Get Parent object")]
  159. HRESULT ParentFolder([out, retval] Folder **ppsf);
  160. //Methods
  161. [helpstring("The collection of Items in folder")]
  162. HRESULT Items([out, retval] FolderItems **ppid);
  163. [helpstring("Parse the name to get an item.")]
  164. HRESULT ParseName([in] BSTR bName, [out, retval] FolderItem **ppid);
  165. [helpstring("Create a new sub folder in this folder.")]
  166. HRESULT NewFolder([in] BSTR bName, [in, optional] VARIANT vOptions);
  167. [helpstring("Move Items to this folder.")]
  168. HRESULT MoveHere([in] VARIANT vItem, [in, optional] VARIANT vOptions);
  169. [helpstring("Copy Items to this folder.")]
  170. HRESULT CopyHere([in] VARIANT vItem, [in, optional] VARIANT vOptions);
  171. [helpstring("Get the details about an item.")]
  172. HRESULT GetDetailsOf([in] VARIANT vItem, [in] int iColumn, [out, retval]BSTR *pbs);
  173. }
  174. [
  175. uuid(f0d2d8ef-3890-11d2-bf8b-00c04fb93661), //IID_Folder2
  176. helpstring("Definition of interface Folder2"),
  177. oleautomation,
  178. dual,
  179. ]
  180. // ie5+ interface
  181. interface Folder2 : Folder
  182. {
  183. [propget, helpstring("Folder's FolderItem interface")]
  184. HRESULT Self([out, retval] FolderItem **ppfi);
  185. [propget, helpstring("Offline status of the server?")]
  186. HRESULT OfflineStatus([out, retval] LONG *pul);
  187. [helpstring("Synchronize all offline files")]
  188. HRESULT Synchronize(void);
  189. [id(1), propget, helpstring("Should the WebView barricade be shown?")]
  190. HRESULT HaveToShowWebViewBarricade([out, retval] VARIANT_BOOL *pbHaveToShowWebViewBarricade);
  191. [helpstring("Call this after the WebView barricade is dismissed by the user")]
  192. HRESULT DismissedWebViewBarricade();
  193. }
  194. typedef
  195. [
  196. uuid(35f1a0d0-3e9a-11d2-8499-005345000000),
  197. helpstring("Constants for Folder2.OfflineStatus")
  198. ]
  199. enum OfflineFolderStatus {
  200. [helpstring("Offline caching not available for this folder")] OFS_INACTIVE = -1,
  201. [helpstring("Server is online")] OFS_ONLINE,
  202. [helpstring("Server is offline")] OFS_OFFLINE,
  203. [helpstring("Server is offline but is reachable")] OFS_SERVERBACK,
  204. [helpstring("Server is online with unmerged changes")] OFS_DIRTYCACHE,
  205. } OfflineFolderStatus;
  206. [
  207. uuid(A7AE5F64-C4D7-4d7f-9307-4D24EE54B841), //IID_Folder3
  208. helpstring("Definition of interface Folder version 3"),
  209. oleautomation,
  210. dual,
  211. ]
  212. // Millen interface
  213. interface Folder3 : Folder2
  214. {
  215. [id(2), propget, helpstring("Ask if the WebView barricade should be shown or not")]
  216. HRESULT ShowWebViewBarricade([out, retval] VARIANT_BOOL *pbShowWebViewBarricade);
  217. [id(2), propput, helpstring("Set if the WebView barricade should be shown or not for this barricadable folder")]
  218. HRESULT ShowWebViewBarricade([in] VARIANT_BOOL bShowWebViewBarricade);
  219. }
  220. [
  221. uuid(FAC32C80-CBE4-11CE-8350-444553540000), // IID_FolderItem
  222. helpstring("Definition of interface FolderItem"),
  223. oleautomation,
  224. dual
  225. ]
  226. interface FolderItem : IDispatch
  227. {
  228. typedef [unique] FolderItem *LPFOLDERITEM; // For C callers
  229. [propget, helpstring("Get Application object")]
  230. HRESULT Application ([out, retval] IDispatch **ppid);
  231. [propget, helpstring("Get Parent object")]
  232. HRESULT Parent([out, retval] IDispatch **ppid);
  233. [id(0), propget, helpstring("Get display name for item")]
  234. HRESULT Name([out, retval] BSTR *pbs);
  235. [id(0), propput, helpstring("Set the name for the item")]
  236. HRESULT Name([in] BSTR bs);
  237. [propget, helpstring("Get the pathname to the item")]
  238. HRESULT Path([out, retval]BSTR *pbs);
  239. [propget, helpstring("If item is link return link object")]
  240. HRESULT GetLink([out, retval] IDispatch **ppid);
  241. [propget, helpstring("If item is a folder return folder object")]
  242. HRESULT GetFolder([out, retval] IDispatch **ppid);
  243. [propget, helpstring("Is the item a link?")]
  244. HRESULT IsLink([out, retval] VARIANT_BOOL *pb);
  245. [propget, helpstring("Is the item a Folder?")]
  246. HRESULT IsFolder([out, retval] VARIANT_BOOL *pb);
  247. [propget, helpstring("Is the item a file system object?")]
  248. HRESULT IsFileSystem([out, retval] VARIANT_BOOL *pb);
  249. [propget, helpstring("Is the item browsable?")]
  250. HRESULT IsBrowsable([out, retval] VARIANT_BOOL *pb);
  251. [propget, helpstring("Modification Date?")]
  252. HRESULT ModifyDate([out, retval] DATE *pdt);
  253. [propput, helpstring("Modification Date?")]
  254. HRESULT ModifyDate([in] DATE dt);
  255. [propget, helpstring("Size")]
  256. HRESULT Size([out, retval] LONG *pul);
  257. [propget, helpstring("Type")]
  258. HRESULT Type([out, retval] BSTR *pbs);
  259. [helpstring("Get the list of verbs for the object")]
  260. HRESULT Verbs([out, retval] FolderItemVerbs **ppfic);
  261. [helpstring("Execute a command on the item")]
  262. HRESULT InvokeVerb([in,optional] VARIANT vVerb);
  263. }
  264. [
  265. uuid(edc817aa-92b8-11d1-b075-00c04fc33aa5), // IID_FolderItem2
  266. helpstring("Definition of interface FolderItem Version 2"),
  267. oleautomation,
  268. dual
  269. ]
  270. // IE5+ interface, right?
  271. interface FolderItem2 : FolderItem
  272. {
  273. [helpstring("Extended version of InvokeVerb")]
  274. HRESULT InvokeVerbEx([in,optional] VARIANT vVerb, [in,optional] VARIANT vArgs);
  275. [helpstring("Access an extended property")]
  276. HRESULT ExtendedProperty([in] BSTR bstrPropName, [out, retval] VARIANT *pvRet);
  277. }
  278. [
  279. uuid(2fe352ea-fd1f-11d2-b1f4-00c04f8eeb3e), // CLSID_ShellFolderItem
  280. helpstring("Shell Folder Item")
  281. ]
  282. coclass ShellFolderItem
  283. {
  284. [default] interface FolderItem2;
  285. }
  286. [
  287. uuid(744129E0-CBE5-11CE-8350-444553540000), // IID_FolderItems
  288. helpstring("Definition of interface FolderItems"),
  289. oleautomation,
  290. dual
  291. ]
  292. interface FolderItems : IDispatch
  293. {
  294. //Properties
  295. [propget, helpstring("Get count of items in the folder")]
  296. HRESULT Count([out, retval] long *plCount);
  297. [propget, helpstring("Get Application object")]
  298. HRESULT Application ([out, retval] IDispatch **ppid);
  299. [propget, helpstring("Get Parent object")]
  300. HRESULT Parent([out, retval] IDispatch **ppid);
  301. //Methods
  302. //Standard Methods
  303. [helpstring("Return the figure for the given index")]
  304. HRESULT Item([in,optional] VARIANT index, [out, retval]FolderItem **ppid);
  305. [id(-4), helpstring("Enumerates the figures")]
  306. HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  307. }
  308. // IE5+ interface
  309. [
  310. uuid(C94F0AD0-F363-11d2-A327-00C04F8EEC7F), // IID_FolderItems2
  311. helpstring("Definition of interface FolderItems Version 2"),
  312. oleautomation,
  313. dual,
  314. odl,
  315. ]
  316. interface FolderItems2 : FolderItems
  317. {
  318. [helpstring("Extended version of InvokeVerb for a collection of Folder Items")]
  319. HRESULT InvokeVerbEx([in,optional] VARIANT vVerb, [in,optional] VARIANT vArgs);
  320. }
  321. // Millennium interface
  322. [
  323. uuid(eaa7c309-bbec-49d5-821d-64d966cb667f), // IID_FolderItems3
  324. helpstring("Definition of interface FolderItems Version 3"),
  325. oleautomation,
  326. dual,
  327. odl,
  328. ]
  329. interface FolderItems3 : FolderItems2
  330. {
  331. [helpstring("Set a wildcard filter to apply to the items returned")]
  332. HRESULT Filter([in] long grfFlags, [in] BSTR bstrFileSpec);
  333. [id(0), propget, helpstring("Get the list of verbs common to all the items")]
  334. HRESULT Verbs([out, retval] FolderItemVerbs **ppfic);
  335. }
  336. [
  337. uuid(08EC3E00-50B0-11CF-960C-0080C7F4EE85), // IID_FolderItemVerb
  338. helpstring("Definition of interface FolderItemVerb"),
  339. oleautomation,
  340. dual
  341. ]
  342. interface FolderItemVerb : IDispatch
  343. {
  344. [propget, helpstring("Get Application object")]
  345. HRESULT Application ([out, retval] IDispatch **ppid);
  346. [propget, helpstring("Get Parent object")]
  347. HRESULT Parent([out, retval] IDispatch **ppid);
  348. [id(0), propget, helpstring("Get display name for item")]
  349. HRESULT Name([out, retval] BSTR *pbs);
  350. [helpstring("Execute the verb")]
  351. HRESULT DoIt();
  352. }
  353. [
  354. uuid(1F8352C0-50B0-11CF-960C-0080C7F4EE85), // IID_FolderItemVerbs
  355. helpstring("Definition of interface FolderItemVerbs"),
  356. oleautomation,
  357. dual
  358. ]
  359. interface FolderItemVerbs : IDispatch
  360. {
  361. //Properties
  362. [propget, helpstring("Get count of open folder windows")]
  363. HRESULT Count([out, retval] long *plCount);
  364. [propget, helpstring("Get Application object")]
  365. HRESULT Application ([out, retval] IDispatch **ppid);
  366. [propget, helpstring("Get Parent object")]
  367. HRESULT Parent([out, retval] IDispatch **ppid);
  368. //Methods
  369. //Standard Methods
  370. [helpstring("Return the specified verb")]
  371. HRESULT Item([in,optional] VARIANT index, [out, retval]FolderItemVerb **ppid);
  372. [id(-4), helpstring("Enumerates the figures")]
  373. HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  374. }
  375. [
  376. uuid(88A05C00-F000-11CE-8350-444553540000), // IID_IShellLinkDual
  377. helpstring("Definition of Shell Link IDispatch interface"),
  378. oleautomation,
  379. dual,
  380. hidden,
  381. ]
  382. interface IShellLinkDual : IDispatch
  383. {
  384. [propget, helpstring("Get the path of the link")]
  385. HRESULT Path([out, retval] BSTR *pbs);
  386. [propput, helpstring("Set the path of the link")]
  387. HRESULT Path([in] BSTR bs);
  388. [propget, helpstring("Get the description for the link")]
  389. HRESULT Description([out, retval] BSTR *pbs);
  390. [propput, helpstring("Set the description for the link")]
  391. HRESULT Description([in] BSTR bs);
  392. [propget, helpstring("Get the working directory for the link")]
  393. HRESULT WorkingDirectory([out, retval] BSTR *pbs);
  394. [propput, helpstring("Set the working directory for the link")]
  395. HRESULT WorkingDirectory([in] BSTR bs);
  396. [propget, helpstring("Get the arguments for the link")]
  397. HRESULT Arguments([out, retval] BSTR *pbs);
  398. [propput, helpstring("Set the arguments for the link")]
  399. HRESULT Arguments([in] BSTR bs);
  400. [propget, helpstring("Get the Hotkey for the link")]
  401. HRESULT Hotkey([out, retval] int *piHK);
  402. [propput, helpstring("Set the Hotkey for the link")]
  403. HRESULT Hotkey([in] int iHK);
  404. [propget, helpstring("Get the Show Command for the link")]
  405. HRESULT ShowCommand([out, retval] int *piShowCommand);
  406. [propput, helpstring("Set the Show Command for the link")]
  407. HRESULT ShowCommand([in] int iShowCommand);
  408. // STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
  409. //Methods
  410. [helpstring("Tell the link to resolve itself")]
  411. HRESULT Resolve([in] int fFlags);
  412. [helpstring("Get the IconLocation for the link")]
  413. HRESULT GetIconLocation([out] BSTR *pbs, [out,retval] int *piIcon);
  414. [helpstring("Set the IconLocation for the link")]
  415. HRESULT SetIconLocation([in] BSTR bs, [in] int iIcon);
  416. [helpstring("Tell the link to save the changes")]
  417. HRESULT Save ([in, optional] VARIANT vWhere);
  418. }
  419. [
  420. uuid(317EE249-F12E-11d2-B1E4-00C04F8EEB3E), // IID_IShellLinkDual2
  421. helpstring("Shell Link2 IDispatch interface"),
  422. oleautomation,
  423. dual,
  424. hidden
  425. ]
  426. interface IShellLinkDual2 : IShellLinkDual
  427. {
  428. [propget, helpstring("Get the target of a link object")]
  429. HRESULT Target([out, retval] FolderItem **ppfi);
  430. }
  431. [
  432. // note, this object does not really exist, leave this for compat with
  433. // VB programs that do "dim foo as ShellLinkObject"
  434. uuid(11219420-1768-11d1-95BE-00609797EA4F), // CLSID_ShellLinkObject
  435. helpstring("Shell Link object")
  436. ]
  437. coclass ShellLinkObject // funny name so we don't conflict with CLSID_ShellLink
  438. {
  439. [default] interface IShellLinkDual;
  440. }
  441. [
  442. uuid(E7A1AF80-4D96-11CF-960C-0080C7F4EE85), // IID_IShellFolderViewDual
  443. helpstring("definition of interface IShellFolderViewDual"),
  444. oleautomation,
  445. hidden,
  446. dual
  447. ]
  448. interface IShellFolderViewDual : IDispatch
  449. {
  450. [propget, helpstring("Get Application object")]
  451. HRESULT Application([out, retval] IDispatch **ppid);
  452. [propget, helpstring("Get Parent object")]
  453. HRESULT Parent([out, retval] IDispatch **ppid);
  454. [propget, helpstring("Get the folder being viewed")]
  455. HRESULT Folder([out, retval] Folder **ppid);
  456. [helpstring("The collection of Selected Items in folder")]
  457. HRESULT SelectedItems([out, retval] FolderItems **ppid);
  458. [propget, helpstring("The currently focused item in the folder")]
  459. HRESULT FocusedItem([out, retval] FolderItem **ppid);
  460. [helpstring("Select the item")]
  461. HRESULT SelectItem([in]VARIANT *pvfi, [in] int dwFlags);
  462. [helpstring("Show items menu and return command selected")]
  463. HRESULT PopupItemMenu([in]FolderItem *pfi, [in, optional]VARIANT vx, [in, optional]VARIANT vy, [out, retval] BSTR *pbs);
  464. [propget, helpstring("Returns the scripting automation model."), helpcontext(0x0000)]
  465. HRESULT Script([out,retval] IDispatch** ppDisp);
  466. [propget, helpstring("Returns the view options for showing a folder."), helpcontext(0x0000)]
  467. HRESULT ViewOptions([out,retval] long * plViewOptions);
  468. }
  469. [
  470. uuid(31C147b6-0ADE-4A3C-B514-DDF932EF6D17), // IID_IShellFolderViewDual2
  471. helpstring("definition of interface IShellFolderViewDual2"),
  472. oleautomation,
  473. hidden,
  474. dual
  475. ]
  476. interface IShellFolderViewDual2 : IShellFolderViewDual
  477. {
  478. [propget, helpstring("Get Current View Mode")]
  479. HRESULT CurrentViewMode([out, retval] UINT *pViewMode);
  480. [propput, helpstring("Put Current View Mode")]
  481. HRESULT CurrentViewMode([in] UINT ViewMode);
  482. [helpstring("Select Item relative to the Current Item")]
  483. HRESULT SelectItemRelative([in] int iRelative);
  484. }
  485. [
  486. uuid(62112AA1-EBE4-11cf-A5FB-0020AFE7292D), // CLSID_ShellFolderView
  487. helpstring("Shell Folder View Object")
  488. ]
  489. coclass ShellFolderView
  490. {
  491. [default] interface IShellFolderViewDual2;
  492. [source,default] dispinterface DShellFolderViewEvents;
  493. }
  494. typedef
  495. [
  496. uuid(742A99A0-C77E-11D0-A32C-00A0C91EEDBA),
  497. helpstring("Constants for ViewOptions")
  498. ]
  499. enum ShellFolderViewOptions {
  500. [helpstring("Show All Objects")] SFVVO_SHOWALLOBJECTS = 0x00000001,
  501. [helpstring("Show File Extensions")] SFVVO_SHOWEXTENSIONS = 0x00000002,
  502. [helpstring("Color encode Compressed files")] SFVVO_SHOWCOMPCOLOR = 0x00000008,
  503. [helpstring("Show System Files")] SFVVO_SHOWSYSFILES = 0x00000020,
  504. [helpstring("Use Windows 95 UI settings")] SFVVO_WIN95CLASSIC = 0x00000040,
  505. [helpstring("User needs to double click in web View")] SFVVO_DOUBLECLICKINWEBVIEW = 0x00000080,
  506. [helpstring("Is Desktop HTML enabled")] SFVVO_DESKTOPHTML = 0x00000200,
  507. } ShellFolderViewOptions;
  508. [
  509. uuid(D8F015C0-C278-11CE-A49E-444553540000), // IID_IShellDispatch
  510. helpstring("Definition of interface IShellDispatch"),
  511. oleautomation,
  512. hidden,
  513. dual,
  514. ]
  515. interface IShellDispatch : IDispatch
  516. {
  517. [propget, helpstring("Get Application object")]
  518. HRESULT Application ([out, retval] IDispatch **ppid);
  519. [propget, helpstring("Get Parent object")]
  520. HRESULT Parent([out, retval] IDispatch **ppid);
  521. //=========================================================
  522. // Name Space methods and properties
  523. [helpstring("Get special folder from ShellSpecialFolderConstants")]
  524. HRESULT NameSpace([in] VARIANT vDir, [out, retval] Folder **ppsdf);
  525. [helpstring("Browse the name space for a Folder")]
  526. HRESULT BrowseForFolder([in] long Hwnd,
  527. [in] BSTR Title,
  528. [in] long Options,
  529. [in,optional] VARIANT RootFolder,
  530. [out, retval] FOLDER **ppsdf);
  531. [helpstring("The collection of open folder windows")]
  532. HRESULT Windows([out, retval] IDispatch **ppid);
  533. [helpstring("Open a folder")]
  534. HRESULT Open([in] VARIANT vDir);
  535. [helpstring("Explore a folder")]
  536. HRESULT Explore([in] VARIANT vDir);
  537. [helpstring("Minimize all windows")]
  538. HRESULT MinimizeAll(void);
  539. [helpstring("Undo Minimize All")]
  540. HRESULT UndoMinimizeALL(void);
  541. [helpstring("Bring up the file run")]
  542. HRESULT FileRun(void);
  543. [helpstring("Cascade Windows")]
  544. HRESULT CascadeWindows(void);
  545. [helpstring("Tile windows vertically")]
  546. HRESULT TileVertically(void);
  547. [helpstring("Tile windows horizontally")]
  548. HRESULT TileHorizontally(void);
  549. [helpstring("Exit Windows")]
  550. HRESULT ShutdownWindows(void);
  551. [helpstring("Suspend the pc")]
  552. HRESULT Suspend(void);
  553. [helpstring("Eject the pc")]
  554. HRESULT EjectPC(void);
  555. [helpstring("Bring up the Set time dialog")]
  556. HRESULT SetTime(void);
  557. [helpstring("Handle Tray properties")]
  558. HRESULT TrayProperties(void);
  559. [helpstring("Display shell help")]
  560. HRESULT Help(void);
  561. [helpstring("Find Files")]
  562. HRESULT FindFiles(void);
  563. [helpstring("Find a computer")]
  564. HRESULT FindComputer(void);
  565. [helpstring("Refresh the menu")]
  566. HRESULT RefreshMenu(void);
  567. [helpstring("Run a Control Panel Item")]
  568. HRESULT ControlPanelItem([in] BSTR szDir);
  569. }
  570. [
  571. uuid(A4C6892C-3BA9-11d2-9DEA-00C04FB16162), // IID_IShellDispatch2
  572. helpstring("Updated IShellDispatch"),
  573. oleautomation,
  574. hidden,
  575. dual,
  576. ]
  577. interface IShellDispatch2 : IShellDispatch
  578. {
  579. [helpstring("get restriction settings")]
  580. HRESULT IsRestricted([in] BSTR Group, [in] BSTR Restriction, [out, retval] long * plRestrictValue);
  581. [helpstring("Execute generic command")]
  582. HRESULT ShellExecute([in] BSTR File, [in, optional] VARIANT vArgs,
  583. [in, optional] VARIANT vDir, [in, optional] VARIANT vOperation,
  584. [in, optional] VARIANT vShow);
  585. // search for a printer
  586. [helpstring("Find a Printer in the Directory Service")]
  587. HRESULT FindPrinter([in, optional] BSTR name, [in, optional] BSTR location, [in, optional] BSTR model);
  588. [helpstring("Retrieve info about the user's system")]
  589. HRESULT GetSystemInformation([in] BSTR name, [out, retval] VARIANT *pv);
  590. [helpstring("Start a service by name, and optionally set it to autostart.")]
  591. HRESULT ServiceStart([in] BSTR ServiceName, [in] VARIANT Persistent,
  592. [out,retval] VARIANT *pSuccess);
  593. [helpstring("Stop a service by name, and optionally disable autostart.")]
  594. HRESULT ServiceStop([in] BSTR ServiceName, [in] VARIANT Persistent,
  595. [out,retval] VARIANT *pSuccess);
  596. [helpstring("Determine if a service is running by name.")]
  597. HRESULT IsServiceRunning([in] BSTR ServiceName,
  598. [out,retval] VARIANT *pRunning);
  599. [helpstring("Determine if the current user can start/stop the named service.")]
  600. HRESULT CanStartStopService([in] BSTR ServiceName,
  601. [out,retval] VARIANT *pCanStartStop);
  602. [helpstring("Show/Hide browser bar.")]
  603. HRESULT ShowBrowserBar( [in]BSTR bstrClsid, [in]VARIANT bShow, [out,retval] VARIANT *pSuccess );
  604. }
  605. // Millennium interface
  606. [
  607. uuid(177160ca-bb5a-411c-841d-bd38facdeaa0), // IID_IShellDispatch3
  608. helpstring("Updated IShellDispatch"),
  609. oleautomation,
  610. hidden,
  611. dual,
  612. ]
  613. interface IShellDispatch3 : IShellDispatch2
  614. {
  615. [helpstring("Add an object to the Recent Docuements")]
  616. HRESULT AddToRecent([in] VARIANT varFile, [in, optional] BSTR bstrCategory);
  617. }
  618. // Whistler interface
  619. [
  620. uuid(efd84b2d-4bcf-4298-be25-eb542a59fbda), // IID_IShellDispatch4
  621. helpstring("Updated IShellDispatch"),
  622. oleautomation,
  623. hidden,
  624. dual,
  625. ]
  626. interface IShellDispatch4 : IShellDispatch3
  627. {
  628. [helpstring("Windows Security")]
  629. HRESULT WindowsSecurity(void);
  630. [helpstring("Raise/lower the desktop")]
  631. HRESULT ToggleDesktop(void);
  632. [helpstring("Return explorer policy value")]
  633. HRESULT ExplorerPolicy([in] BSTR bstrPolicyName, [out, retval] VARIANT *pValue);
  634. [helpstring("Return shell global setting")]
  635. HRESULT GetSetting([in] long lSetting, [out,retval] VARIANT_BOOL *pResult);
  636. }
  637. [
  638. uuid(13709620-C279-11CE-A49E-444553540000), // CLSID_Shell
  639. helpstring("Shell Object Type Information")
  640. ]
  641. coclass Shell
  642. {
  643. [default] interface IShellDispatch;
  644. }
  645. [
  646. uuid(0A89A860-D7B1-11CE-8350-444553540000), // CLSID_ShellDispatchInproc
  647. helpstring("ShellDispatch Load in Shell Context"),
  648. hidden
  649. ]
  650. coclass ShellDispatchInproc
  651. {
  652. interface IUnknown;
  653. }
  654. [
  655. uuid(1820FED0-473E-11D0-A96C-00C04FD705A2), // CLSID_WebViewFolderContents
  656. hidden
  657. ]
  658. coclass WebViewFolderContents
  659. {
  660. [default] interface IShellFolderViewDual;
  661. [source,default] dispinterface DShellFolderViewEvents;
  662. }
  663. typedef
  664. [
  665. uuid(CA31EA20-48D0-11CF-8350-444553540000),
  666. helpstring("Constants for Special Folders for open/Explore")
  667. ]
  668. enum ShellSpecialFolderConstants {
  669. [helpstring("Special Folder DESKTOP")] ssfDESKTOP = 0x0000,
  670. [helpstring("Special Folder PROGRAMS")] ssfPROGRAMS = 0x0002,
  671. [helpstring("Special Folder CONTROLS")] ssfCONTROLS = 0x0003,
  672. [helpstring("Special Folder PRINTERS")] ssfPRINTERS = 0x0004,
  673. [helpstring("Special Folder PERSONAL")] ssfPERSONAL = 0x0005,
  674. [helpstring("Special Folder FAVORITES")] ssfFAVORITES = 0x0006,
  675. [helpstring("Special Folder STARTUP")] ssfSTARTUP = 0x0007,
  676. [helpstring("Special Folder RECENT")] ssfRECENT = 0x0008,
  677. [helpstring("Special Folder SENDTO")] ssfSENDTO = 0x0009,
  678. [helpstring("Special Folder BITBUCKET")] ssfBITBUCKET = 0x000a,
  679. [helpstring("Special Folder STARTMENU")] ssfSTARTMENU = 0x000b,
  680. [helpstring("Special Folder DESKTOPDIRECTORY")] ssfDESKTOPDIRECTORY = 0x0010,
  681. [helpstring("Special Folder DRIVES")] ssfDRIVES = 0x0011,
  682. [helpstring("Special Folder NETWORK")] ssfNETWORK = 0x0012,
  683. [helpstring("Special Folder NETHOOD")] ssfNETHOOD = 0x0013,
  684. [helpstring("Special Folder FONTS")] ssfFONTS = 0x0014,
  685. [helpstring("Special Folder TEMPLATES")] ssfTEMPLATES = 0x0015,
  686. [helpstring("Special Folder COMMON STARTMENU")] ssfCOMMONSTARTMENU = 0x0016,
  687. [helpstring("Special Folder COMMON PROGRAMS")] ssfCOMMONPROGRAMS = 0x0017,
  688. [helpstring("Special Folder COMMON STARTUP")] ssfCOMMONSTARTUP = 0x0018,
  689. [helpstring("Special Folder COMMON DESKTOPDIR")] ssfCOMMONDESKTOPDIR = 0x0019,
  690. [helpstring("Special Folder APPDATA")] ssfAPPDATA = 0x001a,
  691. [helpstring("Special Folder PRINTHOOD")] ssfPRINTHOOD = 0x001b,
  692. [helpstring("Special Folder LOCAL APPDATA")] ssfLOCALAPPDATA = 0x001c,
  693. [helpstring("Special Folder ALTSTARTUP")] ssfALTSTARTUP = 0x001d,
  694. [helpstring("Special Folder COMMON ALTSTARTUP")] ssfCOMMONALTSTARTUP = 0x001e,
  695. [helpstring("Special Folder COMMON FAVORITES")] ssfCOMMONFAVORITES = 0x001f,
  696. [helpstring("Special Folder INTERNET CACHE")] ssfINTERNETCACHE = 0x0020,
  697. [helpstring("Special Folder COOKIES")] ssfCOOKIES = 0x0021,
  698. [helpstring("Special Folder HISTORY")] ssfHISTORY = 0x0022,
  699. [helpstring("Special Folder COMMON APPDATA")] ssfCOMMONAPPDATA = 0x0023,
  700. [helpstring("Special Folder WINDOWS")] ssfWINDOWS = 0x0024,
  701. [helpstring("Special Folder SYSTEM")] ssfSYSTEM = 0x0025,
  702. [helpstring("Special Folder PROGRAM FILES")] ssfPROGRAMFILES = 0x0026,
  703. [helpstring("Special Folder MYPICTURES")] ssfMYPICTURES = 0x0027,
  704. [helpstring("Special Folder PROFILE")] ssfPROFILE = 0x0028,
  705. [helpstring("Special Folder SYSTEMx86")] ssfSYSTEMx86 = 0x0029,
  706. [helpstring("Special Folder PROGRAM FILESx86")] ssfPROGRAMFILESx86 = 0x0030,
  707. } ShellSpecialFolderConstants;
  708. [
  709. uuid(60890160-69f0-11d1-b758-00a0c90564fe), // DIID_DSearchCommandEvents
  710. helpstring("Event interface for command events"),
  711. ]
  712. dispinterface DSearchCommandEvents
  713. {
  714. properties:
  715. methods:
  716. [id(DISPID_SEARCHCOMMAND_START), helpstring("Search started.")]
  717. HRESULT SearchStart(void);
  718. [id(DISPID_SEARCHCOMMAND_COMPLETE), helpstring("Search completed normally.")]
  719. HRESULT SearchComplete(void);
  720. [id(DISPID_SEARCHCOMMAND_ABORT), helpstring("Search cancelled.")]
  721. HRESULT SearchAbort(void);
  722. [id(DISPID_SEARCHCOMMAND_UPDATE), helpstring("Recordset changed.")]
  723. HRESULT RecordsetUpdate(void);
  724. [id(DISPID_SEARCHCOMMAND_PROGRESSTEXT), helpstring("The Progress text changed")]
  725. HRESULT ProgressTextChanged(void);
  726. [id(DISPID_SEARCHCOMMAND_ERROR), helpstring("An error has happened.")]
  727. HRESULT SearchError(void);
  728. [id(DISPID_SEARCHCOMMAND_RESTORE), helpstring("Criteria and resultes restored from file.")]
  729. HRESULT SearchRestored(void);
  730. }
  731. [
  732. uuid(B005E690-678D-11d1-B758-00A0C90564FE), // CLSID_SearchCommand
  733. helpstring("Search command object."),
  734. ]
  735. coclass SearchCommand
  736. {
  737. [default] interface IDispatch;
  738. [default, source] dispinterface DSearchCommandEvents;
  739. }
  740. [
  741. uuid(2D91EEA1-9932-11d2-BE86-00A0C9A83DA1), // IID_IFileSearchBand
  742. helpstring("IFileSearchBand Interface"),
  743. oleautomation,
  744. dual,
  745. hidden,
  746. pointer_default(unique)
  747. ]
  748. interface IFileSearchBand : IDispatch
  749. {
  750. [id(1), helpstring("method SetFocus")]
  751. HRESULT SetFocus(void);
  752. [id(2), helpstring("method SetSearchParameters")]
  753. HRESULT SetSearchParameters([in] BSTR* pbstrSearchID, [in]VARIANT_BOOL bNavToResults, [in,optional] VARIANT* pvarScope, [in,optional]VARIANT* pvarQueryFile );
  754. [id(3), propget, helpstring("Retrieve the guid of the currently active search.")]
  755. HRESULT SearchID([out, retval] BSTR* pbstrSearchID );
  756. [id(4), propget, helpstring("Get the search scope")]
  757. HRESULT Scope([out, retval] VARIANT *pvarScope );
  758. [id(5), propget, helpstring("Retrieve the file from which the search was restored.")]
  759. HRESULT QueryFile([out, retval] VARIANT *pvarFile );
  760. };
  761. [
  762. uuid(C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1), // CLSID_FileSearchBand
  763. helpstring("FileSearchBand Class"),
  764. hidden
  765. ]
  766. coclass FileSearchBand
  767. {
  768. [default] interface IFileSearchBand;
  769. };
  770. [
  771. uuid(18bcc359-4990-4bfb-b951-3c83702be5f9),
  772. object,
  773. dual,
  774. helpstring("IWebWizardHost interface")
  775. ]
  776. interface IWebWizardHost : IDispatch
  777. {
  778. [id(0)] HRESULT FinalBack();
  779. [id(1)] HRESULT FinalNext();
  780. [id(2)] HRESULT Cancel();
  781. [id(3), propput] HRESULT Caption([in] BSTR bstrCaption);
  782. [id(3), propget] HRESULT Caption([out, retval] BSTR* pbstrCaption);
  783. [id(4), propput] HRESULT Property([in] BSTR bstrPropertyName, [in] VARIANT* pvProperty);
  784. [id(4), propget] HRESULT Property([in] BSTR bstrPropertyName, [out, retval] VARIANT* pvProperty);
  785. [id(5)] HRESULT SetWizardButtons([in] VARIANT_BOOL vfEnableBack, [in] VARIANT_BOOL vfEnableNext, [in] VARIANT_BOOL vfLastPage);
  786. [id(6)] HRESULT SetHeaderText([in] BSTR bstrHeaderTitle, [in] BSTR bstrHeaderSubtitle);
  787. };
  788. [
  789. uuid(0751c551-7568-41c9-8e5b-e22e38919236),
  790. object,
  791. dual,
  792. helpstring("INewWDEvents interface")
  793. ]
  794. interface INewWDEvents: IWebWizardHost
  795. {
  796. [id(7)] HRESULT PassportAuthenticate([in] BSTR bstrSignInUrl, [out, retval] VARIANT_BOOL* pvfAuthenitcated);
  797. };
  798. [
  799. uuid(b30f7305-5967-45d1-b7bc-d6eb7163d770),
  800. object,
  801. dual,
  802. helpstring("IPassportClientServices")
  803. ]
  804. interface IPassportClientServices: IDispatch
  805. {
  806. [id(0)] HRESULT MemberExists([in] BSTR bstrUser, [in] BSTR bstrPassword, [out, retval] VARIANT_BOOL* pvfExists);
  807. };
  808. [
  809. uuid(2d2307c8-7db4-40d6-9100-d52af4f97a5b), // CLSID_PassportClientServices
  810. helpstring("PassportClientServices Class"),
  811. hidden
  812. ]
  813. coclass PassportClientServices
  814. {
  815. [default] interface IPassportClientServices;
  816. };
  817. }; // Shell32 library
  818. interface IAutoComplete;
  819. cpp_quote("//-------------------------------------------------------------------------")
  820. cpp_quote("//")
  821. cpp_quote("// IAutoComplete interface")
  822. cpp_quote("//")
  823. cpp_quote("//")
  824. cpp_quote("// [Member functions]")
  825. cpp_quote("//")
  826. cpp_quote("// IAutoComplete::Init(hwndEdit, punkACL, pwszRegKeyPath, pwszQuickComplete)")
  827. cpp_quote("// This function initializes an AutoComplete object, telling it")
  828. cpp_quote("// what control to subclass, and what list of strings to process.")
  829. cpp_quote("//")
  830. cpp_quote("// IAutoComplete::Enable(fEnable)")
  831. cpp_quote("// This function enables or disables the AutoComplete functionality.")
  832. cpp_quote("//")
  833. cpp_quote("//-------------------------------------------------------------------------")
  834. [
  835. helpstring("AutoComplete engine for URL type formatted strings"),
  836. local,
  837. object,
  838. uuid(00bb2762-6a77-11d0-a535-00c04fd7d062),
  839. pointer_default(unique)
  840. ]
  841. interface IAutoComplete : IUnknown
  842. {
  843. typedef [unique] IAutoComplete *LPAUTOCOMPLETE; // For C callers
  844. HRESULT Init(
  845. [in] HWND hwndEdit, // hwnd of editbox or editbox deriviative.
  846. [in, unique] IUnknown * punkACL, // Pointer to object containing string to complete from. (IEnumString *)
  847. [in, unique] LPCOLESTR pwszRegKeyPath, //
  848. [in] LPCOLESTR pwszQuickComplete
  849. );
  850. HRESULT Enable([in] BOOL fEnable); // Is it enabled?
  851. }
  852. [
  853. helpstring("AutoComplete engine for URL type formatted strings"),
  854. local,
  855. object,
  856. uuid(EAC04BC0-3791-11d2-BB95-0060977B464C),
  857. pointer_default(unique)
  858. ]
  859. interface IAutoComplete2 : IAutoComplete
  860. {
  861. typedef [unique] IAutoComplete2 *LPAUTOCOMPLETE2; // For C callers
  862. typedef enum _tagAUTOCOMPLETEOPTIONS
  863. {
  864. ACO_NONE = 0x00, // No AutoComplete
  865. ACO_AUTOSUGGEST = 0x01, // enable autosuggest dropdown
  866. ACO_AUTOAPPEND = 0x02, // enable autoappend
  867. ACO_SEARCH = 0x04, // add search entry to completion list
  868. ACO_FILTERPREFIXES = 0x08, // don't match common prefixes (www., http://, etc)
  869. ACO_USETAB = 0x10, // use tab to select autosuggest entries
  870. ACO_UPDOWNKEYDROPSLIST = 0x20, // up/down arrow key invokes autosuggest dropdown (if enabled)
  871. ACO_RTLREADING = 0x40, // enable RTL reading order for dropdown
  872. } AUTOCOMPLETEOPTIONS;
  873. HRESULT SetOptions([in] DWORD dwFlag);
  874. HRESULT GetOptions([out] DWORD* pdwFlag);
  875. }
  876. cpp_quote("// INTERFACE: IEnumACString")
  877. cpp_quote("//")
  878. cpp_quote("// This interface was implemented to return autocomplete strings")
  879. cpp_quote("// into the caller's buffer (to reduce the number of memory allocations).")
  880. cpp_quote("// A sort index is also returned to control the order of items displayed.")
  881. cpp_quote("// by autocomplete. The sort index should be set to zero if unused.")
  882. cpp_quote("//")
  883. cpp_quote("// The NextItem method increments the current index by one (similar to Next")
  884. cpp_quote("// when one item is requested).")
  885. cpp_quote("//")
  886. [
  887. helpstring("Enumerator for Autocomplete Strings"),
  888. local,
  889. object,
  890. uuid(8E74C210-CF9D-4eaf-A403-7356428F0A5A),
  891. pointer_default(unique)
  892. ]
  893. interface IEnumACString : IEnumString
  894. {
  895. typedef [unique] IEnumACString *PENUMACSTRING;
  896. typedef [unique] IEnumACString *LPENUMACSTRING;
  897. typedef enum _tagACENUMOPTION
  898. {
  899. ACEO_NONE = 0x0000, // No options
  900. ACEO_MOSTRECENTFIRST = 0x0001, // Display most recently used items first
  901. // (pulSortIndex is seconds since item was last used)
  902. ACEO_FIRSTUNUSED = 0x10000,// 0x00010000 through 0xffff0000 are for enumerator
  903. // specific options (0x0002-0xffff are reserved)
  904. } ACENUMOPTION;
  905. HRESULT NextItem(
  906. [out, string, unique, size_is(cchMax)] LPOLESTR pszUrl,
  907. [in] ULONG cchMax,
  908. [out] ULONG* pulSortIndex);
  909. HRESULT SetEnumOptions([in] DWORD dwOptions);
  910. HRESULT GetEnumOptions([out] DWORD* pdwOptions);
  911. }
  912. cpp_quote("// INTERFACE: IAsyncOperation")
  913. cpp_quote("//")
  914. cpp_quote("// This interface was implemented to turn some previously synchronous")
  915. cpp_quote("// interfaces into async. The following example is for")
  916. cpp_quote("// doing the IDataObject::Drop() operation asynchronously.")
  917. cpp_quote("//")
  918. cpp_quote("// Sometimes the rendering of the IDataObject data (IDataObject::GetData() or")
  919. cpp_quote("// STGMEDIUM.pStream->Read()) can be time intensive. The IDropTarget")
  920. cpp_quote("// may want to do this on another thread.")
  921. cpp_quote("//")
  922. cpp_quote("// Implimentation Check list:")
  923. cpp_quote("// DoDragDrop Caller:")
  924. cpp_quote("// If this code can support asynch operations, then it needs to")
  925. cpp_quote("// QueryInterface() the IDataObject for IAsyncOperation.")
  926. cpp_quote("// IAsyncOperation::SetAsyncMode(VARIANT_TRUE).")
  927. cpp_quote("// After calling DoDragDrop(), call InOperation(). If any call fails")
  928. cpp_quote("// or InOperation() return FALSE, use the pdwEffect returned by DoDragDrop()")
  929. cpp_quote("// and the operation completed synchrously.")
  930. cpp_quote("//")
  931. cpp_quote("// OleSetClipboard Caller:")
  932. cpp_quote("// If this code can support asynch operations, then it needs to")
  933. cpp_quote("// QueryInterface() the IDataObject for IAsyncOperation. Then call")
  934. cpp_quote("// IAsyncOperation::SetAsyncMode(VARIANT_TRUE).")
  935. cpp_quote("// If any of that fails, the final dwEffect should be passed to the IDataObject via")
  936. cpp_quote("// CFSTR_PERFORMEDDROPEFFECT.")
  937. cpp_quote("//")
  938. cpp_quote("// IDataObect Object:")
  939. cpp_quote("// IAsyncOperation::GetAsyncMode() should return whatever was last passed in")
  940. cpp_quote("// fDoOpAsync to ::SetAsyncMode() or VARIANT_FALSE if ::SetAsyncMode()")
  941. cpp_quote("// was never called.")
  942. cpp_quote("// IAsyncOperation::SetAsyncMode() should AddRef and store paocb.")
  943. cpp_quote("// IAsyncOperation::StartOperation() should store the fact that this was called and")
  944. cpp_quote("// cause InOperation() to return VARIANT_TRUE. pbcReserved is not used and needs")
  945. cpp_quote("// to be NULL.")
  946. cpp_quote("// IAsyncOperation::InOperation() should return VARIANT_TRUE only if ::StartOperation()")
  947. cpp_quote("// was called.")
  948. cpp_quote("// IAsyncOperation::EndOperation() needs to call paocbpaocb->EndOperation() with the same")
  949. cpp_quote("// parameters. Then release paocb.")
  950. cpp_quote("// IDataObject::SetData(CFSTR_PERFORMEDDROPEFFECT) When this happens, call")
  951. cpp_quote("// EndOperation(<into VAR>S_OK, NULL, <into VAR>dwEffect) and pass the dwEffect from the hglobal.")
  952. cpp_quote("//")
  953. cpp_quote("// IDropTarget Object:")
  954. cpp_quote("// IDropTarget::Drop() If asynch operations aren't supported, nothing is required.")
  955. cpp_quote("// The asynch operation can only happen if GetAsyncMode() returns VARIANT_TRUE.")
  956. cpp_quote("// Before starting the asynch operation, StartOperation(NULL) needs to be called before")
  957. cpp_quote("// returning from IDropTarget::Drop().")
  958. interface IAsyncOperation;
  959. [
  960. helpstring("Interface to allow the IDataObject operation to occur asynchronously."),
  961. uuid(3D8B0590-F691-11d2-8EA9-006097DF5BD4),
  962. object,
  963. ]
  964. interface IAsyncOperation : IUnknown
  965. {
  966. typedef [unique] IAsyncOperation * LPASYNCOPERATION;
  967. HRESULT SetAsyncMode([in] BOOL fDoOpAsync);
  968. HRESULT GetAsyncMode([out] BOOL * pfIsOpAsync);
  969. HRESULT StartOperation([in, unique, optional] IBindCtx * pbcReserved);
  970. HRESULT InOperation([out] BOOL * pfInAsyncOp);
  971. HRESULT EndOperation([in] HRESULT hResult, [in, unique] IBindCtx * pbcReserved, [in] DWORD dwEffects);
  972. }