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.

1270 lines
48 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. [
  495. uuid(CE20DAB9-B353-469b-8B4D-6DBB3A7BA016), // IID_IMigrationWizardAuto
  496. helpstring("definition of interface IMigrationWizardAuto"),
  497. oleautomation,
  498. hidden,
  499. dual
  500. ]
  501. interface IMigrationWizardAuto : IDispatch
  502. {
  503. [helpstring("Create Tool Disk")]
  504. HRESULT CreateToolDisk([in] BSTR pszDrivePath, [in] BSTR pszFilesPath, [in] BSTR pszManifestPath);
  505. [helpstring("Apply Settings")]
  506. HRESULT ApplySettings([in] BSTR pszStore);
  507. [helpstring("Cancel current operation")]
  508. HRESULT Cancel();
  509. }
  510. cpp_quote("//===================================================================")
  511. cpp_quote("//DESCRIPTION:")
  512. cpp_quote("//OnProgress: This message is fired periodically as the object executes a")
  513. cpp_quote("// task, either creating a tool disk or applying settings. The")
  514. cpp_quote("// pszMsg parameter is a user-readable string with information")
  515. cpp_quote("// about what is currently being done, or an empty string if this")
  516. cpp_quote("// has not been implemented. The iDone parameter is an integer value")
  517. cpp_quote("// which relates the numerical amount of work that has been done.")
  518. cpp_quote("// The iTotal paramater is an integer value which relates the total")
  519. cpp_quote("// amount of work in the task. The ratio of iDone to iTotal is the")
  520. cpp_quote("// fraction of the task that has been completed.")
  521. cpp_quote("// Note that the string in pszMessage will not necessarily contain")
  522. cpp_quote("// %d tokens, so do not use the three parameters in an sprintf")
  523. cpp_quote("// and expect it to work.")
  524. cpp_quote("#define SZ_MIGWIZPROGRESS_OK L\"\"")
  525. cpp_quote("//========================================")
  526. cpp_quote("//OnComplete: This message is fired when the object has completed either ")
  527. cpp_quote("// creating a tool disk or applying settings. This can be either")
  528. cpp_quote("// a successful completion (pszMsg is the empty string), an")
  529. cpp_quote("// acknowledgment of the user's cancel (pszMsg is 'Cancel'),")
  530. cpp_quote("// the error message that there is no disk in the drive")
  531. cpp_quote("// (pszMsg is 'No Disk') or a general failure. (pszMsg is 'Fail')")
  532. cpp_quote("// ")
  533. cpp_quote("#define SZ_MIGWIZCOMPLETE_OK L\"\"")
  534. cpp_quote("#define SZ_MIGWIZCOMPLETE_CANCEL L\"Cancel\"")
  535. cpp_quote("#define SZ_MIGWIZCOMPLETE_FAIL L\"Fail\"")
  536. cpp_quote("#define SZ_MIGWIZCOMPLETE_NODISK L\"No Disk\"")
  537. cpp_quote("//===================================================================")
  538. [
  539. uuid(D2AC137D-A6D8-43b6-9879-EA34B67E1880), // IID_DMigrationWizardAutoEvents, for Migration Wizard OOBE Events
  540. helpstring("Event interface for MigrationWizardAuto"),
  541. ]
  542. dispinterface DMigrationWizardAutoEvents
  543. {
  544. properties:
  545. methods:
  546. [id(1), helpstring("Progress was made."), helpcontext(0x0000)]
  547. void OnProgress([in] BSTR pszMessage, [in] int iDone, [in] int iTotal);
  548. [id(2), helpstring("The process completed."), helpcontext(0x0000)]
  549. void OnComplete([in] BSTR pszMessage);
  550. }
  551. cpp_quote("//===================================================================")
  552. cpp_quote("//DESCRIPTION:")
  553. cpp_quote("// This object handles automation calls from OOBE (Out Of Box Experience)")
  554. cpp_quote("// and contains the Migration Wizard Engine located in migoobe.dll.")
  555. cpp_quote("//")
  556. cpp_quote("// Someday, this code will live inside of migoobe.dll, but we didn't ")
  557. cpp_quote("// have time to generate an entirely new typelib for migoobe.dll so we ")
  558. cpp_quote("// piggybacked on shell32's to make the development of the automation ")
  559. cpp_quote("// quicker to satisfy time constraints.")
  560. cpp_quote("//========================================")
  561. cpp_quote("//WARNING:")
  562. cpp_quote("// Only the first registered listener will receive fired events.")
  563. cpp_quote("// Because of the architecture of this object, if multiple objects")
  564. cpp_quote("// register for advisement on MigrationWizardAuto's dispatch")
  565. cpp_quote("// interface, only the first object to register will actually")
  566. cpp_quote("// receive the fired events. This may be fixed when this object")
  567. cpp_quote("// is moved into migoobe.dll and out of shell32.dll.")
  568. cpp_quote("//===================================================================")
  569. [
  570. uuid(67331D85-BE17-42f6-8D3F-47B8E8B26637), // CLSID_MigrationWizardAuto
  571. helpstring("Migration Wizard Engine Object")
  572. ]
  573. coclass MigrationWizardAuto
  574. {
  575. [default] interface IMigrationWizardAuto;
  576. [default, source] dispinterface DMigrationWizardAutoEvents;
  577. }
  578. typedef
  579. [
  580. uuid(742A99A0-C77E-11D0-A32C-00A0C91EEDBA),
  581. helpstring("Constants for ViewOptions")
  582. ]
  583. enum ShellFolderViewOptions {
  584. [helpstring("Show All Objects")] SFVVO_SHOWALLOBJECTS = 0x00000001,
  585. [helpstring("Show File Extensions")] SFVVO_SHOWEXTENSIONS = 0x00000002,
  586. [helpstring("Color encode Compressed files")] SFVVO_SHOWCOMPCOLOR = 0x00000008,
  587. [helpstring("Show System Files")] SFVVO_SHOWSYSFILES = 0x00000020,
  588. [helpstring("Use Windows 95 UI settings")] SFVVO_WIN95CLASSIC = 0x00000040,
  589. [helpstring("User needs to double click in web View")] SFVVO_DOUBLECLICKINWEBVIEW = 0x00000080,
  590. [helpstring("Is Desktop HTML enabled")] SFVVO_DESKTOPHTML = 0x00000200,
  591. } ShellFolderViewOptions;
  592. [
  593. uuid(D8F015C0-C278-11CE-A49E-444553540000), // IID_IShellDispatch
  594. helpstring("Definition of interface IShellDispatch"),
  595. oleautomation,
  596. hidden,
  597. dual,
  598. ]
  599. interface IShellDispatch : IDispatch
  600. {
  601. [propget, helpstring("Get Application object")]
  602. HRESULT Application ([out, retval] IDispatch **ppid);
  603. [propget, helpstring("Get Parent object")]
  604. HRESULT Parent([out, retval] IDispatch **ppid);
  605. //=========================================================
  606. // Name Space methods and properties
  607. [helpstring("Get special folder from ShellSpecialFolderConstants")]
  608. HRESULT NameSpace([in] VARIANT vDir, [out, retval] Folder **ppsdf);
  609. [helpstring("Browse the name space for a Folder")]
  610. HRESULT BrowseForFolder([in] long Hwnd,
  611. [in] BSTR Title,
  612. [in] long Options,
  613. [in,optional] VARIANT RootFolder,
  614. [out, retval] FOLDER **ppsdf);
  615. [helpstring("The collection of open folder windows")]
  616. HRESULT Windows([out, retval] IDispatch **ppid);
  617. [helpstring("Open a folder")]
  618. HRESULT Open([in] VARIANT vDir);
  619. [helpstring("Explore a folder")]
  620. HRESULT Explore([in] VARIANT vDir);
  621. [helpstring("Minimize all windows")]
  622. HRESULT MinimizeAll(void);
  623. [helpstring("Undo Minimize All")]
  624. HRESULT UndoMinimizeALL(void);
  625. [helpstring("Bring up the file run")]
  626. HRESULT FileRun(void);
  627. [helpstring("Cascade Windows")]
  628. HRESULT CascadeWindows(void);
  629. [helpstring("Tile windows vertically")]
  630. HRESULT TileVertically(void);
  631. [helpstring("Tile windows horizontally")]
  632. HRESULT TileHorizontally(void);
  633. [helpstring("Exit Windows")]
  634. HRESULT ShutdownWindows(void);
  635. [helpstring("Suspend the pc")]
  636. HRESULT Suspend(void);
  637. [helpstring("Eject the pc")]
  638. HRESULT EjectPC(void);
  639. [helpstring("Bring up the Set time dialog")]
  640. HRESULT SetTime(void);
  641. [helpstring("Handle Tray properties")]
  642. HRESULT TrayProperties(void);
  643. [helpstring("Display shell help")]
  644. HRESULT Help(void);
  645. [helpstring("Find Files")]
  646. HRESULT FindFiles(void);
  647. [helpstring("Find a computer")]
  648. HRESULT FindComputer(void);
  649. [helpstring("Refresh the menu")]
  650. HRESULT RefreshMenu(void);
  651. [helpstring("Run a Control Panel Item")]
  652. HRESULT ControlPanelItem([in] BSTR szDir);
  653. }
  654. [
  655. uuid(A4C6892C-3BA9-11d2-9DEA-00C04FB16162), // IID_IShellDispatch2
  656. helpstring("Updated IShellDispatch"),
  657. oleautomation,
  658. hidden,
  659. dual,
  660. ]
  661. interface IShellDispatch2 : IShellDispatch
  662. {
  663. [helpstring("get restriction settings")]
  664. HRESULT IsRestricted([in] BSTR Group, [in] BSTR Restriction, [out, retval] long * plRestrictValue);
  665. [helpstring("Execute generic command")]
  666. HRESULT ShellExecute([in] BSTR File, [in, optional] VARIANT vArgs,
  667. [in, optional] VARIANT vDir, [in, optional] VARIANT vOperation,
  668. [in, optional] VARIANT vShow);
  669. // search for a printer
  670. [helpstring("Find a Printer in the Directory Service")]
  671. HRESULT FindPrinter([in, optional] BSTR name, [in, optional] BSTR location, [in, optional] BSTR model);
  672. [helpstring("Retrieve info about the user's system")]
  673. HRESULT GetSystemInformation([in] BSTR name, [out, retval] VARIANT *pv);
  674. [helpstring("Start a service by name, and optionally set it to autostart.")]
  675. HRESULT ServiceStart([in] BSTR ServiceName, [in] VARIANT Persistent,
  676. [out,retval] VARIANT *pSuccess);
  677. [helpstring("Stop a service by name, and optionally disable autostart.")]
  678. HRESULT ServiceStop([in] BSTR ServiceName, [in] VARIANT Persistent,
  679. [out,retval] VARIANT *pSuccess);
  680. [helpstring("Determine if a service is running by name.")]
  681. HRESULT IsServiceRunning([in] BSTR ServiceName,
  682. [out,retval] VARIANT *pRunning);
  683. [helpstring("Determine if the current user can start/stop the named service.")]
  684. HRESULT CanStartStopService([in] BSTR ServiceName,
  685. [out,retval] VARIANT *pCanStartStop);
  686. [helpstring("Show/Hide browser bar.")]
  687. HRESULT ShowBrowserBar( [in]BSTR bstrClsid, [in]VARIANT bShow, [out,retval] VARIANT *pSuccess );
  688. }
  689. // Millennium interface
  690. [
  691. uuid(177160ca-bb5a-411c-841d-bd38facdeaa0), // IID_IShellDispatch3
  692. helpstring("Updated IShellDispatch"),
  693. oleautomation,
  694. hidden,
  695. dual,
  696. ]
  697. interface IShellDispatch3 : IShellDispatch2
  698. {
  699. [helpstring("Add an object to the Recent Docuements")]
  700. HRESULT AddToRecent([in] VARIANT varFile, [in, optional] BSTR bstrCategory);
  701. }
  702. // Whistler interface
  703. [
  704. uuid(efd84b2d-4bcf-4298-be25-eb542a59fbda), // IID_IShellDispatch4
  705. helpstring("Updated IShellDispatch"),
  706. oleautomation,
  707. hidden,
  708. dual,
  709. ]
  710. interface IShellDispatch4 : IShellDispatch3
  711. {
  712. [helpstring("Windows Security")]
  713. HRESULT WindowsSecurity(void);
  714. [helpstring("Raise/lower the desktop")]
  715. HRESULT ToggleDesktop(void);
  716. [helpstring("Return explorer policy value")]
  717. HRESULT ExplorerPolicy([in] BSTR bstrPolicyName, [out, retval] VARIANT *pValue);
  718. [helpstring("Return shell global setting")]
  719. HRESULT GetSetting([in] long lSetting, [out,retval] VARIANT_BOOL *pResult);
  720. }
  721. [
  722. uuid(13709620-C279-11CE-A49E-444553540000), // CLSID_Shell
  723. helpstring("Shell Object Type Information")
  724. ]
  725. coclass Shell
  726. {
  727. [default] interface IShellDispatch;
  728. }
  729. [
  730. uuid(0A89A860-D7B1-11CE-8350-444553540000), // CLSID_ShellDispatchInproc
  731. helpstring("ShellDispatch Load in Shell Context"),
  732. hidden
  733. ]
  734. coclass ShellDispatchInproc
  735. {
  736. interface IUnknown;
  737. }
  738. [
  739. uuid(1820FED0-473E-11D0-A96C-00C04FD705A2), // CLSID_WebViewFolderContents
  740. hidden
  741. ]
  742. coclass WebViewFolderContents
  743. {
  744. [default] interface IShellFolderViewDual;
  745. [source,default] dispinterface DShellFolderViewEvents;
  746. }
  747. typedef
  748. [
  749. uuid(CA31EA20-48D0-11CF-8350-444553540000),
  750. helpstring("Constants for Special Folders for open/Explore")
  751. ]
  752. enum ShellSpecialFolderConstants {
  753. [helpstring("Special Folder DESKTOP")] ssfDESKTOP = 0x0000,
  754. [helpstring("Special Folder PROGRAMS")] ssfPROGRAMS = 0x0002,
  755. [helpstring("Special Folder CONTROLS")] ssfCONTROLS = 0x0003,
  756. [helpstring("Special Folder PRINTERS")] ssfPRINTERS = 0x0004,
  757. [helpstring("Special Folder PERSONAL")] ssfPERSONAL = 0x0005,
  758. [helpstring("Special Folder FAVORITES")] ssfFAVORITES = 0x0006,
  759. [helpstring("Special Folder STARTUP")] ssfSTARTUP = 0x0007,
  760. [helpstring("Special Folder RECENT")] ssfRECENT = 0x0008,
  761. [helpstring("Special Folder SENDTO")] ssfSENDTO = 0x0009,
  762. [helpstring("Special Folder BITBUCKET")] ssfBITBUCKET = 0x000a,
  763. [helpstring("Special Folder STARTMENU")] ssfSTARTMENU = 0x000b,
  764. [helpstring("Special Folder DESKTOPDIRECTORY")] ssfDESKTOPDIRECTORY = 0x0010,
  765. [helpstring("Special Folder DRIVES")] ssfDRIVES = 0x0011,
  766. [helpstring("Special Folder NETWORK")] ssfNETWORK = 0x0012,
  767. [helpstring("Special Folder NETHOOD")] ssfNETHOOD = 0x0013,
  768. [helpstring("Special Folder FONTS")] ssfFONTS = 0x0014,
  769. [helpstring("Special Folder TEMPLATES")] ssfTEMPLATES = 0x0015,
  770. [helpstring("Special Folder COMMON STARTMENU")] ssfCOMMONSTARTMENU = 0x0016,
  771. [helpstring("Special Folder COMMON PROGRAMS")] ssfCOMMONPROGRAMS = 0x0017,
  772. [helpstring("Special Folder COMMON STARTUP")] ssfCOMMONSTARTUP = 0x0018,
  773. [helpstring("Special Folder COMMON DESKTOPDIR")] ssfCOMMONDESKTOPDIR = 0x0019,
  774. [helpstring("Special Folder APPDATA")] ssfAPPDATA = 0x001a,
  775. [helpstring("Special Folder PRINTHOOD")] ssfPRINTHOOD = 0x001b,
  776. [helpstring("Special Folder LOCAL APPDATA")] ssfLOCALAPPDATA = 0x001c,
  777. [helpstring("Special Folder ALTSTARTUP")] ssfALTSTARTUP = 0x001d,
  778. [helpstring("Special Folder COMMON ALTSTARTUP")] ssfCOMMONALTSTARTUP = 0x001e,
  779. [helpstring("Special Folder COMMON FAVORITES")] ssfCOMMONFAVORITES = 0x001f,
  780. [helpstring("Special Folder INTERNET CACHE")] ssfINTERNETCACHE = 0x0020,
  781. [helpstring("Special Folder COOKIES")] ssfCOOKIES = 0x0021,
  782. [helpstring("Special Folder HISTORY")] ssfHISTORY = 0x0022,
  783. [helpstring("Special Folder COMMON APPDATA")] ssfCOMMONAPPDATA = 0x0023,
  784. [helpstring("Special Folder WINDOWS")] ssfWINDOWS = 0x0024,
  785. [helpstring("Special Folder SYSTEM")] ssfSYSTEM = 0x0025,
  786. [helpstring("Special Folder PROGRAM FILES")] ssfPROGRAMFILES = 0x0026,
  787. [helpstring("Special Folder MYPICTURES")] ssfMYPICTURES = 0x0027,
  788. [helpstring("Special Folder PROFILE")] ssfPROFILE = 0x0028,
  789. [helpstring("Special Folder SYSTEMx86")] ssfSYSTEMx86 = 0x0029,
  790. [helpstring("Special Folder PROGRAM FILESx86")] ssfPROGRAMFILESx86 = 0x0030,
  791. } ShellSpecialFolderConstants;
  792. [
  793. uuid(60890160-69f0-11d1-b758-00a0c90564fe), // DIID_DSearchCommandEvents
  794. helpstring("Event interface for command events"),
  795. ]
  796. dispinterface DSearchCommandEvents
  797. {
  798. properties:
  799. methods:
  800. [id(DISPID_SEARCHCOMMAND_START), helpstring("Search started.")]
  801. HRESULT SearchStart(void);
  802. [id(DISPID_SEARCHCOMMAND_COMPLETE), helpstring("Search completed normally.")]
  803. HRESULT SearchComplete(void);
  804. [id(DISPID_SEARCHCOMMAND_ABORT), helpstring("Search cancelled.")]
  805. HRESULT SearchAbort(void);
  806. [id(DISPID_SEARCHCOMMAND_UPDATE), helpstring("Recordset changed.")]
  807. HRESULT RecordsetUpdate(void);
  808. [id(DISPID_SEARCHCOMMAND_PROGRESSTEXT), helpstring("The Progress text changed")]
  809. HRESULT ProgressTextChanged(void);
  810. [id(DISPID_SEARCHCOMMAND_ERROR), helpstring("An error has happened.")]
  811. HRESULT SearchError(void);
  812. [id(DISPID_SEARCHCOMMAND_RESTORE), helpstring("Criteria and resultes restored from file.")]
  813. HRESULT SearchRestored(void);
  814. }
  815. [
  816. uuid(B005E690-678D-11d1-B758-00A0C90564FE), // CLSID_SearchCommand
  817. helpstring("Search command object."),
  818. ]
  819. coclass SearchCommand
  820. {
  821. [default] interface IDispatch;
  822. [default, source] dispinterface DSearchCommandEvents;
  823. }
  824. [
  825. uuid(2D91EEA1-9932-11d2-BE86-00A0C9A83DA1), // IID_IFileSearchBand
  826. helpstring("IFileSearchBand Interface"),
  827. oleautomation,
  828. dual,
  829. hidden,
  830. pointer_default(unique)
  831. ]
  832. interface IFileSearchBand : IDispatch
  833. {
  834. [id(1), helpstring("method SetFocus")]
  835. HRESULT SetFocus(void);
  836. [id(2), helpstring("method SetSearchParameters")]
  837. HRESULT SetSearchParameters([in] BSTR* pbstrSearchID, [in]VARIANT_BOOL bNavToResults, [in,optional] VARIANT* pvarScope, [in,optional]VARIANT* pvarQueryFile );
  838. [id(3), propget, helpstring("Retrieve the guid of the currently active search.")]
  839. HRESULT SearchID([out, retval] BSTR* pbstrSearchID );
  840. [id(4), propget, helpstring("Get the search scope")]
  841. HRESULT Scope([out, retval] VARIANT *pvarScope );
  842. [id(5), propget, helpstring("Retrieve the file from which the search was restored.")]
  843. HRESULT QueryFile([out, retval] VARIANT *pvarFile );
  844. };
  845. [
  846. uuid(C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1), // CLSID_FileSearchBand
  847. helpstring("FileSearchBand Class"),
  848. hidden
  849. ]
  850. coclass FileSearchBand
  851. {
  852. [default] interface IFileSearchBand;
  853. };
  854. [
  855. uuid(18bcc359-4990-4bfb-b951-3c83702be5f9),
  856. object,
  857. dual,
  858. helpstring("IWebWizardHost interface")
  859. ]
  860. interface IWebWizardHost : IDispatch
  861. {
  862. [id(0)] HRESULT FinalBack();
  863. [id(1)] HRESULT FinalNext();
  864. [id(2)] HRESULT Cancel();
  865. [id(3), propput] HRESULT Caption([in] BSTR bstrCaption);
  866. [id(3), propget] HRESULT Caption([out, retval] BSTR* pbstrCaption);
  867. [id(4), propput] HRESULT Property([in] BSTR bstrPropertyName, [in] VARIANT* pvProperty);
  868. [id(4), propget] HRESULT Property([in] BSTR bstrPropertyName, [out, retval] VARIANT* pvProperty);
  869. [id(5)] HRESULT SetWizardButtons([in] VARIANT_BOOL vfEnableBack, [in] VARIANT_BOOL vfEnableNext, [in] VARIANT_BOOL vfLastPage);
  870. [id(6)] HRESULT SetHeaderText([in] BSTR bstrHeaderTitle, [in] BSTR bstrHeaderSubtitle);
  871. };
  872. [
  873. uuid(0751c551-7568-41c9-8e5b-e22e38919236),
  874. object,
  875. dual,
  876. helpstring("INewWDEvents interface")
  877. ]
  878. interface INewWDEvents: IWebWizardHost
  879. {
  880. [id(7)] HRESULT PassportAuthenticate([in] BSTR bstrSignInUrl, [out, retval] VARIANT_BOOL* pvfAuthenitcated);
  881. };
  882. [
  883. uuid(b30f7305-5967-45d1-b7bc-d6eb7163d770),
  884. object,
  885. dual,
  886. helpstring("IPassportClientServices")
  887. ]
  888. interface IPassportClientServices: IDispatch
  889. {
  890. [id(0)] HRESULT MemberExists([in] BSTR bstrUser, [in] BSTR bstrPassword, [out, retval] VARIANT_BOOL* pvfExists);
  891. };
  892. [
  893. uuid(2d2307c8-7db4-40d6-9100-d52af4f97a5b), // CLSID_PassportClientServices
  894. helpstring("PassportClientServices Class"),
  895. hidden
  896. ]
  897. coclass PassportClientServices
  898. {
  899. [default] interface IPassportClientServices;
  900. };
  901. }; // Shell32 library
  902. interface IAutoComplete;
  903. cpp_quote("//-------------------------------------------------------------------------")
  904. cpp_quote("//")
  905. cpp_quote("// IAutoComplete interface")
  906. cpp_quote("//")
  907. cpp_quote("//")
  908. cpp_quote("// [Member functions]")
  909. cpp_quote("//")
  910. cpp_quote("// IAutoComplete::Init(hwndEdit, punkACL, pwszRegKeyPath, pwszQuickComplete)")
  911. cpp_quote("// This function initializes an AutoComplete object, telling it")
  912. cpp_quote("// what control to subclass, and what list of strings to process.")
  913. cpp_quote("//")
  914. cpp_quote("// IAutoComplete::Enable(fEnable)")
  915. cpp_quote("// This function enables or disables the AutoComplete functionality.")
  916. cpp_quote("//")
  917. cpp_quote("//-------------------------------------------------------------------------")
  918. [
  919. helpstring("AutoComplete engine for URL type formatted strings"),
  920. local,
  921. object,
  922. uuid(00bb2762-6a77-11d0-a535-00c04fd7d062),
  923. pointer_default(unique)
  924. ]
  925. interface IAutoComplete : IUnknown
  926. {
  927. typedef [unique] IAutoComplete *LPAUTOCOMPLETE; // For C callers
  928. HRESULT Init(
  929. [in] HWND hwndEdit, // hwnd of editbox or editbox deriviative.
  930. [in, unique] IUnknown * punkACL, // Pointer to object containing string to complete from. (IEnumString *)
  931. [in, unique] LPCOLESTR pwszRegKeyPath, //
  932. [in] LPCOLESTR pwszQuickComplete
  933. );
  934. HRESULT Enable([in] BOOL fEnable); // Is it enabled?
  935. }
  936. [
  937. helpstring("AutoComplete engine for URL type formatted strings"),
  938. local,
  939. object,
  940. uuid(EAC04BC0-3791-11d2-BB95-0060977B464C),
  941. pointer_default(unique)
  942. ]
  943. interface IAutoComplete2 : IAutoComplete
  944. {
  945. typedef [unique] IAutoComplete2 *LPAUTOCOMPLETE2; // For C callers
  946. typedef enum _tagAUTOCOMPLETEOPTIONS
  947. {
  948. ACO_NONE = 0x00, // No AutoComplete
  949. ACO_AUTOSUGGEST = 0x01, // enable autosuggest dropdown
  950. ACO_AUTOAPPEND = 0x02, // enable autoappend
  951. ACO_SEARCH = 0x04, // add search entry to completion list
  952. ACO_FILTERPREFIXES = 0x08, // don't match common prefixes (www., http://, etc)
  953. ACO_USETAB = 0x10, // use tab to select autosuggest entries
  954. ACO_UPDOWNKEYDROPSLIST = 0x20, // up/down arrow key invokes autosuggest dropdown (if enabled)
  955. ACO_RTLREADING = 0x40, // enable RTL reading order for dropdown
  956. } AUTOCOMPLETEOPTIONS;
  957. HRESULT SetOptions([in] DWORD dwFlag);
  958. HRESULT GetOptions([out] DWORD* pdwFlag);
  959. }
  960. cpp_quote("// INTERFACE: IEnumACString")
  961. cpp_quote("//")
  962. cpp_quote("// This interface was implemented to return autocomplete strings")
  963. cpp_quote("// into the caller's buffer (to reduce the number of memory allocations).")
  964. cpp_quote("// A sort index is also returned to control the order of items displayed.")
  965. cpp_quote("// by autocomplete. The sort index should be set to zero if unused.")
  966. cpp_quote("//")
  967. cpp_quote("// The NextItem method increments the current index by one (similar to Next")
  968. cpp_quote("// when one item is requested).")
  969. cpp_quote("//")
  970. [
  971. helpstring("Enumerator for Autocomplete Strings"),
  972. local,
  973. object,
  974. uuid(8E74C210-CF9D-4eaf-A403-7356428F0A5A),
  975. pointer_default(unique)
  976. ]
  977. interface IEnumACString : IEnumString
  978. {
  979. typedef [unique] IEnumACString *PENUMACSTRING;
  980. typedef [unique] IEnumACString *LPENUMACSTRING;
  981. typedef enum _tagACENUMOPTION
  982. {
  983. ACEO_NONE = 0x0000, // No options
  984. ACEO_MOSTRECENTFIRST = 0x0001, // Display most recently used items first
  985. // (pulSortIndex is seconds since item was last used)
  986. ACEO_FIRSTUNUSED = 0x10000,// 0x00010000 through 0xffff0000 are for enumerator
  987. // specific options (0x0002-0xffff are reserved)
  988. } ACENUMOPTION;
  989. HRESULT NextItem(
  990. [out, string, unique, size_is(cchMax)] LPOLESTR pszUrl,
  991. [in] ULONG cchMax,
  992. [out] ULONG* pulSortIndex);
  993. HRESULT SetEnumOptions([in] DWORD dwOptions);
  994. HRESULT GetEnumOptions([out] DWORD* pdwOptions);
  995. }
  996. cpp_quote("// INTERFACE: IAsyncOperation")
  997. cpp_quote("//")
  998. cpp_quote("// This interface was implemented to turn some previously synchronous")
  999. cpp_quote("// interfaces into async. The following example is for")
  1000. cpp_quote("// doing the IDataObject::Drop() operation asynchronously.")
  1001. cpp_quote("//")
  1002. cpp_quote("// Sometimes the rendering of the IDataObject data (IDataObject::GetData() or")
  1003. cpp_quote("// STGMEDIUM.pStream->Read()) can be time intensive. The IDropTarget")
  1004. cpp_quote("// may want to do this on another thread.")
  1005. cpp_quote("//")
  1006. cpp_quote("// Implimentation Check list:")
  1007. cpp_quote("// DoDragDrop Caller:")
  1008. cpp_quote("// If this code can support asynch operations, then it needs to")
  1009. cpp_quote("// QueryInterface() the IDataObject for IAsyncOperation.")
  1010. cpp_quote("// IAsyncOperation::SetAsyncMode(VARIANT_TRUE).")
  1011. cpp_quote("// After calling DoDragDrop(), call InOperation(). If any call fails")
  1012. cpp_quote("// or InOperation() return FALSE, use the pdwEffect returned by DoDragDrop()")
  1013. cpp_quote("// and the operation completed synchrously.")
  1014. cpp_quote("//")
  1015. cpp_quote("// OleSetClipboard Caller:")
  1016. cpp_quote("// If this code can support asynch operations, then it needs to")
  1017. cpp_quote("// QueryInterface() the IDataObject for IAsyncOperation. Then call")
  1018. cpp_quote("// IAsyncOperation::SetAsyncMode(VARIANT_TRUE).")
  1019. cpp_quote("// If any of that fails, the final dwEffect should be passed to the IDataObject via")
  1020. cpp_quote("// CFSTR_PERFORMEDDROPEFFECT.")
  1021. cpp_quote("//")
  1022. cpp_quote("// IDataObect Object:")
  1023. cpp_quote("// IAsyncOperation::GetAsyncMode() should return whatever was last passed in")
  1024. cpp_quote("// fDoOpAsync to ::SetAsyncMode() or VARIANT_FALSE if ::SetAsyncMode()")
  1025. cpp_quote("// was never called.")
  1026. cpp_quote("// IAsyncOperation::SetAsyncMode() should AddRef and store paocb.")
  1027. cpp_quote("// IAsyncOperation::StartOperation() should store the fact that this was called and")
  1028. cpp_quote("// cause InOperation() to return VARIANT_TRUE. pbcReserved is not used and needs")
  1029. cpp_quote("// to be NULL.")
  1030. cpp_quote("// IAsyncOperation::InOperation() should return VARIANT_TRUE only if ::StartOperation()")
  1031. cpp_quote("// was called.")
  1032. cpp_quote("// IAsyncOperation::EndOperation() needs to call paocbpaocb->EndOperation() with the same")
  1033. cpp_quote("// parameters. Then release paocb.")
  1034. cpp_quote("// IDataObject::SetData(CFSTR_PERFORMEDDROPEFFECT) When this happens, call")
  1035. cpp_quote("// EndOperation(<into VAR>S_OK, NULL, <into VAR>dwEffect) and pass the dwEffect from the hglobal.")
  1036. cpp_quote("//")
  1037. cpp_quote("// IDropTarget Object:")
  1038. cpp_quote("// IDropTarget::Drop() If asynch operations aren't supported, nothing is required.")
  1039. cpp_quote("// The asynch operation can only happen if GetAsyncMode() returns VARIANT_TRUE.")
  1040. cpp_quote("// Before starting the asynch operation, StartOperation(NULL) needs to be called before")
  1041. cpp_quote("// returning from IDropTarget::Drop().")
  1042. interface IAsyncOperation;
  1043. [
  1044. helpstring("Interface to allow the IDataObject operation to occur asynchronously."),
  1045. uuid(3D8B0590-F691-11d2-8EA9-006097DF5BD4),
  1046. object,
  1047. ]
  1048. interface IAsyncOperation : IUnknown
  1049. {
  1050. typedef [unique] IAsyncOperation * LPASYNCOPERATION;
  1051. HRESULT SetAsyncMode([in] BOOL fDoOpAsync);
  1052. HRESULT GetAsyncMode([out] BOOL * pfIsOpAsync);
  1053. HRESULT StartOperation([in, unique, optional] IBindCtx * pbcReserved);
  1054. HRESULT InOperation([out] BOOL * pfInAsyncOp);
  1055. HRESULT EndOperation([in] HRESULT hResult, [in, unique] IBindCtx * pbcReserved, [in] DWORD dwEffects);
  1056. }