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.

611 lines
15 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1997.
  5. //
  6. // File: shlobj.idl
  7. //
  8. //----------------------------------------------------------------------------
  9. cpp_quote("//+-------------------------------------------------------------------------")
  10. cpp_quote("//")
  11. cpp_quote("// Microsoft Windows")
  12. cpp_quote("// Copyright (C) Microsoft Corporation, 1992-1997.")
  13. cpp_quote("//")
  14. cpp_quote("//--------------------------------------------------------------------------")
  15. cpp_quote("#if ( _MSC_VER >= 800 )")
  16. cpp_quote("#pragma warning(disable:4201)")
  17. cpp_quote("#endif")
  18. #ifndef DO_NO_IMPORTS
  19. import "objidl.idl";
  20. import "oleidl.idl";
  21. import "commctrl.idl";
  22. import "prsht.idl";
  23. #endif
  24. interface IContextMenu;
  25. interface IEnumIDList;
  26. interface IPersistFolder;
  27. interface IPersistFolder2;
  28. interface IShellBrowser;
  29. interface IShellExtInit;
  30. interface IShellFolder;
  31. interface IShellView;
  32. interface IExtractIconA;
  33. interface IExtractIconW;
  34. interface IQueryInfo;
  35. interface IExplorerToolbar;
  36. interface IShellDetails;
  37. typedef struct _CMINVOKECOMMANDINFO {
  38. DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
  39. DWORD fMask; // any combination of CMIC_MASK_*
  40. HWND hwnd; // might be NULL (indicating no owner window)
  41. LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
  42. LPCSTR lpParameters; // might be NULL (indicating no parameter)
  43. LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
  44. int nShow; // one of SW_ values for ShowWindow() API
  45. DWORD dwHotKey;
  46. HANDLE hIcon;
  47. } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
  48. //
  49. // SHITEMID -- Item ID
  50. //
  51. typedef struct _SHITEMID // mkid
  52. {
  53. USHORT cb; // Size of the ID (including cb itself)
  54. BYTE abID[1]; // The item ID (variable length)
  55. } SHITEMID;
  56. typedef SHITEMID *LPSHITEMID;
  57. typedef const SHITEMID *LPCSHITEMID;
  58. //
  59. // ITEMIDLIST -- List if item IDs (combined with 0-terminator)
  60. //
  61. typedef struct _ITEMIDLIST // idl
  62. {
  63. SHITEMID mkid;
  64. } ITEMIDLIST;
  65. typedef ITEMIDLIST * LPITEMIDLIST;
  66. typedef const ITEMIDLIST * LPCITEMIDLIST;
  67. #define MAX_PATH 260
  68. typedef struct _STRRET
  69. {
  70. UINT uType; // One of the STRRET_* values
  71. union
  72. {
  73. LPWSTR pOleStr; // must be freed by caller of GetDisplayNameOf
  74. LPSTR pStr; // NOT USED
  75. UINT uOffset; // Offset into SHITEMID
  76. char cStr[MAX_PATH]; // Buffer to fill in (ANSI)
  77. } DUMMYUNIONNAME;
  78. } STRRET, *LPSTRRET;
  79. typedef struct
  80. {
  81. UINT ViewMode; // View mode (FOLDERVIEWMODE values)
  82. UINT fFlags; // View options (FOLDERFLAGS bits)
  83. } FOLDERSETTINGS, *LPFOLDERSETTINGS;
  84. typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
  85. typedef struct _TBBUTTON {
  86. int iBitmap;
  87. int idCommand;
  88. BYTE fsState;
  89. BYTE fsStyle;
  90. #ifdef _WIN32
  91. BYTE bReserved[2];
  92. #endif
  93. DWORD dwData;
  94. int iString;
  95. } TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
  96. typedef const TBBUTTON* LPCTBBUTTON;
  97. //+---------------------------------------------------------------------------
  98. // IContextMenu -
  99. //
  100. [
  101. local,
  102. object,
  103. uuid(000214E4-0000-0000-0000-C00000000046),
  104. pointer_default(unique)
  105. ]
  106. interface IContextMenu : IUnknown
  107. {
  108. HRESULT QueryContextMenu(
  109. HMENU hmenu,
  110. UINT indexMenu,
  111. UINT idCmdFirst,
  112. UINT idCmdLast,
  113. UINT uFlags);
  114. HRESULT InvokeCommand(
  115. LPCMINVOKECOMMANDINFO lpici);
  116. HRESULT GetCommandString(
  117. UINT idCmd,
  118. UINT uType,
  119. UINT* pwReserved,
  120. LPSTR pszName,
  121. UINT cchMax);
  122. };
  123. //+---------------------------------------------------------------------------
  124. // IEnumIDList -
  125. //
  126. [
  127. local,
  128. object,
  129. uuid(000214F2-0000-0000-0000-C00000000046),
  130. pointer_default(unique)
  131. ]
  132. interface IEnumIDList : IUnknown
  133. {
  134. HRESULT Next(
  135. [in] ULONG celt,
  136. [out, size_is(celt), length_is(*pceltFetched)]
  137. LPITEMIDLIST* rgelt,
  138. [out] ULONG* pceltFetched);
  139. HRESULT Skip(
  140. [in] ULONG celt);
  141. HRESULT Reset();
  142. HRESULT Clone(
  143. [out] IEnumIDList** ppenum);
  144. };
  145. //+---------------------------------------------------------------------------
  146. // IPersistFolder -
  147. //
  148. [
  149. local,
  150. object,
  151. uuid(000214EA-0000-0000-0000-C00000000046),
  152. pointer_default(unique)
  153. ]
  154. interface IPersistFolder : IPersist
  155. {
  156. HRESULT Initialize(
  157. [in] LPCITEMIDLIST pidl);
  158. };
  159. //+---------------------------------------------------------------------------
  160. // IPersistFolder2 -
  161. //
  162. [
  163. local,
  164. object,
  165. uuid(1AC3D9F0-175C-11d1-95BE-00609797EA4F),
  166. pointer_default(unique)
  167. ]
  168. interface IPersistFolder2 : IPersistFolder
  169. {
  170. HRESULT GetCurFolder(
  171. [out] LPITEMIDLIST *ppidl);
  172. };
  173. //+---------------------------------------------------------------------------
  174. // IShellExtInit -
  175. //
  176. [
  177. local,
  178. object,
  179. uuid(000214E8-0000-0000-0000-C00000000046),
  180. pointer_default(unique)
  181. ]
  182. interface IShellExtInit : IUnknown
  183. {
  184. HRESULT Initialize(
  185. [in] LPCITEMIDLIST pidl,
  186. [in] LPDATAOBJECT pdobj,
  187. [in] HKEY hkeyProgID);
  188. };
  189. //+---------------------------------------------------------------------------
  190. // IShellBrowser -
  191. //
  192. [
  193. local,
  194. object,
  195. uuid(000214E2-0000-0000-0000-C00000000046),
  196. pointer_default(unique)
  197. ]
  198. interface IShellBrowser : IOleWindow
  199. {
  200. HRESULT InsertMenusSB(
  201. HMENU hmenuShared,
  202. LPOLEMENUGROUPWIDTHS lpMenuWidths);
  203. HRESULT SetMenuSB(
  204. HMENU hmenuShared,
  205. HOLEMENU holemenuReserved,
  206. HWND hwndActiveObject);
  207. HRESULT RemoveMenusSB(
  208. HMENU hmenuShared);
  209. HRESULT SetStatusTextSB(
  210. LPCOLESTR lpszStatusText);
  211. HRESULT EnableModelessSB(
  212. BOOL fEnable);
  213. HRESULT TranslateAcceleratorSB(
  214. LPMSG lpmsg,
  215. WORD wID);
  216. HRESULT BrowseObject (
  217. LPCITEMIDLIST pidl,
  218. UINT wFlags);
  219. HRESULT GetViewStateStream(
  220. DWORD grfMode,
  221. LPSTREAM* ppStrm);
  222. HRESULT GetControlWindow(
  223. UINT id,
  224. HWND* lphwnd);
  225. HRESULT SendControlMsg(
  226. UINT id,
  227. UINT uMsg,
  228. WPARAM wParam,
  229. LPARAM lParam,
  230. LRESULT* pret);
  231. HRESULT QueryActiveShellView(
  232. IShellView** ppshv);
  233. HRESULT OnViewWindowActive(
  234. IShellView* ppshv);
  235. HRESULT SetToolbarItems(
  236. LPTBBUTTON lpButtons,
  237. UINT nButtons,
  238. UINT uFlags);
  239. };
  240. //+---------------------------------------------------------------------------
  241. // IShellFolder -
  242. //
  243. [
  244. local,
  245. object,
  246. uuid(000214E6-0000-0000-0000-C00000000046),
  247. pointer_default(unique)
  248. ]
  249. interface IShellFolder : IUnknown
  250. {
  251. HRESULT ParseDisplayName(
  252. HWND hwndOwner,
  253. LPBC pbcReserved,
  254. LPOLESTR lpszDisplayName,
  255. ULONG* pchEaten,
  256. LPITEMIDLIST* ppidl,
  257. ULONG* pdwAttributes);
  258. HRESULT EnumObjects(
  259. HWND hwndOwner,
  260. DWORD grfFlags,
  261. IEnumIDList** ppenumIDList);
  262. HRESULT BindToObject(
  263. LPCITEMIDLIST pidl,
  264. LPBC pbcReserved,
  265. REFIID riid,
  266. LPVOID* ppvOut);
  267. HRESULT BindToStorage(
  268. LPCITEMIDLIST pidl,
  269. LPBC pbcReserved,
  270. REFIID riid,
  271. LPVOID* ppvObj);
  272. HRESULT CompareIDs(
  273. LPARAM lParam,
  274. LPCITEMIDLIST pidl1,
  275. LPCITEMIDLIST pidl2);
  276. HRESULT CreateViewObject(
  277. HWND hwndOwner,
  278. REFIID riid,
  279. LPVOID* ppvOut);
  280. HRESULT GetAttributesOf(
  281. UINT cidl,
  282. LPCITEMIDLIST* apidl,
  283. ULONG* rgfInOut);
  284. HRESULT GetUIObjectOf(
  285. HWND hwndOwner,
  286. UINT cidl,
  287. LPCITEMIDLIST* apidl,
  288. REFIID riid,
  289. UINT* prgfInOut,
  290. LPVOID* ppvOut);
  291. HRESULT GetDisplayNameOf(
  292. LPCITEMIDLIST pidl,
  293. DWORD uFlags,
  294. LPSTRRET lpName);
  295. HRESULT SetNameOf(
  296. HWND hwndOwner,
  297. LPCITEMIDLIST pidl,
  298. LPCOLESTR lpszName,
  299. DWORD uFlags,
  300. LPITEMIDLIST* ppidlOut);
  301. };
  302. //+---------------------------------------------------------------------------
  303. // IShellView -
  304. //
  305. [
  306. local,
  307. object,
  308. uuid(000214E3-0000-0000-0000-C00000000046),
  309. pointer_default(unique)
  310. ]
  311. interface IShellView : IOleWindow
  312. {
  313. HRESULT TranslateAccelerator(
  314. LPMSG lpmsg);
  315. HRESULT EnableModeless(
  316. BOOL fEnable);
  317. HRESULT UIActivate(
  318. UINT uState);
  319. HRESULT Refresh();
  320. HRESULT CreateViewWindow(
  321. IShellView* lpPrevView,
  322. LPCFOLDERSETTINGS lpfs,
  323. IShellBrowser* psb,
  324. RECT* prcView,
  325. HWND* phWnd);
  326. HRESULT DestroyViewWindow();
  327. HRESULT GetCurrentInfo(
  328. LPFOLDERSETTINGS lpfs);
  329. HRESULT AddPropertySheetPages(
  330. DWORD dwReserved,
  331. LPFNADDPROPSHEETPAGE lpfn,
  332. LPARAM lparam);
  333. HRESULT SaveViewState();
  334. HRESULT SelectItem(
  335. LPCITEMIDLIST pidlItem,
  336. UINT uFlags);
  337. HRESULT GetItemObject(
  338. UINT uItem,
  339. REFIID riid,
  340. LPVOID* ppv);
  341. };
  342. //+---------------------------------------------------------------------------
  343. // IExtractIconW -
  344. //
  345. [
  346. local,
  347. object,
  348. uuid(000214FA-0000-0000-0000-C00000000046),
  349. pointer_default(unique)
  350. ]
  351. interface IExtractIconW : IUnknown
  352. {
  353. HRESULT GetIconLocation(
  354. UINT uFlags,
  355. LPWSTR szIconFile,
  356. UINT cchMax,
  357. int * piIndex,
  358. UINT * pwFlags);
  359. HRESULT Extract(
  360. LPCWSTR pszFile,
  361. UINT nIconIndex,
  362. HICON * phiconLarge,
  363. HICON * phiconSmall,
  364. UINT nIconSize);
  365. };
  366. //+---------------------------------------------------------------------------
  367. // IExtractIconA -
  368. //
  369. [
  370. local,
  371. object,
  372. uuid(000214EB-0000-0000-0000-C00000000046),
  373. pointer_default(unique)
  374. ]
  375. interface IExtractIconA : IUnknown
  376. {
  377. HRESULT GetIconLocation(
  378. UINT uFlags,
  379. LPWSTR szIconFile,
  380. UINT cchMax,
  381. int * piIndex,
  382. UINT * pwFlags);
  383. HRESULT Extract(
  384. LPCWSTR pszFile,
  385. UINT nIconIndex,
  386. HICON * phiconLarge,
  387. HICON * phiconSmall,
  388. UINT nIconSize);
  389. };
  390. //+---------------------------------------------------------------------------
  391. // IQueryInfo -
  392. //
  393. [
  394. local,
  395. object,
  396. uuid(00021500-0000-0000-0000-C00000000046),
  397. pointer_default(unique)
  398. ]
  399. interface IQueryInfo : IUnknown
  400. {
  401. HRESULT GetInfoTip(
  402. DWORD dwFlags,
  403. WCHAR ** ppwszTip);
  404. HRESULT GetInfoFlags(
  405. DWORD * pdwFlags);
  406. };
  407. //+---------------------------------------------------------------------------
  408. // IOleCommandTarget -
  409. //
  410. // [
  411. // local,
  412. // object,
  413. // uuid(b722bccb-4e68-101b-a2bc-00aa00404770),
  414. // pointer_default(unique)
  415. // ]
  416. // interface IOleCommandTarget : IUnknown
  417. // {
  418. // HRESULT QueryStatus(
  419. // const GUID * pguidCmdGroup,
  420. // ULONG cCmds,
  421. // OLECMD prgCmds[],
  422. // OLECMDTEXT * pCmdText);
  423. //
  424. // HRESULT Exec(
  425. // const GUID * pguidCmdGroup,
  426. // DWORD nCmdID,
  427. // DWORD nCmdexecopt,
  428. // VARIANTARG * pvaIn,
  429. // VARIANTARG * pvaOut);
  430. // };
  431. typedef struct tagTBADDBITMAP {
  432. HINSTANCE hInst;
  433. UINT nID;
  434. } TBADDBITMAP, *LPTBADDBITMAP;
  435. //+---------------------------------------------------------------------------
  436. // IExplorerToolbar -
  437. //
  438. [
  439. local,
  440. object,
  441. uuid(8455F0C1-158F-11D0-89AE-00A0C90A90AC),
  442. pointer_default(unique)
  443. ]
  444. interface IExplorerToolbar : IUnknown
  445. {
  446. // *** IExplorerToolbar methods ***
  447. HRESULT SetCommandTarget(
  448. IUnknown * punkCmdTarget,
  449. const GUID * pguidCmdGrp,
  450. DWORD dwFlags);
  451. HRESULT AddStdBrowserButtons();
  452. HRESULT AddButtons(
  453. const GUID * pguidButtonGroup,
  454. UINT nButtons,
  455. const TBBUTTON * lpButtons);
  456. HRESULT AddString(
  457. const GUID * pguidButtonGroup,
  458. HINSTANCE hInst,
  459. UINT uiResID,
  460. LRESULT * pOffset);
  461. HRESULT GetButton(
  462. const GUID * pguidButtonGroup,
  463. UINT uiCommand,
  464. LPTBBUTTON lpButton);
  465. HRESULT GetState(
  466. const GUID * pguidButtonGroup,
  467. UINT uiCommand,
  468. UINT * pfState);
  469. HRESULT SetState(
  470. const GUID * pguidButtonGroup,
  471. UINT uiCommand,
  472. UINT fState);
  473. HRESULT AddBitmap(
  474. const GUID * pguidButtonGroup,
  475. UINT uiBMPType,
  476. UINT uiCount,
  477. TBADDBITMAP * ptb,
  478. LRESULT * pOffset,
  479. COLORREF rgbMask);
  480. HRESULT GetBitmapSize(
  481. UINT * uiID);
  482. HRESULT SendToolbarMsg(
  483. const GUID * pguidButtonGroup,
  484. UINT uMsg,
  485. WPARAM wParam,
  486. LPARAM lParam,
  487. LRESULT * plRes);
  488. HRESULT SetImageList(
  489. const GUID* pguidCmdGroup,
  490. HIMAGELIST himlNormal,
  491. HIMAGELIST himlHot,
  492. HIMAGELIST himlDisabled);
  493. HRESULT ModifyButton(
  494. const GUID * pguidButtonGroup,
  495. UINT uiCommand,
  496. LPTBBUTTON lpButton);
  497. };
  498. //===========================================================================
  499. // Defview related API and interface
  500. //
  501. // Notes: At this point, we have no plan to publish this mechanism.
  502. //===========================================================================
  503. typedef struct _SHELLDETAILS
  504. {
  505. int fmt; // LVCFMT_* value (header only)
  506. int cxChar; // Number of "average" characters (header only)
  507. STRRET str; // String information
  508. } SHELLDETAILS, *LPSHELLDETAILS;
  509. //+---------------------------------------------------------------------------
  510. // IShellDetails
  511. //
  512. [
  513. local,
  514. object,
  515. uuid(000214EC-0000-0000-0000-C00000000046),
  516. pointer_default(unique)
  517. ]
  518. interface IShellDetails : IUnknown
  519. {
  520. // *** IShellDetails methods ***
  521. HRESULT GetDetailsOf(
  522. LPCITEMIDLIST pidl,
  523. UINT iColumn,
  524. LPSHELLDETAILS pDetails);
  525. HRESULT ColumnClick(
  526. UINT iColumn);
  527. };