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.

12024 lines
490 KiB

  1. //===========================================================================
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: shlobj.h
  6. //
  7. //===========================================================================
  8. ;begin_internal
  9. //***************************************************************************
  10. // --- SHELLAPI.W SHSEMIP.H SHLOBJ.W SHOBJIDL.IDL SHLDISP.IDL SHPRIV.IDL ---
  11. // Which header is best for my new API?
  12. //
  13. // SHLOBJ - *AVOID NEW USAGE*, PREFER OTHER HEADERS
  14. // used primarily for legacy compatibility
  15. //
  16. // SHELLAPI - ALL NEW SHELL32 EXPORTS public and private
  17. // used for both public and private exports from shell32
  18. //
  19. // SHSEMIP - *AVOID _ALL_ USAGE*, NO EXPORTS, SUPER PRIVATE
  20. // used for very private shell defines.
  21. //
  22. // SHOBJIDL - ALL NEW SHELL PUBLIC INTERFACES
  23. // primary file for public shell (shell32+) interfaces
  24. //
  25. // SHLDISP - ALL NEW SHELL AUTOMATION INTERFACES
  26. // automation interfaces are always public
  27. //
  28. // SHPRIV - ALL NEW SHELL PRIVATE INTERFACES
  29. // private interfaces used anywhere in the shell
  30. //
  31. //
  32. // SHLOBJ was originally the file that defined all of shell32's interfaces.
  33. // it devolved into a dumping ground of public and private APIs and
  34. // interfaces. in the effort to better support COM and better API management
  35. // we are attempting to avoid using shlobj
  36. //***************************************************************************
  37. ;end_internal
  38. #ifndef _SHLOBJ_H_
  39. #define _SHLOBJ_H_
  40. #ifndef _SHLOBJP_H_ ;Internal
  41. #define _SHLOBJP_H_ ;Internal
  42. #ifndef _WINRESRC_
  43. #ifndef _WIN32_IE
  44. #define _WIN32_IE 0x0501
  45. #else
  46. #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
  47. #error _WIN32_IE setting conflicts with _WIN32_WINNT setting
  48. #endif
  49. #endif
  50. #endif
  51. #ifndef SNDMSG
  52. #ifdef __cplusplus
  53. #define SNDMSG ::SendMessage
  54. #else
  55. #define SNDMSG SendMessage
  56. #endif
  57. #endif // ifndef SNDMSG
  58. //
  59. // Define API decoration for direct importing of DLL references.
  60. //
  61. #ifndef WINSHELLAPI
  62. #if defined(_SHELL32_)
  63. #define WINSHELLAPI
  64. #else
  65. #define WINSHELLAPI DECLSPEC_IMPORT
  66. #endif
  67. #endif // WINSHELLAPI
  68. #ifndef SHSTDAPI
  69. #if defined(_SHELL32_)
  70. #define SHSTDAPI STDAPI
  71. #define SHSTDAPI_(type) STDAPI_(type)
  72. #else
  73. #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  74. #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  75. #endif
  76. #endif // SHSTDAPI
  77. #ifndef SHDOCAPI
  78. #if defined(_SHDOCVW_)
  79. #define SHDOCAPI STDAPI
  80. #define SHDOCAPI_(type) STDAPI_(type)
  81. #else
  82. #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  83. #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  84. #endif
  85. #endif // SHDOCAPI
  86. // shell32 APIs that are also exported from shdocvw
  87. #ifndef SHSTDDOCAPI
  88. #if defined(_SHDOCVW_) || defined(_SHELL32_)
  89. #define SHSTDDOCAPI STDAPI
  90. #define SHSTDDOCAPI_(type) STDAPI_(type)
  91. #else
  92. #define SHSTDDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  93. #define SHSTDDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  94. #endif
  95. #endif // SHSTDDOCAPI
  96. #ifndef BROWSEUIAPI
  97. #if defined(_BROWSEUI_)
  98. #define BROWSEUIAPI STDAPI
  99. #define BROWSEUIAPI_(type) STDAPI_(type)
  100. #else
  101. #define BROWSEUIAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  102. #define BROWSEUIAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  103. #endif // defined(_BROWSEUI_)
  104. #endif // BROWSEUIAPI
  105. // shell32 APIs that are also exported from shfolder
  106. #ifndef SHFOLDERAPI
  107. #if defined(_SHFOLDER_) || defined(_SHELL32_)
  108. #define SHFOLDERAPI STDAPI
  109. #else
  110. #define SHFOLDERAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  111. #endif
  112. #endif
  113. #define NO_MONIKER ;Internal
  114. #include <ole2.h>
  115. #ifndef _PRSHT_H_
  116. #include <prsht.h>
  117. #endif
  118. #ifndef _INC_COMMCTRL
  119. #include <commctrl.h> // for LPTBBUTTON
  120. #endif
  121. #ifndef INITGUID
  122. #include <shlguid.h>
  123. #endif /* !INITGUID */
  124. #include <docobj.h> ;Internal
  125. #include <shldisp.h> ;Internal
  126. ;begin_both
  127. #include <pshpack1.h> /* Assume byte packing throughout */
  128. #ifdef __cplusplus
  129. extern "C" { /* Assume C declarations for C++ */
  130. #endif /* __cplusplus */
  131. #include <shtypes.h>
  132. ;end_both
  133. #include <shobjidl.h>
  134. #include <shpriv.h> ;Internal
  135. #include <iepriv.h> ;Internal
  136. ;begin_internal
  137. // HMONITOR is already declared in NT 5's windef.h.
  138. #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
  139. DECLARE_HANDLE(HMONITOR);
  140. #define HMONITOR_DECLARED
  141. #endif
  142. #include <tlog.h>
  143. ;end_internal
  144. //===========================================================================
  145. //
  146. // Task allocator API
  147. //
  148. // All the shell extensions MUST use the task allocator (see OLE 2.0
  149. // programming guild for its definition) when they allocate or free
  150. // memory objects (mostly ITEMIDLIST) that are returned across any
  151. // shell interfaces. There are two ways to access the task allocator
  152. // from a shell extension depending on whether or not it is linked with
  153. // OLE32.DLL or not (purely for efficiency).
  154. //
  155. // (1) A shell extension which calls any OLE API (i.e., linked with
  156. // OLE32.DLL) should call OLE's task allocator (by retrieving
  157. // the task allocator by calling CoGetMalloc API).
  158. //
  159. // (2) A shell extension which does not call any OLE API (i.e., not linked
  160. // with OLE32.DLL) should call the shell task allocator API (defined
  161. // below), so that the shell can quickly loads it when OLE32.DLL is not
  162. // loaded by any application at that point.
  163. //
  164. // Notes:
  165. // In next version of Windowso release, SHGetMalloc will be replaced by
  166. // the following macro.
  167. //
  168. // #define SHGetMalloc(ppmem) CoGetMalloc(MEMCTX_TASK, ppmem)
  169. //
  170. //===========================================================================
  171. SHSTDAPI SHGetMalloc(LPMALLOC * ppMalloc);
  172. ;begin_internal
  173. // DOC'ed for DOJ compliance
  174. ;end_internal
  175. SHSTDAPI_(void *) SHAlloc(SIZE_T cb);
  176. SHSTDAPI_(void *) SHRealloc(void * pv, SIZE_T cbNew); ;Internal
  177. SHSTDAPI_(SIZE_T) SHGetSize(void * pv); ;Internal
  178. ;begin_internal
  179. // DOC'ed for DOJ compliance
  180. ;end_internal
  181. SHSTDAPI_(void) SHFree(void * pv);
  182. //===========================================================================
  183. //
  184. // IContextMenu interface
  185. //
  186. // [OverView]
  187. //
  188. // The shell uses the IContextMenu interface in following three cases.
  189. //
  190. // case-1: The shell is loading context menu extensions.
  191. //
  192. // When the user clicks the right mouse button on an item within the shell's
  193. // name space (i.g., file, directory, server, work-group, etc.), it creates
  194. // the default context menu for its type, then loads context menu extensions
  195. // that are registered for that type (and its base type) so that they can
  196. // add extra menu items. Those context menu extensions are registered at
  197. // HKCR\{ProgID}\shellex\ContextMenuHandlers.
  198. //
  199. // case-2: The shell is retrieving a context menu of sub-folders in extended
  200. // name-space.
  201. //
  202. // When the explorer's name space is extended by name space extensions,
  203. // the shell calls their IShellFolder::GetUIObjectOf to get the IContextMenu
  204. // objects when it creates context menus for folders under those extended
  205. // name spaces.
  206. //
  207. // case-3: The shell is loading non-default drag and drop handler for directories.
  208. //
  209. // When the user performed a non-default drag and drop onto one of file
  210. // system folders (i.e., directories), it loads shell extensions that are
  211. // registered at HKCR\{ProgID}\DragDropHandlers.
  212. //
  213. //
  214. // [Member functions]
  215. //
  216. //
  217. // IContextMenu::QueryContextMenu
  218. //
  219. // This member function may insert one or more menuitems to the specified
  220. // menu (hmenu) at the specified location (indexMenu which is never be -1).
  221. // The IDs of those menuitem must be in the specified range (idCmdFirst and
  222. // idCmdLast). It returns the maximum menuitem ID offset (ushort) in the
  223. // 'code' field (low word) of the scode.
  224. //
  225. // The uFlags specify the context. It may have one or more of following
  226. // flags.
  227. //
  228. // CMF_DEFAULTONLY: This flag is passed if the user is invoking the default
  229. // action (typically by double-clicking, case 1 and 2 only). Context menu
  230. // extensions (case 1) should not add any menu items, and returns NOERROR.
  231. //
  232. // CMF_VERBSONLY: The explorer passes this flag if it is constructing
  233. // a context menu for a short-cut object (case 1 and case 2 only). If this
  234. // flag is passed, it should not add any menu-items that is not appropriate
  235. // from a short-cut.
  236. // A good example is the "Delete" menuitem, which confuses the user
  237. // because it is not clear whether it deletes the link source item or the
  238. // link itself.
  239. //
  240. // CMF_EXPLORER: The explorer passes this flag if it has the left-side pane
  241. // (case 1 and 2 only). Context menu extensions should ignore this flag.
  242. //
  243. // High word (16-bit) are reserved for context specific communications
  244. // and the rest of flags (13-bit) are reserved by the system.
  245. //
  246. //
  247. // IContextMenu::InvokeCommand
  248. //
  249. // This member is called when the user has selected one of menuitems that
  250. // are inserted by previous QueryContextMenu member. In this case, the
  251. // LOWORD(lpici->lpVerb) contains the menuitem ID offset (menuitem ID -
  252. // idCmdFirst).
  253. //
  254. // This member function may also be called programmatically. In such a case,
  255. // lpici->lpVerb specifies the canonical name of the command to be invoked,
  256. // which is typically retrieved by GetCommandString member previously.
  257. //
  258. // Parameters in lpci:
  259. // cbSize -- Specifies the size of this structure (sizeof(*lpci))
  260. // hwnd -- Specifies the owner window for any message/dialog box.
  261. // fMask -- Specifies whether or not dwHotkey/hIcon paramter is valid.
  262. // lpVerb -- Specifies the command to be invoked.
  263. // lpParameters -- Parameters (optional)
  264. // lpDirectory -- Working directory (optional)
  265. // nShow -- Specifies the flag to be passed to ShowWindow (SW_*).
  266. // dwHotKey -- Hot key to be assigned to the app after invoked (optional).
  267. // hIcon -- Specifies the icon (optional).
  268. // hMonitor -- Specifies the default monitor (optional).
  269. //
  270. //
  271. // IContextMenu::GetCommandString
  272. //
  273. // This member function is called by the explorer either to get the
  274. // canonical (language independent) command name (uFlags == GCS_VERB) or
  275. // the help text ((uFlags & GCS_HELPTEXT) != 0) for the specified command.
  276. // The retrieved canonical string may be passed to its InvokeCommand
  277. // member function to invoke a command programmatically. The explorer
  278. // displays the help texts in its status bar; therefore, the length of
  279. // the help text should be reasonably short (<40 characters).
  280. //
  281. // Parameters:
  282. // idCmd -- Specifies menuitem ID offset (from idCmdFirst)
  283. // uFlags -- Either GCS_VERB or GCS_HELPTEXT
  284. // pwReserved -- Reserved (must pass NULL when calling, must ignore when called)
  285. // pszName -- Specifies the string buffer.
  286. // cchMax -- Specifies the size of the string buffer.
  287. //
  288. //===========================================================================
  289. // QueryContextMenu uFlags
  290. #define CMF_NORMAL 0x00000000
  291. #define CMF_DEFAULTONLY 0x00000001
  292. #define CMF_VERBSONLY 0x00000002
  293. #define CMF_EXPLORE 0x00000004
  294. #define CMF_NOVERBS 0x00000008
  295. #define CMF_CANRENAME 0x00000010
  296. #define CMF_NODEFAULT 0x00000020
  297. #define CMF_INCLUDESTATIC 0x00000040
  298. #define CMF_FINDHACK 0x00000080 // This is a hack - we should remove this bit ;Internal
  299. #define CMF_EXTENDEDVERBS 0x00000100 // rarely used verbs
  300. #define CMF_RESERVED 0xffff0000 // View specific
  301. ;begin_internal
  302. //
  303. // Private QueryContextMenuFlag passed from DefView
  304. //
  305. #define CMF_DVFILE 0x00010000 // "File" pulldown
  306. #define CMF_ICM3 0x00020000 // QueryContextMenu can assume IContextMenu3 semantics (i.e.,
  307. // will receive WM_INITMENUPOPUP, WM_MEASUREITEM, WM_DRAWITEM,
  308. // and WM_MENUCHAR, via HandleMenuMsg2)
  309. ;end_internal
  310. // GetCommandString uFlags
  311. #define GCS_VERBA 0x00000000 // canonical verb
  312. #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
  313. #define GCS_VALIDATEA 0x00000002 // validate command exists
  314. #define GCS_VERBW 0x00000004 // canonical verb (unicode)
  315. #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
  316. #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
  317. #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
  318. #ifdef UNICODE
  319. #define GCS_VERB GCS_VERBW
  320. #define GCS_HELPTEXT GCS_HELPTEXTW
  321. #define GCS_VALIDATE GCS_VALIDATEW
  322. #else
  323. #define GCS_VERB GCS_VERBA
  324. #define GCS_HELPTEXT GCS_HELPTEXTA
  325. #define GCS_VALIDATE GCS_VALIDATEA
  326. #endif
  327. #define CMDSTR_NEWFOLDERA "NewFolder"
  328. #define CMDSTR_VIEWLISTA "ViewList"
  329. #define CMDSTR_VIEWDETAILSA "ViewDetails"
  330. #define CMDSTR_NEWFOLDERW L"NewFolder"
  331. #define CMDSTR_VIEWLISTW L"ViewList"
  332. #define CMDSTR_VIEWDETAILSW L"ViewDetails"
  333. #ifdef UNICODE
  334. #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERW
  335. #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTW
  336. #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSW
  337. #else
  338. #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
  339. #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
  340. #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
  341. #endif
  342. #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
  343. #define CMIC_MASK_ICON SEE_MASK_ICON
  344. #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
  345. #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
  346. #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
  347. #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
  348. #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
  349. #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
  350. #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
  351. #define CMIC_MASK_NOZONECHECKS SEE_MASK_NOZONECHECKS
  352. #if (_WIN32_IE >= 0x0501)
  353. #define CMIC_MASK_SHIFT_DOWN 0x10000000
  354. #define CMIC_MASK_CONTROL_DOWN 0x40000000
  355. #endif // (_WIN32_IE >= 0x501)
  356. #if (_WIN32_IE >= 0x0560)
  357. #define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE
  358. #endif // (_WIN32_IE >= 0x560)
  359. #if (_WIN32_IE >= 0x0400)
  360. #define CMIC_MASK_PTINVOKE 0x20000000
  361. #define CMICEXSIZE_NT4 (SIZEOF(CMINVOKECOMMANDINFOEX) - SIZEOF(POINT)) ;Internal
  362. #endif
  363. #define CMIC_MASK_NO_HOOKS SEE_MASK_NO_HOOKS ;internal_win40
  364. #define CMIC_MASK_DATAOBJECT 0x40000000 // lpPara is IDataObject* ;Internal
  365. #define CMIC_MASK_MODAL 0x80000000 ;Internal
  366. #define CMIC_VALID_SEE_FLAGS SEE_VALID_CMIC_FLAGS ;Internal
  367. #include <pshpack8.h>
  368. //NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor
  369. typedef struct _CMINVOKECOMMANDINFO {
  370. DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
  371. DWORD fMask; // any combination of CMIC_MASK_*
  372. HWND hwnd; // might be NULL (indicating no owner window)
  373. LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
  374. LPCSTR lpParameters; // might be NULL (indicating no parameter)
  375. LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
  376. int nShow; // one of SW_ values for ShowWindow() API
  377. DWORD dwHotKey;
  378. HANDLE hIcon;
  379. } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
  380. typedef struct _CMInvokeCommandInfoEx {
  381. DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
  382. DWORD fMask; // any combination of CMIC_MASK_*
  383. HWND hwnd; // might be NULL (indicating no owner window)
  384. LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
  385. LPCSTR lpParameters; // might be NULL (indicating no parameter)
  386. LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
  387. int nShow; // one of SW_ values for ShowWindow() API
  388. DWORD dwHotKey;
  389. HANDLE hIcon;
  390. LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
  391. LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
  392. LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
  393. LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
  394. LPCWSTR lpTitleW; // Unicode title (for those who can use it)
  395. #if (_WIN32_IE >= 0x0400)
  396. POINT ptInvoke; // Point where it's invoked
  397. #endif
  398. } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
  399. #include <poppack.h> /* Return to byte packing */
  400. ;begin_internal
  401. #include <pshpack8.h>
  402. // the struct below is used for cross-process passing of CMINVOKECOMMANDINFOEX structs
  403. // we store offsets for the strings into ourself and we are win64 safe
  404. typedef struct {
  405. DWORD cbSize; // size of the struct
  406. DWORD fMask; // any combination of CMIC_MASK_*
  407. DWORD dwHwnd; // might be NULL (indicating no owner window)
  408. int nShow; // one of SW_ values for ShowWindow() API
  409. DWORD dwHotKey;
  410. POINT ptInvoke; // Point where it's invoked
  411. DWORD dwVerbW; // offset from struct to lpVerbW
  412. DWORD dwParametersW; // offset from struct to lpParametersW - might be NULL (indicating no parameter)
  413. DWORD dwDirectoryW; // offset from struct to lpDirectoryW - might be NULL (indicating no specific directory)
  414. DWORD dwTitleW; // offset from struct to lpTitleW - might be NULL (indicating no title)
  415. }ICIX_PERSIST;
  416. #include <poppack.h>
  417. ;end_internal
  418. #undef INTERFACE
  419. #define INTERFACE IContextMenu
  420. DECLARE_INTERFACE_(IContextMenu, IUnknown)
  421. {
  422. // *** IUnknown methods ***
  423. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  424. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  425. STDMETHOD_(ULONG,Release) (THIS) PURE;
  426. STDMETHOD(QueryContextMenu)(THIS_
  427. HMENU hmenu,
  428. UINT indexMenu,
  429. UINT idCmdFirst,
  430. UINT idCmdLast,
  431. UINT uFlags) PURE;
  432. STDMETHOD(InvokeCommand)(THIS_
  433. LPCMINVOKECOMMANDINFO lpici) PURE;
  434. STDMETHOD(GetCommandString)(THIS_
  435. UINT_PTR idCmd,
  436. UINT uType,
  437. UINT * pwReserved,
  438. LPSTR pszName,
  439. UINT cchMax) PURE;
  440. };
  441. typedef IContextMenu * LPCONTEXTMENU;
  442. #define CONTEXTMENU_IDCMD_FIRST 1 // minimal QueryContextMenu idCmdFirst value // ;internal
  443. #define CONTEXTMENU_IDCMD_LAST 0x7fff // maximal QueryContextMenu idCmdLast value // ;internal
  444. //
  445. // IContextMenu2 (IContextMenu with one new member)
  446. //
  447. // IContextMenu2::HandleMenuMsg
  448. //
  449. // This function is called, if the client of IContextMenu is aware of
  450. // IContextMenu2 interface and receives one of following messages while
  451. // it is calling TrackPopupMenu (in the window proc of hwnd):
  452. // WM_INITPOPUP, WM_DRAWITEM and WM_MEASUREITEM
  453. // The callee may handle these messages to draw owner draw menuitems.
  454. //
  455. #undef INTERFACE
  456. #define INTERFACE IContextMenu2
  457. DECLARE_INTERFACE_(IContextMenu2, IContextMenu)
  458. {
  459. // *** IUnknown methods ***
  460. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  461. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  462. STDMETHOD_(ULONG,Release) (THIS) PURE;
  463. // *** IContextMenu methods ***
  464. STDMETHOD(QueryContextMenu)(THIS_
  465. HMENU hmenu,
  466. UINT indexMenu,
  467. UINT idCmdFirst,
  468. UINT idCmdLast,
  469. UINT uFlags) PURE;
  470. STDMETHOD(InvokeCommand)(THIS_
  471. LPCMINVOKECOMMANDINFO lpici) PURE;
  472. STDMETHOD(GetCommandString)(THIS_
  473. UINT_PTR idCmd,
  474. UINT uType,
  475. UINT * pwReserved,
  476. LPSTR pszName,
  477. UINT cchMax) PURE;
  478. // *** IContextMenu2 methods ***
  479. STDMETHOD(HandleMenuMsg)(THIS_
  480. UINT uMsg,
  481. WPARAM wParam,
  482. LPARAM lParam) PURE;
  483. };
  484. typedef IContextMenu2 * LPCONTEXTMENU2;
  485. //
  486. // IContextMenu3 (IContextMenu with one new member)
  487. //
  488. // IContextMenu3::HandleMenuMsg2
  489. //
  490. // This function is called, if the client of IContextMenu is aware of
  491. // IContextMenu3 interface and receives a menu message while
  492. // it is calling TrackPopupMenu (in the window proc of hwnd):
  493. //
  494. #undef INTERFACE
  495. #define INTERFACE IContextMenu3
  496. DECLARE_INTERFACE_(IContextMenu3, IContextMenu2)
  497. {
  498. // *** IUnknown methods ***
  499. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  500. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  501. STDMETHOD_(ULONG,Release) (THIS) PURE;
  502. // *** IContextMenu methods ***
  503. STDMETHOD(QueryContextMenu)(THIS_
  504. HMENU hmenu,
  505. UINT indexMenu,
  506. UINT idCmdFirst,
  507. UINT idCmdLast,
  508. UINT uFlags) PURE;
  509. STDMETHOD(InvokeCommand)(THIS_
  510. LPCMINVOKECOMMANDINFO lpici) PURE;
  511. STDMETHOD(GetCommandString)(THIS_
  512. UINT_PTR idCmd,
  513. UINT uType,
  514. UINT * pwReserved,
  515. LPSTR pszName,
  516. UINT cchMax) PURE;
  517. // *** IContextMenu2 methods ***
  518. STDMETHOD(HandleMenuMsg)(THIS_
  519. UINT uMsg,
  520. WPARAM wParam,
  521. LPARAM lParam) PURE;
  522. // *** IContextMenu3 methods ***
  523. STDMETHOD(HandleMenuMsg2)(THIS_
  524. UINT uMsg,
  525. WPARAM wParam,
  526. LPARAM lParam,
  527. LRESULT* plResult) PURE;
  528. };
  529. typedef IContextMenu3 * LPCONTEXTMENU3;
  530. //---------------------------------------------------------------------------- ;Internal
  531. // Internal helper macro ;Internal
  532. //---------------------------------------------------------------------------- ;Internal
  533. ;Internal
  534. #define _IOffset(class, itf) ((UINT_PTR)&(((class *)0)->itf)) ;Internal
  535. #define IToClass(class, itf, pitf) ((class *)(((LPSTR)pitf)-_IOffset(class, itf))) ;Internal
  536. #define IToClassN(class, itf, pitf) IToClass(class, itf, pitf) ;Internal
  537. ;Internal
  538. // ;Internal
  539. // Helper macro definitions ;Internal
  540. // ;Internal
  541. #define S_BOOL(f) MAKE_SCODE(SEVERITY_SUCCESS, 0, f) ;Internal
  542. ;Internal
  543. #ifdef DEBUG ;Internal
  544. #define ReleaseAndAssert(punk) Assert(punk->lpVtbl->Release(punk)==0) ;Internal
  545. #else ;Internal
  546. #define ReleaseAndAssert(punk) (punk->lpVtbl->Release(punk)) ;Internal
  547. #endif ;Internal
  548. #if (_WIN32_IE >= 0x0500)
  549. #undef INTERFACE
  550. #define INTERFACE IPersistFolder3
  551. #define CSIDL_FLAG_PFTI_TRACKTARGET CSIDL_FLAG_DONT_VERIFY
  552. // DESCRIPTION: PERSIST_FOLDER_TARGET_INFO
  553. // This stucture is used for Folder Shortcuts which allow the shell to
  554. // have a file system folder act like another area in the name space.
  555. // One of pidlTargetFolder, szTargetParsingName, or csidl needs to
  556. // specify the destination name space.
  557. //
  558. // pidlTargetFolder: This is a full pidl to the target folder. Can be NULL in the IPersistFolder3::InitializeEx()
  559. // call but not in the GetFolderTargetInfo() return structure.
  560. // szTargetParsingName: Empty string if not specified. Ortherwise, it is the parsible name
  561. // to the target. This name can be parsed by IShellFolder::
  562. // ParsedName() from the desktop.
  563. // szNetworkProvider: Can be an empty string. If not empty, it specifies the type of network
  564. // provider that will be used when binding to the target. This is used
  565. // for performance optimizations for the WNet APIs.
  566. // dwAttributes: -1 if not known. These are the SFGAO_ flags for IShellFolder::GetAttributesOf()
  567. // csidl: This is -1 if it's not used. This can be used instead of pidlTargetFolder or
  568. // szTargetParsingName to indicate the TargetFolder. See the list of CSIDL_ folders
  569. // below. CSIDL_FLAG_PFTI_TRACKTARGET means that the IShellFolder's target folder
  570. // should change if the user changes the target of the underlying CSIDL value.
  571. // You can also pass CSIDL_FLAG_CREATE to indicate that the target folder
  572. // should be created if it does not exist. No other CSIDL_FLAG_* values are supported.
  573. #include <pshpack8.h>
  574. typedef struct
  575. {
  576. LPITEMIDLIST pidlTargetFolder; // pidl for the folder we want to intiailize
  577. WCHAR szTargetParsingName[MAX_PATH]; // optional parsing name for the target
  578. WCHAR szNetworkProvider[MAX_PATH]; // optional network provider
  579. DWORD dwAttributes; // optional FILE_ATTRIBUTES_ flags (-1 if not used)
  580. int csidl; // optional folder index (SHGetFolderPath()) -1 if not used
  581. } PERSIST_FOLDER_TARGET_INFO;
  582. #include <poppack.h> /* Return to byte packing */
  583. // DESCRIPTION: IPersistFolder3
  584. // This interface is implemented by an IShellFolder object that wants non-default
  585. // handling of Folder Shortcuts. In general, shell name space extensions should use
  586. // pidlRoot (the alias pidl) as their location in the name space and pass it to public
  587. // APIs, such as ShellExecute(). The one exception is that pidlTarget should be used
  588. // when sending ChangeNotifies or registering to listen for change notifies
  589. // (see SFVM_GETNOTIFY).
  590. //
  591. // InitializeEx: This method initializes an IShellFolder and specifies where
  592. // it is rooted in the name space.
  593. // pbc: May be NULL.
  594. // pidlRoot: This is the same parameter as IPersistFolder::Initialize(). Caller allocates
  595. // and frees this parameter.
  596. // ppfti: May be NULL, in which case this is the same as a call to IPersistFolder::Initialize().
  597. // Otherwise this is a Folder Shortcut and this structure specifies the target
  598. // folder and it's attributes.
  599. // GetFolderTargetInfo: This is used by the caller to find information about
  600. // the folder shortcut. This structure may not be initialized by the caller,
  601. // so the callee needs to initialize every member. The callee allocates
  602. // pidlTargetFolder and the caller will free it. Filling in pidlTargetFolder is
  603. // ALWAYS required.
  604. DECLARE_INTERFACE_(IPersistFolder3, IPersistFolder2)
  605. {
  606. // *** IUnknown methods ***
  607. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  608. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  609. STDMETHOD_(ULONG,Release)(THIS) PURE;
  610. // *** IPersist methods ***
  611. STDMETHOD(GetClassID)(THIS_ LPCLSID lpClassID) PURE;
  612. // *** IPersistFolder methods ***
  613. STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidl) PURE;
  614. // *** IPersistFolder2 methods ***
  615. STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST *ppidl) PURE;
  616. // *** IPersistFolder3 methods ***
  617. STDMETHOD(InitializeEx)(THIS_ IBindCtx *pbc, LPCITEMIDLIST pidlRoot, const PERSIST_FOLDER_TARGET_INFO *ppfti) PURE;
  618. STDMETHOD(GetFolderTargetInfo)(THIS_ PERSIST_FOLDER_TARGET_INFO *ppfti) PURE;
  619. };
  620. ;begin_internal
  621. //
  622. // this interface is just the IID. return back
  623. // a pointer to the IPersist interface if the object
  624. // implementation is free threaded. this is used
  625. // for performance on free threaded objects.
  626. //
  627. #define IPersistFreeThreadedObject IPersist
  628. ;end_internal
  629. #endif
  630. //
  631. // this interface is just the IID. return back ;Internal
  632. // a pointer to the IDropTarget interface if the ;Internal
  633. // object calls DAD_DragLeave/DAD_SetDragImage ;Internal
  634. // in its IDropTarget::Drop(). ;Internal
  635. // ;Internal
  636. #define IDropTargetWithDADSupport IDropTarget ;Internal
  637. //===========================================================================
  638. //
  639. // IExtractIcon interface
  640. //
  641. // This interface is used in two different places in the shell.
  642. //
  643. // Case-1: Icons of sub-folders for the scope-pane of the explorer.
  644. //
  645. // It is used by the explorer to get the "icon location" of
  646. // sub-folders from each shell folders. When the user expands a folder
  647. // in the scope pane of the explorer, the explorer does following:
  648. // (1) binds to the folder (gets IShellFolder),
  649. // (2) enumerates its sub-folders by calling its EnumObjects member,
  650. // (3) calls its GetUIObjectOf member to get IExtractIcon interface
  651. // for each sub-folders.
  652. // In this case, the explorer uses only IExtractIcon::GetIconLocation
  653. // member to get the location of the appropriate icon. An icon location
  654. // always consists of a file name (typically DLL or EXE) and either an icon
  655. // resource or an icon index.
  656. //
  657. //
  658. // Case-2: Extracting an icon image from a file
  659. //
  660. // It is used by the shell when it extracts an icon image
  661. // from a file. When the shell is extracting an icon from a file,
  662. // it does following:
  663. // (1) creates the icon extraction handler object (by getting its CLSID
  664. // under the {ProgID}\shell\ExtractIconHanler key and calling
  665. // CoCreateInstance requesting for IExtractIcon interface).
  666. // (2) Calls IExtractIcon::GetIconLocation.
  667. // (3) Then, calls IExtractIcon::ExtractIcon with the location/index pair.
  668. // (4) If (3) returns NOERROR, it uses the returned icon.
  669. // (5) Otherwise, it recursively calls this logic with new location
  670. // assuming that the location string contains a fully qualified path name.
  671. //
  672. // From extension programmer's point of view, there are only two cases
  673. // where they provide implementations of IExtractIcon:
  674. // Case-1) providing explorer extensions (i.e., IShellFolder).
  675. // Case-2) providing per-instance icons for some types of files.
  676. //
  677. // Because Case-1 is described above, we'll explain only Case-2 here.
  678. //
  679. // When the shell is about display an icon for a file, it does following:
  680. // (1) Finds its ProgID and ClassID.
  681. // (2) If the file has a ClassID, it gets the icon location string from the
  682. // "DefaultIcon" key under it. The string indicates either per-class
  683. // icon (e.g., "FOOBAR.DLL,2") or per-instance icon (e.g., "%1,1").
  684. // (3) If a per-instance icon is specified, the shell creates an icon
  685. // extraction handler object for it, and extracts the icon from it
  686. // (which is described above).
  687. //
  688. // It is important to note that the shell calls IExtractIcon::GetIconLocation
  689. // first, then calls IExtractIcon::Extract. Most application programs
  690. // that support per-instance icons will probably store an icon location
  691. // (DLL/EXE name and index/id) rather than an icon image in each file.
  692. // In those cases, a programmer needs to implement only the GetIconLocation
  693. // member and it Extract member simply returns S_FALSE. They need to
  694. // implement Extract member only if they decided to store the icon images
  695. // within files themselved or some other database (which is very rare).
  696. //
  697. //
  698. //
  699. // [Member functions]
  700. //
  701. //
  702. // IExtractIcon::GetIconLocation
  703. //
  704. // This function returns an icon location.
  705. //
  706. // Parameters:
  707. // uFlags [in] -- Specifies if it is opened or not (GIL_OPENICON or 0)
  708. // szIconFile [out] -- Specifies the string buffer buffer for a location name.
  709. // cchMax [in] -- Specifies the size of szIconFile (almost always MAX_PATH)
  710. // piIndex [out] -- Sepcifies the address of UINT for the index.
  711. // pwFlags [out] -- Returns GIL_* flags
  712. // Returns:
  713. // NOERROR, if it returns a valid location; S_FALSE, if the shell use a
  714. // default icon.
  715. //
  716. // Notes: The location may or may not be a path to a file. The caller can
  717. // not assume anything unless the subsequent Extract member call returns
  718. // S_FALSE.
  719. //
  720. // if the returned location is not a path to a file, GIL_NOTFILENAME should
  721. // be set in the returned flags.
  722. //
  723. // IExtractIcon::Extract
  724. //
  725. // This function extracts an icon image from a specified file.
  726. //
  727. // Parameters:
  728. // pszFile [in] -- Specifies the icon location (typically a path to a file).
  729. // nIconIndex [in] -- Specifies the icon index.
  730. // phiconLarge [out] -- Specifies the HICON variable for large icon.
  731. // phiconSmall [out] -- Specifies the HICON variable for small icon.
  732. // nIconSize [in] -- Specifies the size icon required (size of large icon)
  733. // LOWORD is the requested large icon size
  734. // HIWORD is the requested small icon size
  735. // Returns:
  736. // NOERROR, if it extracted the from the file.
  737. // S_FALSE, if the caller should extract from the file specified in the
  738. // location.
  739. //
  740. //===========================================================================
  741. // GetIconLocation() input flags
  742. #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
  743. #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
  744. #define GIL_ASYNC 0x0020 // this is an async extract, return E_PENDING
  745. #define GIL_DEFAULTICON 0x0040 // get the default icon location if the final one takes too long to get
  746. #define GIL_FORSHORTCUT 0x0080 // the icon is for a shortcut to the object
  747. // GetIconLocation() return flags
  748. #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
  749. #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
  750. #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
  751. #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
  752. #define GIL_DONTCACHE 0x0010 // this icon should not be cached
  753. #undef INTERFACE
  754. #define INTERFACE IExtractIconA
  755. DECLARE_INTERFACE_(IExtractIconA, IUnknown) // exic
  756. {
  757. // *** IUnknown methods ***
  758. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  759. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  760. STDMETHOD_(ULONG,Release) (THIS) PURE;
  761. // *** IExtractIcon methods ***
  762. STDMETHOD(GetIconLocation)(THIS_
  763. UINT uFlags,
  764. LPSTR szIconFile,
  765. UINT cchMax,
  766. int * piIndex,
  767. UINT * pwFlags) PURE;
  768. STDMETHOD(Extract)(THIS_
  769. LPCSTR pszFile,
  770. UINT nIconIndex,
  771. HICON *phiconLarge,
  772. HICON *phiconSmall,
  773. UINT nIconSize) PURE;
  774. };
  775. typedef IExtractIconA * LPEXTRACTICONA;
  776. #undef INTERFACE
  777. #define INTERFACE IExtractIconW
  778. DECLARE_INTERFACE_(IExtractIconW, IUnknown) // exic
  779. {
  780. // *** IUnknown methods ***
  781. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  782. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  783. STDMETHOD_(ULONG,Release) (THIS) PURE;
  784. // *** IExtractIcon methods ***
  785. STDMETHOD(GetIconLocation)(THIS_
  786. UINT uFlags,
  787. LPWSTR szIconFile,
  788. UINT cchMax,
  789. int * piIndex,
  790. UINT * pwFlags) PURE;
  791. STDMETHOD(Extract)(THIS_
  792. LPCWSTR pszFile,
  793. UINT nIconIndex,
  794. HICON *phiconLarge,
  795. HICON *phiconSmall,
  796. UINT nIconSize) PURE;
  797. };
  798. typedef IExtractIconW * LPEXTRACTICONW;
  799. #ifdef UNICODE
  800. #define IExtractIcon IExtractIconW
  801. #define IExtractIconVtbl IExtractIconWVtbl
  802. #define LPEXTRACTICON LPEXTRACTICONW
  803. #else
  804. #define IExtractIcon IExtractIconA
  805. #define IExtractIconVtbl IExtractIconAVtbl
  806. #define LPEXTRACTICON LPEXTRACTICONA
  807. #endif
  808. //===========================================================================
  809. //
  810. // IShellIcon Interface
  811. //
  812. // used to get a icon index for a IShellFolder object.
  813. //
  814. // this interface can be implemented by a IShellFolder, as a quick way to
  815. // return the icon for a object in the folder.
  816. //
  817. // a instance of this interface is only created once for the folder, unlike
  818. // IExtractIcon witch is created once for each object.
  819. //
  820. // if a ShellFolder does not implement this interface, the standard
  821. // GetUIObject(....IExtractIcon) method will be used to get a icon
  822. // for all objects.
  823. //
  824. // the following standard imagelist indexs can be returned:
  825. //
  826. // 0 document (blank page) (not associated)
  827. // 1 document (with stuff on the page)
  828. // 2 application (exe, com, bat)
  829. // 3 folder (plain)
  830. // 4 folder (open)
  831. //
  832. // IShellIcon:GetIconOf(pidl, flags, lpIconIndex)
  833. //
  834. // pidl object to get icon for.
  835. // flags GIL_* input flags (GIL_OPEN, ...)
  836. // lpIconIndex place to return icon index.
  837. //
  838. // returns:
  839. // NOERROR, if lpIconIndex contains the correct system imagelist index.
  840. // S_FALSE, if unable to get icon for this object, go through
  841. // GetUIObject, IExtractIcon, methods.
  842. //
  843. //===========================================================================
  844. #undef INTERFACE
  845. #define INTERFACE IShellIcon
  846. DECLARE_INTERFACE_(IShellIcon, IUnknown) // shi
  847. {
  848. // *** IUnknown methods ***
  849. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  850. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  851. STDMETHOD_(ULONG,Release) (THIS) PURE;
  852. // *** IShellIcon methods ***
  853. STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags,
  854. LPINT lpIconIndex) PURE;
  855. };
  856. typedef IShellIcon *LPSHELLICON;
  857. //===========================================================================
  858. //
  859. // IShellIconOverlayIdentifier
  860. //
  861. // Used to identify a file as a member of the group of files that have this specific
  862. // icon overlay
  863. //
  864. // Users can create new IconOverlayIdentifiers and place them in the following registry
  865. // location together with the Icon overlay image and their priority.
  866. // HKEY_LOCAL_MACHINE "Software\\Microsoft\\Windows\\CurrentVersion\\ShellIconOverlayIdentifiers"
  867. //
  868. // The shell will enumerate through all IconOverlayIdentifiers at start, and prioritize
  869. // them according to internal rules, in case the internal rules don't apply, we use their
  870. // input priority
  871. //
  872. // IShellIconOverlayIdentifier:IsMemberOf(LPCWSTR pwszPath, DWORD dwAttrib)
  873. // pwszPath full path of the file
  874. // dwAttrib attribute of this file
  875. //
  876. // returns:
  877. // S_OK, if the file is a member
  878. // S_FALSE, if the file is not a member
  879. // E_FAIL, if the operation failed due to bad WIN32_FIND_DATA
  880. //
  881. // IShellIconOverlayIdentifier::GetOverlayInfo(LPWSTR pwszIconFile, int * pIndex, DWORD * dwFlags) PURE;
  882. // pszIconFile the path of the icon file
  883. // pIndex Depend on the flags, this could contain the IconIndex
  884. // dwFlags defined below
  885. //
  886. // IShellIconOverlayIdentifier::GetPriority(int * pIPriority) PURE;
  887. // pIPriority the priority of this Overlay Identifier
  888. //
  889. //===========================================================================
  890. #undef INTERFACE
  891. #define INTERFACE IShellIconOverlayIdentifier
  892. DECLARE_INTERFACE_(IShellIconOverlayIdentifier, IUnknown)
  893. {
  894. // *** IUnknown methods ***
  895. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  896. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  897. STDMETHOD_(ULONG,Release) (THIS) PURE;
  898. // *** IShellIconOverlayIdentifier methods ***
  899. STDMETHOD (IsMemberOf)(THIS_ LPCWSTR pwszPath, DWORD dwAttrib) PURE;
  900. STDMETHOD (GetOverlayInfo)(THIS_ LPWSTR pwszIconFile, int cchMax, int * pIndex, DWORD * pdwFlags) PURE;
  901. STDMETHOD (GetPriority)(THIS_ int * pIPriority) PURE;
  902. };
  903. #define ISIOI_ICONFILE 0x00000001 // path is returned through pwszIconFile
  904. #define ISIOI_ICONINDEX 0x00000002 // icon index in pwszIconFile is returned through pIndex
  905. //===========================================================================
  906. //
  907. // IShellIconOverlayManager
  908. //
  909. // Used to return the icon overlay information including OverlayIndex, Image Index or Priority for an IShellFolder object
  910. ;begin_internal
  911. // this is only inherited by CFSFolder_IconOverlayManager, it enumerates through all IconOverlayID's and
  912. // keep their information in an array.
  913. ;end_internal
  914. //
  915. // IShellIconOverlayManager:GetFileOverlayInfo(LPCWSTR pwszPath, DWORD dwAttrib, int * pIndex, DWORD dwflags)
  916. // pwszPath full path of the file
  917. // dwAttrib attribute of this file
  918. // pIndex pointer to the Icon Index in the system image list
  919. // pOverlayIndex pointer to the OverlayIndex in the system image list
  920. // pPriority pointer to the Priority of this overlay
  921. // IShellIconOverlayManager:GetReservedOverlayInfo(LPCWSTR pwszPath, DWORD dwAttrib, int * pIndex, DWORD dwflags, int iReservedID)
  922. // iReservedID reserved icon overlay id
  923. // returns:
  924. // S_OK, if the index of an Overlay is found
  925. // S_FALSE, if no Overlay exists for this file
  926. // E_FAIL, if lpfd is bad
  927. // IShellIconOverlayManager:RefreshOverlayImages(DWORD dwFlags)
  928. // This will refresh the overlay cache, depends on the dwFlags passed in
  929. // It will reload the icons into the imagelist, when passed SIOM_ICONINDEX
  930. // IShellIconOverlayManager::LoadNonloadedOverlayIdentifiers()
  931. // This method loads any registered overlay identifiers (handlers) that
  932. // are not currently loaded.
  933. // IShellIconOverlayManager::OverlayIndexFromImageIndex(int iImage, int *piIndex, BOOL fAdd)
  934. // iImage existing shell image list index to look for
  935. // piIndex returned overlay index
  936. // fAdd Add image if not already present?
  937. //===========================================================================
  938. #undef INTERFACE
  939. #define INTERFACE IShellIconOverlayManager
  940. DECLARE_INTERFACE_(IShellIconOverlayManager, IUnknown)
  941. {
  942. // *** IUnknown methods ***
  943. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  944. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  945. STDMETHOD_(ULONG,Release) (THIS) PURE;
  946. // *** IShellIconOverlayManager methods ***
  947. STDMETHOD(GetFileOverlayInfo)(THIS_ LPCWSTR pwszPath, DWORD dwAttrib, int * pIndex, DWORD dwflags) PURE;
  948. STDMETHOD(GetReservedOverlayInfo)(THIS_ LPCWSTR pwszPath, DWORD dwAttrib, int * pIndex, DWORD dwflags, int iReservedID) PURE;
  949. STDMETHOD(RefreshOverlayImages)(THIS_ DWORD dwFlags) PURE;
  950. STDMETHOD(LoadNonloadedOverlayIdentifiers)(THIS) PURE;
  951. STDMETHOD(OverlayIndexFromImageIndex)(THIS_ int iImage, int * piIndex, BOOL fAdd) PURE;
  952. };
  953. #define SIOM_OVERLAYINDEX 1
  954. #define SIOM_ICONINDEX 2
  955. // #define SIOM_PRIORITY 3
  956. #define SIOM_RESERVED_SHARED 0
  957. #define SIOM_RESERVED_LINK 1
  958. #define SIOM_RESERVED_SLOWFILE 2
  959. //===========================================================================
  960. //
  961. // IShellIconOverlay
  962. //
  963. // Used to return the icon overlay index or its icon index for an IShellFolder object,
  964. // this is always implemented with IShellFolder
  965. //
  966. // IShellIconOverlay:GetOverlayIndex(LPCITEMIDLIST pidl, DWORD * pdwIndex)
  967. // pidl object to identify icon overlay for.
  968. // pdwIndex the Overlay Index in the system image list
  969. //
  970. // IShellIconOverlay:GetOverlayIconIndex(LPCITEMIDLIST pidl, DWORD * pdwIndex)
  971. // pdwIconIndex the Overlay Icon index in the system image list
  972. // This method is only used for those who are interested in seeing the real bits
  973. // of the Overlay Icon
  974. //
  975. // returns:
  976. // S_OK, if the index of an Overlay is found
  977. // S_FALSE, if no Overlay exists for this file
  978. // E_FAIL, if pidl is bad
  979. //
  980. //===========================================================================
  981. #undef INTERFACE
  982. #define INTERFACE IShellIconOverlay
  983. DECLARE_INTERFACE_(IShellIconOverlay, IUnknown)
  984. {
  985. // *** IUnknown methods ***
  986. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  987. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  988. STDMETHOD_(ULONG,Release) (THIS) PURE;
  989. // *** IShellIconOverlay methods ***
  990. STDMETHOD(GetOverlayIndex)(THIS_ LPCITEMIDLIST pidl, int * pIndex) PURE;
  991. STDMETHOD(GetOverlayIconIndex)(THIS_ LPCITEMIDLIST pidl, int * pIconIndex) PURE;
  992. };
  993. #define OI_ASYNC 0xFFFFEEEE
  994. //-------------------------------------------------------------------------
  995. //
  996. // SHGetIconOverlayIndex
  997. //
  998. // This function takes the path and icon/res id to the icon and convert it into
  999. // an overlay index in the system image list.
  1000. // Note: there are totally only 15 slots for system image overlays, some of which
  1001. // was reserved by the system, or taken by the overlayidentifiers, so it's possible
  1002. // that this function would fail and return -1;
  1003. //
  1004. // To get the default overlays in the system, such as the share hand, link shortcut
  1005. // and slow files, pass NULL as the file name, then the IDO_SHGIOI_* flags as the icon index
  1006. //-------------------------------------------------------------------------
  1007. #define IDO_SHGIOI_SHARE 0x0FFFFFFF
  1008. #define IDO_SHGIOI_LINK 0x0FFFFFFE
  1009. #define IDO_SHGIOI_SLOWFILE 0x0FFFFFFFD
  1010. SHSTDAPI_(int) SHGetIconOverlayIndex%(LPCTSTR% pszIconPath, int iIconIndex);
  1011. ;begin_internal
  1012. //===========================================================================
  1013. //
  1014. // IBrowserBand
  1015. //
  1016. // IBrowserBand::GetObjectBB(REFIID riid, void **ppv)
  1017. // Obtain a service from the web browser.
  1018. //
  1019. // IBrowserBand::SetBrowserBandInfo(DWORD dwMask, PBROWSERBANDINFO pbbi)
  1020. // Set browser band properties based on members of browserbandinfo struct
  1021. // specified by dwMask. These properties include title, deskband mode, and
  1022. // current size.
  1023. //
  1024. //===========================================================================
  1025. typedef struct {
  1026. UINT cbSize;
  1027. DWORD dwModeFlags;
  1028. BSTR bstrTitle;
  1029. SIZE sizeMin;
  1030. SIZE sizeMax;
  1031. SIZE sizeCur;
  1032. } BROWSERBANDINFO, *PBROWSERBANDINFO;
  1033. #define BBIM_MODEFLAGS 0x00000001
  1034. #define BBIM_TITLE 0x00000002
  1035. #define BBIM_SIZEMIN 0x00000004
  1036. #define BBIM_SIZEMAX 0x00000008
  1037. #define BBIM_SIZECUR 0x00000010
  1038. #undef INTERFACE
  1039. #define INTERFACE IBrowserBand
  1040. DECLARE_INTERFACE_(IBrowserBand, IUnknown)
  1041. {
  1042. // *** IUnknown methods ***
  1043. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  1044. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1045. STDMETHOD_(ULONG,Release)(THIS) PURE;
  1046. // *** IBrowserBand methods ***
  1047. STDMETHOD(GetObjectBB)(THIS_ REFIID riid, void **ppv) PURE;
  1048. STDMETHOD(SetBrowserBandInfo)(THIS_ DWORD dwMask, PBROWSERBANDINFO pbbi) PURE;
  1049. STDMETHOD(GetBrowserBandInfo)(THIS_ DWORD dwMask, PBROWSERBANDINFO pbbi) PURE;
  1050. };
  1051. ;end_internal
  1052. #if (_WIN32_IE >= 0x0400)
  1053. ;begin_internal
  1054. // NT4 Console Server included shell32\shlink.h to get structure
  1055. // definitions and mimicked shell32\shlink.c to understand the
  1056. // stream format so our stream format is fixed forever. This is
  1057. // not bad since it was designed with extension in mind. We need
  1058. // to publish (as privately as possible) the file format and
  1059. // structures needed to read the file format.
  1060. //
  1061. // The stream format is a SHELL_LINK_DATA followed by
  1062. // if SLDF_HAS_ID_LIST an ILSaveToStream followed by
  1063. // if SLDF_HAS_LINK_INFO a LINKINFO followed by
  1064. // if SLDF_HAS_NAME a STREAMSTRING followed by
  1065. // if SLDF_RELPATH a STREAMSTRING followed by
  1066. // if SLDF_WORKINGDIR a STREAMSTRING followed by
  1067. // if SLDF_HAS_ARGS a STREAMSTRING followed by
  1068. // if SLDF_HAS_ICON_LOCATION a STREAMSTRING followed by
  1069. // SHWriteDataBlockList list of signature blocks
  1070. //
  1071. // Where a STREAMSTRING is a USHORT count of characters
  1072. // followed by that many (SLDF_UNICODE ? WIDE : ANSI) characters.
  1073. //
  1074. typedef struct { // sld
  1075. DWORD cbSize; // signature for this data structure
  1076. CLSID clsid; // our GUID
  1077. DWORD dwFlags; // SHELL_LINK_DATA_FLAGS enumeration
  1078. DWORD dwFileAttributes;
  1079. FILETIME ftCreationTime;
  1080. FILETIME ftLastAccessTime;
  1081. FILETIME ftLastWriteTime;
  1082. DWORD nFileSizeLow;
  1083. int iIcon;
  1084. int iShowCmd;
  1085. WORD wHotkey;
  1086. WORD wUnused;
  1087. DWORD dwRes1;
  1088. DWORD dwRes2;
  1089. } SHELL_LINK_DATA, *LPSHELL_LINK_DATA;
  1090. ;end_internal
  1091. // IShellLinkDataList::GetFlags()/SetFlags()
  1092. typedef enum {
  1093. SLDF_HAS_ID_LIST = 0x00000001, // Shell link saved with ID list
  1094. SLDF_HAS_LINK_INFO = 0x00000002, // Shell link saved with LinkInfo
  1095. SLDF_HAS_NAME = 0x00000004,
  1096. SLDF_HAS_RELPATH = 0x00000008,
  1097. SLDF_HAS_WORKINGDIR = 0x00000010,
  1098. SLDF_HAS_ARGS = 0x00000020,
  1099. SLDF_HAS_ICONLOCATION = 0x00000040,
  1100. SLDF_UNICODE = 0x00000080, // the strings are unicode
  1101. SLDF_FORCE_NO_LINKINFO = 0x00000100, // don't create a LINKINFO (make a dumb link)
  1102. SLDF_HAS_EXP_SZ = 0x00000200, // the link contains expandable env strings
  1103. SLDF_RUN_IN_SEPARATE = 0x00000400, // Run the 16-bit target exe in a separate VDM/WOW
  1104. SLDF_HAS_LOGO3ID = 0x00000800, // this link is a special Logo3/MSICD link
  1105. SLDF_HAS_DARWINID = 0x00001000, // this link is a special Darwin link
  1106. SLDF_RUNAS_USER = 0x00002000, // Run this link as a different user
  1107. SLDF_HAS_EXP_ICON_SZ = 0x00004000, // contains expandable env string for icon path
  1108. SLDF_NO_PIDL_ALIAS = 0x00008000, // don't ever resolve to a logical location
  1109. SLDF_FORCE_UNCNAME = 0x00010000, // make GetPath() prefer the UNC name to the local name
  1110. SLDF_RUN_WITH_SHIMLAYER = 0x00020000, // Launch the target of this link w/ shim layer active
  1111. SLDF_RESERVED = 0x80000000, // Reserved-- so we can use the low word as an index value in the future
  1112. } SHELL_LINK_DATA_FLAGS;
  1113. typedef struct tagDATABLOCKHEADER
  1114. {
  1115. DWORD cbSize; // Size of this extra data block
  1116. DWORD dwSignature; // signature of this extra data block
  1117. } DATABLOCK_HEADER, *LPDATABLOCK_HEADER, *LPDBLIST;
  1118. typedef struct {
  1119. #ifdef __cplusplus
  1120. DATABLOCK_HEADER dbh;
  1121. #else
  1122. DATABLOCK_HEADER;
  1123. #endif
  1124. WORD wFillAttribute; // fill attribute for console
  1125. WORD wPopupFillAttribute; // fill attribute for console popups
  1126. COORD dwScreenBufferSize; // screen buffer size for console
  1127. COORD dwWindowSize; // window size for console
  1128. COORD dwWindowOrigin; // window origin for console
  1129. DWORD nFont;
  1130. DWORD nInputBufferSize;
  1131. COORD dwFontSize;
  1132. UINT uFontFamily;
  1133. UINT uFontWeight;
  1134. WCHAR FaceName[LF_FACESIZE];
  1135. UINT uCursorSize;
  1136. BOOL bFullScreen;
  1137. BOOL bQuickEdit;
  1138. BOOL bInsertMode;
  1139. BOOL bAutoPosition;
  1140. UINT uHistoryBufferSize;
  1141. UINT uNumberOfHistoryBuffers;
  1142. BOOL bHistoryNoDup;
  1143. COLORREF ColorTable[ 16 ];
  1144. } NT_CONSOLE_PROPS, *LPNT_CONSOLE_PROPS;
  1145. #define NT_CONSOLE_PROPS_SIG 0xA0000002
  1146. // This is a FE Console property
  1147. typedef struct {
  1148. #ifdef __cplusplus
  1149. DATABLOCK_HEADER dbh;
  1150. #else
  1151. DATABLOCK_HEADER;
  1152. #endif
  1153. UINT uCodePage;
  1154. } NT_FE_CONSOLE_PROPS, *LPNT_FE_CONSOLE_PROPS;
  1155. #define NT_FE_CONSOLE_PROPS_SIG 0xA0000004
  1156. #if (_WIN32_IE >= 0x0500)
  1157. typedef struct {
  1158. #ifdef __cplusplus
  1159. DATABLOCK_HEADER dbh;
  1160. #else
  1161. DATABLOCK_HEADER;
  1162. #endif
  1163. CHAR szDarwinID[MAX_PATH]; // ANSI darwin ID associated with link
  1164. WCHAR szwDarwinID[MAX_PATH]; // UNICODE darwin ID associated with link
  1165. } EXP_DARWIN_LINK, *LPEXP_DARWIN_LINK;
  1166. #define EXP_DARWIN_ID_SIG 0xA0000006
  1167. // BUGBUG (reinerf) - this has the same value as EXP_SZ_ICON_SIG?!?!?!
  1168. #define EXP_LOGO3_ID_SIG 0xA0000007
  1169. #endif
  1170. #define EXP_SPECIAL_FOLDER_SIG 0xA0000005 // LPEXP_SPECIAL_FOLDER
  1171. ;begin_internal
  1172. typedef struct
  1173. {
  1174. DWORD cbSize; // Size of this extra data block
  1175. DWORD dwSignature; // signature of this extra data block
  1176. } EXP_HEADER, *LPEXP_HEADER;
  1177. ;end _internal
  1178. typedef struct
  1179. {
  1180. DWORD cbSize; // Size of this extra data block
  1181. DWORD dwSignature; // signature of this extra data block
  1182. DWORD idSpecialFolder; // special folder id this link points into
  1183. DWORD cbOffset; // ofset into pidl from SLDF_HAS_ID_LIST for child
  1184. } EXP_SPECIAL_FOLDER, *LPEXP_SPECIAL_FOLDER;
  1185. ;begin_internal
  1186. typedef struct
  1187. {
  1188. DWORD cbSize; // Size of this extra data block
  1189. DWORD dwSignature; // signature of this extra data block
  1190. BYTE abTracker[ 1 ]; //
  1191. } EXP_TRACKER, *LPEXP_TRACKER;
  1192. #define EXP_TRACKER_SIG 0xA0000003 // LPEXP_TRACKER
  1193. typedef struct
  1194. {
  1195. DWORD cbSize; // Size of this extra data block
  1196. DWORD dwSignature; // signature of this extra data block
  1197. WCHAR wszLayerEnvName[64]; // name of shim layer to run with this link (eg "NT4SP5")
  1198. } EXP_SHIMLAYER;
  1199. #define EXP_SHIMLAYER_SIG 0xA0000008
  1200. ;end_internal
  1201. typedef struct
  1202. {
  1203. DWORD cbSize; // Size of this extra data block
  1204. DWORD dwSignature; // signature of this extra data block
  1205. CHAR szTarget[ MAX_PATH ]; // ANSI target name w/EXP_SZ in it
  1206. WCHAR swzTarget[ MAX_PATH ]; // UNICODE target name w/EXP_SZ in it
  1207. } EXP_SZ_LINK, *LPEXP_SZ_LINK;
  1208. #define EXP_SZ_LINK_SIG 0xA0000001 // LPEXP_SZ_LINK (target)
  1209. #define EXP_SZ_ICON_SIG 0xA0000007 // LPEXP_SZ_LINK (icon)
  1210. ;begin_internal
  1211. // NT40 Console Control Panel Applet does a CoCreateInstance(CLSID_CShellLink),
  1212. // used the CShellLink definition to get the 'this' pointer, and passed that
  1213. // along to some private exports in shell32. This completely prevents us
  1214. // from moving the CShellLink implementation to another DLL. (If we do, or an
  1215. // ISV takes our stream format and implements a better link by pointing the
  1216. // classid to their implementation, the NT40 Console CPA will fault.)
  1217. //
  1218. // To fix this problem in future revs, CShellLink will support IShellLinkDataList
  1219. // AddDataBlock adds the data block
  1220. // FindDataBloc returns a LocalAlloc()d COPY of a data block with the
  1221. // signature dwSig (NOTE: this is different than SHFindDataBlock)
  1222. // RemoveDataBlock removes a data block with signature dwSig
  1223. // Plan is for NT50's Console CPA to use this interface instead.
  1224. //
  1225. ;end_internal
  1226. #undef INTERFACE
  1227. #define INTERFACE IShellLinkDataList
  1228. DECLARE_INTERFACE_(IShellLinkDataList, IUnknown)
  1229. {
  1230. // *** IUnknown methods ***
  1231. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1232. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1233. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1234. // *** IShellLinkDataList methods ***
  1235. STDMETHOD(AddDataBlock)(THIS_ void * pDataBlock) PURE;
  1236. STDMETHOD(CopyDataBlock)(THIS_ DWORD dwSig, void **ppDataBlock) PURE;
  1237. STDMETHOD(RemoveDataBlock)(THIS_ DWORD dwSig) PURE;
  1238. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  1239. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags) PURE;
  1240. };
  1241. #endif // (_WIN32_IE >= 0x0400)
  1242. #if (_WIN32_IE >= 0x0500)
  1243. #undef INTERFACE
  1244. #define INTERFACE IResolveShellLink
  1245. DECLARE_INTERFACE_(IResolveShellLink, IUnknown)
  1246. {
  1247. // *** IUnknown methods ***
  1248. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1249. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1250. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1251. // *** IResolveShellLink methods ***
  1252. STDMETHOD(ResolveShellLink)(THIS_ IUnknown* punk, HWND hwnd, DWORD fFlags) PURE;
  1253. };
  1254. #endif // (_WIN32_IE >= 0x0500)
  1255. #ifdef _INC_SHELLAPI /* for LPSHELLEXECUTEINFO */
  1256. //===========================================================================
  1257. //
  1258. // IShellExecuteHook Interface
  1259. //
  1260. //===========================================================================
  1261. #undef INTERFACE
  1262. #define INTERFACE IShellExecuteHookA
  1263. DECLARE_INTERFACE_(IShellExecuteHookA, IUnknown) // shexhk
  1264. {
  1265. // *** IUnknown methods ***
  1266. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1267. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1268. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1269. // *** IShellExecuteHookA methods ***
  1270. STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOA pei) PURE;
  1271. };
  1272. #undef INTERFACE
  1273. #define INTERFACE IShellExecuteHookW
  1274. DECLARE_INTERFACE_(IShellExecuteHookW, IUnknown) // shexhk
  1275. {
  1276. // *** IUnknown methods ***
  1277. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1278. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1279. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1280. // *** IShellExecuteHookW methods ***
  1281. STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOW pei) PURE;
  1282. };
  1283. #ifdef UNICODE
  1284. #define IShellExecuteHook IShellExecuteHookW
  1285. #define IShellExecuteHookVtbl IShellExecuteHookWVtbl
  1286. #else
  1287. #define IShellExecuteHook IShellExecuteHookA
  1288. #define IShellExecuteHookVtbl IShellExecuteHookAVtbl
  1289. #endif
  1290. #endif
  1291. //===========================================================================
  1292. //
  1293. // IURLSearchHook Interface
  1294. ;begin_internal
  1295. //
  1296. // IURLSearchHook Interface is called whenever the browser navigates to a
  1297. // non-standard URL. It can be used to redirect the user's request to a
  1298. // search engine or a specific web site.
  1299. //
  1300. // A non-standard URL does not have a protocol prefix (e.g.,
  1301. // "www.microsoft.com") and the protocol cannot be easily guessed by
  1302. // the browser (e.g., "home.microsoft.com").
  1303. //
  1304. // The parameters of Translate(..)
  1305. // lpwszSearchURL -- (IN/OUT) Wide char buffer that contains the request
  1306. // "URL" user typed in as input and the tranlated URL
  1307. // as output.
  1308. // cchBufferSize -- (IN) size of lpwszSearchURL
  1309. //
  1310. // Return Values:
  1311. // S_OK Search handled completely, pszResult has the full URL to
  1312. // browse to. Stop running any further IURLSearchHooks and
  1313. // pass this URL back to the browser for browsing.
  1314. //
  1315. // S_FALSE Query has been preprocessed, pszResult has the result of
  1316. // the preprocess, further search still needed. Go on
  1317. // executing the rest of the IURLSearchHooks. The
  1318. // preprocessing steps can be:
  1319. //
  1320. // 1. replaced certain characters
  1321. // 2. added more hints
  1322. //
  1323. // E_ABORT Search handled completely, stop running any further
  1324. // IURLSearchHooks, but NO BROWSING NEEDED as a result,
  1325. // pszResult is a copy of pcszQuery.
  1326. //
  1327. // ;BUGBUG: This is not fully implemented, yet, making IURLQualify return this ;Internal
  1328. // involves too much change. ;Internal
  1329. // ;Internal
  1330. // BUGBUG:: E_ABORT is currently treated as E_FAIL. It requires too much change. ;Internal
  1331. //
  1332. // E_FAIL This Hook was unsuccessful. Search not handled at all,
  1333. // pcszQueryURL has the query string. Please go on running
  1334. // other IURLSearchHooks.
  1335. //
  1336. // BUGBUG: There is a potential danger in this Interface, that is people can write ;Internal
  1337. // very bad SearchHooks, but we (Microsoft) take the blame. ;Internal
  1338. ;end_internal
  1339. //
  1340. //===========================================================================
  1341. #undef INTERFACE
  1342. #define INTERFACE IURLSearchHook
  1343. DECLARE_INTERFACE_(IURLSearchHook, IUnknown)
  1344. {
  1345. // *** IUnknown methods ***
  1346. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1347. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1348. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1349. // *** IURLSearchHook methods ***
  1350. STDMETHOD(Translate)(THIS_ LPWSTR lpwszSearchURL, DWORD cchBufferSize) PURE;
  1351. };
  1352. #undef INTERFACE
  1353. #define INTERFACE ISearchContext
  1354. DECLARE_INTERFACE_(ISearchContext, IUnknown)
  1355. {
  1356. // *** IUnknown methods ***
  1357. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1358. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1359. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1360. // *** ISearchContext methods ***
  1361. STDMETHOD(GetSearchUrl)(THIS_ BSTR * pbstrSearchUrl) PURE;
  1362. STDMETHOD(GetSearchText)(THIS_ BSTR * pbstrSearchText) PURE;
  1363. STDMETHOD(GetSearchStyle)(THIS_ DWORD * pdwSearchStyle) PURE;
  1364. };
  1365. #undef INTERFACE
  1366. #define INTERFACE IURLSearchHook2
  1367. DECLARE_INTERFACE_(IURLSearchHook2, IURLSearchHook)
  1368. {
  1369. // *** IURLSearchHook2 methods ***
  1370. STDMETHOD(TranslateWithSearchContext)(THIS_ LPWSTR lpwszSearchURL, DWORD cchBufferSize, ISearchContext * pSearchContext) PURE;
  1371. };
  1372. //===========================================================================
  1373. //
  1374. // INewShortcutHook Interface
  1375. //
  1376. //===========================================================================
  1377. #undef INTERFACE
  1378. #define INTERFACE INewShortcutHookA
  1379. DECLARE_INTERFACE_(INewShortcutHookA, IUnknown) // nshhk
  1380. {
  1381. // *** IUnknown methods ***
  1382. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1383. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1384. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1385. // *** INewShortcutHook methods ***
  1386. STDMETHOD(SetReferent)(THIS_ LPCSTR pcszReferent, HWND hwnd) PURE;
  1387. STDMETHOD(GetReferent)(THIS_ LPSTR pszReferent, int cchReferent) PURE;
  1388. STDMETHOD(SetFolder)(THIS_ LPCSTR pcszFolder) PURE;
  1389. STDMETHOD(GetFolder)(THIS_ LPSTR pszFolder, int cchFolder) PURE;
  1390. STDMETHOD(GetName)(THIS_ LPSTR pszName, int cchName) PURE;
  1391. STDMETHOD(GetExtension)(THIS_ LPSTR pszExtension, int cchExtension) PURE;
  1392. };
  1393. #undef INTERFACE
  1394. #define INTERFACE INewShortcutHookW
  1395. DECLARE_INTERFACE_(INewShortcutHookW, IUnknown) // nshhk
  1396. {
  1397. // *** IUnknown methods ***
  1398. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1399. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1400. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1401. // *** INewShortcutHook methods ***
  1402. STDMETHOD(SetReferent)(THIS_ LPCWSTR pcszReferent, HWND hwnd) PURE;
  1403. STDMETHOD(GetReferent)(THIS_ LPWSTR pszReferent, int cchReferent) PURE;
  1404. STDMETHOD(SetFolder)(THIS_ LPCWSTR pcszFolder) PURE;
  1405. STDMETHOD(GetFolder)(THIS_ LPWSTR pszFolder, int cchFolder) PURE;
  1406. STDMETHOD(GetName)(THIS_ LPWSTR pszName, int cchName) PURE;
  1407. STDMETHOD(GetExtension)(THIS_ LPWSTR pszExtension, int cchExtension) PURE;
  1408. };
  1409. #ifdef UNICODE
  1410. #define INewShortcutHook INewShortcutHookW
  1411. #define INewShortcutHookVtbl INewShortcutHookWVtbl
  1412. #else
  1413. #define INewShortcutHook INewShortcutHookA
  1414. #define INewShortcutHookVtbl INewShortcutHookAVtbl
  1415. #endif
  1416. //===========================================================================
  1417. //
  1418. // ICopyHook Interface
  1419. //
  1420. // The copy hook is called whenever file system directories are
  1421. // copy/moved/deleted/renamed via the shell. It is also called by the shell
  1422. // on changes of status of printers.
  1423. //
  1424. // Clients register their id under STRREG_SHEX_COPYHOOK for file system hooks
  1425. // and STRREG_SHEx_PRNCOPYHOOK for printer hooks.
  1426. // the CopyCallback is called prior to the action, so the hook has the chance
  1427. // to allow, deny or cancel the operation by returning the falues:
  1428. // IDYES - means allow the operation
  1429. // IDNO - means disallow the operation on this file, but continue with
  1430. // any other operations (eg. batch copy)
  1431. // IDCANCEL - means disallow the current operation and cancel any pending
  1432. // operations
  1433. //
  1434. // arguments to the CopyCallback
  1435. // hwnd - window to use for any UI
  1436. // wFunc - what operation is being done
  1437. // wFlags - and flags (FOF_*) set in the initial call to the file operation
  1438. // pszSrcFile - name of the source file
  1439. // dwSrcAttribs - file attributes of the source file
  1440. // pszDestFile - name of the destiation file (for move and renames)
  1441. // dwDestAttribs - file attributes of the destination file
  1442. //
  1443. //
  1444. //===========================================================================
  1445. #ifndef FO_MOVE //these need to be kept in sync with the ones in shellapi.h
  1446. // file operations
  1447. #define FO_MOVE 0x0001
  1448. #define FO_COPY 0x0002
  1449. #define FO_DELETE 0x0003
  1450. #define FO_RENAME 0x0004
  1451. #define FOF_MULTIDESTFILES 0x0001
  1452. #define FOF_CONFIRMMOUSE 0x0002
  1453. #define FOF_SILENT 0x0004 // don't create progress/report
  1454. #define FOF_RENAMEONCOLLISION 0x0008
  1455. #define FOF_NOCONFIRMATION 0x0010 // Don't prompt the user.
  1456. #define FOF_WANTMAPPINGHANDLE 0x0020 // Fill in SHFILEOPSTRUCT.hNameMappings
  1457. // Must be freed using SHFreeNameMappings
  1458. #define FOF_ALLOWUNDO 0x0040
  1459. #define FOF_FILESONLY 0x0080 // on *.*, do only files
  1460. #define FOF_SIMPLEPROGRESS 0x0100 // means don't show names of files
  1461. #define FOF_NOCONFIRMMKDIR 0x0200 // don't confirm making any needed dirs
  1462. #define FOF_NOERRORUI 0x0400 // don't put up error UI
  1463. #define FOF_NOCOPYSECURITYATTRIBS 0x0800 // dont copy NT file Security Attributes
  1464. #define FOF_NORECURSION 0x1000 // don't recurse into directories.
  1465. #if (_WIN32_IE >= 0x500)
  1466. #define FOF_NO_CONNECTED_ELEMENTS 0x2000 // don't operate on connected file elements.
  1467. #define FOF_WANTNUKEWARNING 0x4000 // during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)
  1468. #endif // _WIN32_IE >= 0x500
  1469. #if (_WIN32_WINNT >= 0x0501)
  1470. #define FOF_NORECURSEREPARSE 0x8000 // treat reparse points as objects, not containers
  1471. #endif // (_WIN32_WINNT >= 0x501)
  1472. typedef WORD FILEOP_FLAGS;
  1473. // printer operations
  1474. #define PO_DELETE 0x0013 // printer is being deleted
  1475. #define PO_RENAME 0x0014 // printer is being renamed
  1476. #define PO_PORTCHANGE 0x0020 // port this printer connected to is being changed
  1477. // if this id is set, the strings received by
  1478. // the copyhook are a doubly-null terminated
  1479. // list of strings. The first is the printer
  1480. // name and the second is the printer port.
  1481. #define PO_REN_PORT 0x0034 // PO_RENAME and PO_PORTCHANGE at same time.
  1482. // no POF_ flags currently defined
  1483. typedef UINT PRINTEROP_FLAGS;
  1484. #endif // FO_MOVE
  1485. #undef INTERFACE
  1486. #define INTERFACE ICopyHookA
  1487. DECLARE_INTERFACE_(ICopyHookA, IUnknown) // sl
  1488. {
  1489. // *** IUnknown methods ***
  1490. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1491. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1492. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1493. // *** ICopyHook methods ***
  1494. STDMETHOD_(UINT,CopyCallback) (THIS_ HWND hwnd, UINT wFunc, UINT wFlags, LPCSTR pszSrcFile, DWORD dwSrcAttribs,
  1495. LPCSTR pszDestFile, DWORD dwDestAttribs) PURE;
  1496. };
  1497. typedef ICopyHookA * LPCOPYHOOKA;
  1498. #undef INTERFACE
  1499. #define INTERFACE ICopyHookW
  1500. DECLARE_INTERFACE_(ICopyHookW, IUnknown) // sl
  1501. {
  1502. // *** IUnknown methods ***
  1503. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1504. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1505. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1506. // *** ICopyHook methods ***
  1507. STDMETHOD_(UINT,CopyCallback) (THIS_ HWND hwnd, UINT wFunc, UINT wFlags, LPCWSTR pszSrcFile, DWORD dwSrcAttribs,
  1508. LPCWSTR pszDestFile, DWORD dwDestAttribs) PURE;
  1509. };
  1510. typedef ICopyHookW * LPCOPYHOOKW;
  1511. #ifdef UNICODE
  1512. #define ICopyHook ICopyHookW
  1513. #define ICopyHookVtbl ICopyHookWVtbl
  1514. #define LPCOPYHOOK LPCOPYHOOKW
  1515. #else
  1516. #define ICopyHook ICopyHookA
  1517. #define ICopyHookVtbl ICopyHookAVtbl
  1518. #define LPCOPYHOOK LPCOPYHOOKA
  1519. #endif
  1520. //===========================================================================
  1521. //
  1522. // IFileViewerSite Interface
  1523. //
  1524. // History: ;Internal
  1525. // --/--/94 KurtE Created ;Internal
  1526. // ;Internal
  1527. //===========================================================================
  1528. #undef INTERFACE
  1529. #define INTERFACE IFileViewerSite
  1530. DECLARE_INTERFACE_(IFileViewerSite, IUnknown)
  1531. {
  1532. // *** IUnknown methods ***
  1533. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1534. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1535. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1536. // *** IFileViewerSite methods ***
  1537. STDMETHOD(SetPinnedWindow) (THIS_ HWND hwnd) PURE;
  1538. STDMETHOD(GetPinnedWindow) (THIS_ HWND *phwnd) PURE;
  1539. };
  1540. typedef IFileViewerSite * LPFILEVIEWERSITE;
  1541. //===========================================================================
  1542. //
  1543. // IFileViewer Interface
  1544. //
  1545. // Implemented in a FileViewer component object. Used to tell a
  1546. // FileViewer to PrintTo or to view, the latter happening though
  1547. // ShowInitialize and Show. The filename is always given to the
  1548. // viewer through IPersistFile.
  1549. //
  1550. // History: ;Internal
  1551. // 3/4/94 kraigb Created ;Internal
  1552. // ;Internal
  1553. //===========================================================================
  1554. #include <pshpack8.h>
  1555. typedef struct
  1556. {
  1557. // Stuff passed into viewer (in)
  1558. DWORD cbSize; // Size of structure for future expansion...
  1559. HWND hwndOwner; // who is the owner window.
  1560. int iShow; // The show command
  1561. // Passed in and updated (in/Out)
  1562. DWORD dwFlags; // flags
  1563. RECT rect; // Where to create the window may have defaults
  1564. IUnknown *punkRel; // Relese this interface when window is visible
  1565. // Stuff that might be returned from viewer (out)
  1566. OLECHAR strNewFile[MAX_PATH]; // New File to view.
  1567. } FVSHOWINFO, *LPFVSHOWINFO;
  1568. #include <poppack.h> /* Return to byte packing */
  1569. // Define File View Show Info Flags.
  1570. #define FVSIF_RECT 0x00000001 // The rect variable has valid data.
  1571. #define FVSIF_PINNED 0x00000002 // We should Initialize pinned
  1572. #define FVSIF_NEWFAILED 0x08000000 // The new file passed back failed
  1573. // to be viewed.
  1574. #define FVSIF_NEWFILE 0x80000000 // A new file to view has been returned
  1575. #define FVSIF_CANVIEWIT 0x40000000 // The viewer can view it.
  1576. #undef INTERFACE
  1577. #define INTERFACE IFileViewerA
  1578. DECLARE_INTERFACE(IFileViewerA)
  1579. {
  1580. // *** IUnknown methods ***
  1581. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1582. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1583. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1584. // *** IFileViewer methods ***
  1585. STDMETHOD(ShowInitialize) (THIS_ LPFILEVIEWERSITE lpfsi) PURE;
  1586. STDMETHOD(Show) (THIS_ LPFVSHOWINFO pvsi) PURE;
  1587. STDMETHOD(PrintTo) (THIS_ LPSTR pszDriver, BOOL fSuppressUI) PURE;
  1588. };
  1589. typedef IFileViewerA * LPFILEVIEWERA;
  1590. #undef INTERFACE
  1591. #define INTERFACE IFileViewerW
  1592. DECLARE_INTERFACE(IFileViewerW)
  1593. {
  1594. // *** IUnknown methods ***
  1595. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1596. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1597. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1598. // *** IFileViewer methods ***
  1599. STDMETHOD(ShowInitialize) (THIS_ LPFILEVIEWERSITE lpfsi) PURE;
  1600. STDMETHOD(Show) (THIS_ LPFVSHOWINFO pvsi) PURE;
  1601. STDMETHOD(PrintTo) (THIS_ LPWSTR pszDriver, BOOL fSuppressUI) PURE;
  1602. };
  1603. typedef IFileViewerW * LPFILEVIEWERW;
  1604. #ifdef UNICODE
  1605. #define IFileViewer IFileViewerW
  1606. #define LPFILEVIEWER LPFILEVIEWERW
  1607. #else
  1608. #define IFileViewer IFileViewerA
  1609. #define LPFILEVIEWER LPFILEVIEWERA
  1610. #endif
  1611. ;begin_internal
  1612. // CGID_DefView Command Target IDs. used to persist global DefView state
  1613. enum
  1614. {
  1615. DVID_SETASDEFAULT, // Set the DefView state of this folder as default for all of the same class
  1616. DVID_RESETDEFAULT // Reset the DefView state to the default (delete subkeys)
  1617. };
  1618. // CGID_ShellDocView Command Target IDs. for shell doc view wedge
  1619. enum {
  1620. SHDVID_FINALTITLEAVAIL, // DEAD: variantIn bstr - sent after final OLECMDID_SETTITLE is sent
  1621. SHDVID_MIMECSETMENUOPEN, // mimecharset menu open commands
  1622. SHDVID_PRINTFRAME, // print HTML frame
  1623. SHDVID_PUTOFFLINE, // DEAD: The Offline property has been changed
  1624. SHDVID_PUTSILENT, // DEAD: The frame's Silent property has been changed
  1625. SHDVID_GOBACK, // Navigate Back
  1626. SHDVID_GOFORWARD, // Navigate Forward
  1627. SHDVID_CANGOBACK, // Is Back Navigation Possible?
  1628. SHDVID_CANGOFORWARD, // Is Forward Navigation Possible?
  1629. SHDVID_CANACTIVATENOW, // (down) (PICS) OK to navigate to this view now?
  1630. SHDVID_ACTIVATEMENOW, // (up) (PICS) Rating checks out, navigate now
  1631. SHDVID_CANSUPPORTPICS, // (down) variantIn I4: IOleCommandTarget to reply to
  1632. SHDVID_PICSLABELFOUND, // (up) variantIn bstr: PICS label
  1633. SHDVID_NOMOREPICSLABELS, // (up) End of document, no more PICS labels coming
  1634. SHDVID_CANDEACTIVATENOW, // (QS down) (in script/etc) OK to deactivate view now?
  1635. SHDVID_DEACTIVATEMENOW, // (EXEC up) (in script/etc) out of script, deactivate view now
  1636. SHDVID_NODEACTIVATENOW, // (EXEC up) (in script/etc) entering script, disable deactivate
  1637. SHDVID_AMBIENTPROPCHANGE, // variantIn I4: dispid of ambient property that changed
  1638. SHDVID_GETSYSIMAGEINDEX, // variantOut: image index for current page
  1639. SHDVID_GETPENDINGOBJECT, // variantOut: IUnknown of pending shellview/docobject
  1640. SHDVID_GETPENDINGURL, // variantOut: BSTR of URL for pending docobject
  1641. SHDVID_SETPENDINGURL, // variantIn: BSTR of URL passed to pending docobject
  1642. SHDVID_ISDRAGSOURCE, // (down) varioutOut I4: non-zero if it's initiated drag&drop
  1643. SHDVID_DOCFAMILYCHARSET, // variantOut: I4: windows (family) codepage
  1644. SHDVID_DOCCHARSET, // variantOut: I4: actual (mlang) codepage
  1645. SHDVID_RAISE, // vaIn:I4:DTRF_*, vaOut:NULL unless DTRF_QUERY
  1646. SHDVID_GETTRANSITION, // (down) vaIn: I4: TransitionEvent; vaOut BSTR (CLSID), I4 (dwSpeed)
  1647. SHDVID_GETMIMECSETMENU, // get menu handle for mimecharset
  1648. SHDVID_DOCWRITEABORT, // Abort binding but activate pending docobject
  1649. SHDVID_SETPRINTSTATUS, // VariantIn: BOOL, TRUE - Started printing, FALSE - Finished printing
  1650. SHDVID_NAVIGATIONSTATUS, // QS for tooltip text and Exec when user clicks
  1651. SHDVID_PROGRESSSTATUS, // QS for tooltip text and Exec when user clicks
  1652. SHDVID_ONLINESTATUS, // QS for tooltip text and Exec when user clicks
  1653. SHDVID_SSLSTATUS, // QS for tooltip text and Exec when user clicks
  1654. SHDVID_PRINTSTATUS, // QS for tooltip text and Exec when user clicks
  1655. SHDVID_ZONESTATUS, // QS for tooltip text and Exec when user clicks
  1656. SHDVID_ONCODEPAGECHANGE, // variantIn I4: new specified codepage
  1657. SHDVID_SETSECURELOCK, // set the secure icon
  1658. SHDVID_SHOWBROWSERBAR, // show browser bar of clsid guid
  1659. SHDVID_NAVIGATEBB, // navigate to pidl in browserbar.
  1660. SHDVID_UPDATEOFFLINEDESKTOP,// put the desktop in ON-LINE mode, update and put it back in Offline mode
  1661. SHDVID_PICSBLOCKINGUI, // (up) In I4: pointer to "ratings nugget" for block API
  1662. SHDVID_ONCOLORSCHANGE, // (up) sent by mshtml to indicate color set change
  1663. SHDVID_CANDOCOLORSCHANGE, // (down) used to query if document supports the above
  1664. SHDVID_QUERYMERGEDHELPMENU, // was the help menu micro-merged?
  1665. SHDVID_QUERYOBJECTSHELPMENU,// return the object's help menu
  1666. SHDVID_HELP, // do help
  1667. SHDVID_UEMLOG, // set UEM logging vaIn:I4:UEMIND_*, vaOut:NULL
  1668. SHDVID_GETBROWSERBAR, // get IDeskBand for browser bar of clsid guid
  1669. SHDVID_GETFONTMENU,
  1670. SHDVID_FONTMENUOPEN,
  1671. SHDVID_CLSIDTOIDM, // get the idm for the given clsid
  1672. SHDVID_GETDOCDIRMENU, // get menu handle for document direction
  1673. SHDVID_ADDMENUEXTENSIONS, // Context Menu Extensions
  1674. SHDVID_CLSIDTOMONIKER, // CLSID to property page resource mapping
  1675. SHDVID_RESETSTATUSBAR, // set the status bar back to "normal" icon w/out text
  1676. SHDVID_ISBROWSERBARVISIBLE, // is browser bar of clsid guid visible?
  1677. SHDVID_GETOPTIONSHWND, // gets hwnd for internet options prop sheet (NULL if not open)
  1678. SHDVID_DELEGATEWINDOWOM, // set policy for whether window OM methods should be delegated.
  1679. SHDVID_PAGEFROMPOSTDATA, // determines if page was generated by post data
  1680. SHDVID_DISPLAYSCRIPTERRORS, // tells the top docobject host to display his script err dialog
  1681. SHDVID_NAVIGATEBBTOURL, // Navigate to an URL in browserbar (used in Trident).
  1682. SHDVID_NAVIGATEFROMDOC, // The document delegated the navigation for a non-html mime-type.
  1683. SHDVID_STARTPICSFORWINDOW, // (up) variantIn: IUnknown of window that is navigating
  1684. // variantOut: bool if pics process started
  1685. SHDVID_CANCELPICSFORWINDOW, // (up) variantIn: IUnknown of window that is no longer navigating
  1686. SHDVID_ISPICSENABLED, // (up) variantOut: bool
  1687. SHDVID_PICSLABELFOUNDINHTTPHEADER,// (up) variantIn bstr: PICS label
  1688. SHDVID_CHECKINCACHEIFOFFLINE, // Check in cache if offline
  1689. SHDVID_CHECKDONTUPDATETLOG, // check if the current navigate is already dealing with the travellog correctly
  1690. SHDVID_UPDATEDOCHOSTSTATE, // Sent from CBaseBrowser2::_UpdateBrowserState to tell the dochost to update its state.
  1691. SHDVID_FIREFILEDOWNLOAD,
  1692. SHDVID_COMPLETEDOCHOSTPASSING,
  1693. SHDVID_NAVSTART,
  1694. SHDVID_SETNAVIGATABLECODEPAGE,
  1695. SHDVID_WINDOWOPEN,
  1696. SHDVID_PRIVACYSTATUS, // QS for tooltip text and exec when user clicks
  1697. SHDVID_FORWARDSECURELOCK, // asks CDocObjectHost to forward its security status up to the shell browser
  1698. SHDVID_ISEXPLORERBARVISIBLE, // is any explorer bar visible?
  1699. };
  1700. // CGID_DocHostCmdPriv Command Target IDs
  1701. //
  1702. enum
  1703. {
  1704. DOCHOST_DOCCANNAVIGATE, // The document knows how to navigate.
  1705. DOCHOST_NAVIGATION_ERROR, // Navigation Error
  1706. DOCHOST_DOCHYPERLINK, // The document is navigating.
  1707. DOCHOST_SENDINGREQUEST, // The document is sending a request for download. Update the progress bar.
  1708. DOCHOST_FINDINGRESOURCE, // The document is finding a resource. Update the progress bar.
  1709. DOCHOST_RESETSEARCHINFO, // Reset search information (after a successful navigation)
  1710. DOCHOST_SETBROWSERINDEX, // Sets the browser ID to use for TravelLog and frame targeting
  1711. DOCHOST_NOTE_ERROR_PAGE, // Need to know when we're navigating to an error web page.
  1712. DOCHOST_READYSTATE_INTERACTIVE, // a document on a page is readystate interactive
  1713. DOCHOST_CONTENTDISPOSITIONATTACH // The document needs to be saved.
  1714. };
  1715. // CGID_SearchBand Command Target IDs.
  1716. enum {
  1717. SBID_SEARCH_NEW, // (re)load the context-appropriate url
  1718. SBID_SEARCH_NEXT, // cycle between multiple providers
  1719. SBID_SEARCH_CUSTOMIZE, // navigate to customization url
  1720. SBID_SEARCH_HELP, // what it says
  1721. SBID_GETPIDL, // get the search pane's pidl
  1722. SBID_HASPIDL, // does the search pane have a pidl (i.e, has it navigated)
  1723. };
  1724. // CGID_MediaBar target ids
  1725. enum {
  1726. MBID_PLAY, // Play an url
  1727. MBID_POPOUT // Detect state of player
  1728. };
  1729. enum {
  1730. MB_DOCKED,
  1731. MB_POPOUT
  1732. };
  1733. //
  1734. // Private struct passed as argument to SHDVID_UPDATEDOCHOSTSTATE
  1735. //
  1736. struct DOCHOSTUPDATEDATA
  1737. {
  1738. LPITEMIDLIST _pidl;
  1739. BOOL _fIsErrorUrl;
  1740. };
  1741. //
  1742. // this enum is used by SHDVID_SETSECURELOCK and SBCMDID_SETSECURELOCKICON
  1743. // when adding new values, make sure to add to both SET and SUGGEST, and
  1744. // the code depends on a direct correlation between the level of security
  1745. // and the value of the enum. so keep new values in the correct order
  1746. //
  1747. enum {
  1748. SECURELOCK_NOCHANGE = -1,
  1749. SECURELOCK_SET_UNSECURE = 0,
  1750. SECURELOCK_SET_MIXED,
  1751. SECURELOCK_SET_SECUREUNKNOWNBIT,
  1752. SECURELOCK_SET_SECURE40BIT,
  1753. SECURELOCK_SET_SECURE56BIT,
  1754. SECURELOCK_SET_FORTEZZA,
  1755. SECURELOCK_SET_SECURE128BIT,
  1756. SECURELOCK_FIRSTSUGGEST,
  1757. SECURELOCK_SUGGEST_UNSECURE = SECURELOCK_FIRSTSUGGEST,
  1758. SECURELOCK_SUGGEST_MIXED,
  1759. SECURELOCK_SUGGEST_SECUREUNKNOWNBIT,
  1760. SECURELOCK_SUGGEST_SECURE40BIT,
  1761. SECURELOCK_SUGGEST_SECURE56BIT,
  1762. SECURELOCK_SUGGEST_FORTEZZA,
  1763. SECURELOCK_SUGGEST_SECURE128BIT,
  1764. };
  1765. ;end_internal
  1766. //==========================================================================
  1767. //
  1768. // IShellBrowser/IShellView/IShellFolder interface
  1769. //
  1770. // These three interfaces are used when the shell communicates with
  1771. // name space extensions. The shell (explorer) provides IShellBrowser
  1772. // interface, and extensions implements IShellFolder and IShellView
  1773. // interfaces.
  1774. //
  1775. //==========================================================================
  1776. //--------------------------------------------------------------------------
  1777. //
  1778. // Command/menuitem IDs
  1779. //
  1780. // The explorer dispatches WM_COMMAND messages based on the range of
  1781. // command/menuitem IDs. All the IDs of menuitems that the view (right
  1782. // pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
  1783. // won't dispatch them). The view should not deal with any menuitems
  1784. // in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
  1785. // version of the shell).
  1786. //
  1787. // FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
  1788. // FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
  1789. // FCIDM_GLOBAL/LAST for the explorer's submenu IDs
  1790. //
  1791. //--------------------------------------------------------------------------
  1792. #define FCIDM_SHVIEWFIRST 0x0000
  1793. #define FCIDM_SHVIEWLAST 0x7fff
  1794. #define FCIDM_BROWSERFIRST 0xa000
  1795. #define FCIDM_BROWSERLAST 0xbf00
  1796. #define FCIDM_GLOBALFIRST 0x8000
  1797. #define FCIDM_GLOBALLAST 0x9fff
  1798. //
  1799. // Global submenu IDs and separator IDs
  1800. //
  1801. #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
  1802. #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
  1803. #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
  1804. #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
  1805. #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0) // for Win9x compat
  1806. #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1) // for Win9x compat
  1807. #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
  1808. #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
  1809. #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
  1810. #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
  1811. //--------------------------------------------------------------------------
  1812. // control IDs known to the view
  1813. //--------------------------------------------------------------------------
  1814. #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
  1815. #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
  1816. #define FCIDM_DRIVELIST (FCIDM_BROWSERFIRST + 2) // ;Internal
  1817. #define FCIDM_TREE (FCIDM_BROWSERFIRST + 3) // ;Internal
  1818. #define FCIDM_TABS (FCIDM_BROWSERFIRST + 4) // ;Internal
  1819. #define FCIDM_REBAR (FCIDM_BROWSERFIRST + 5) // ;Internal
  1820. #if (_WIN32_IE >= 0x0400)
  1821. //--------------------------------------------------------------------------
  1822. //
  1823. // The resource id of the offline cursor
  1824. // This cursor is avaialble in shdocvw.dll
  1825. #define IDC_OFFLINE_HAND 103
  1826. //
  1827. //--------------------------------------------------------------------------
  1828. #endif
  1829. ;begin_internal
  1830. // SBCMDID_SHOWCONTROL
  1831. enum {
  1832. SBSC_HIDE = 0,
  1833. SBSC_SHOW = 1,
  1834. SBSC_TOGGLE = 2,
  1835. SBSC_QUERY = 3
  1836. };
  1837. // SBCMDID_OPTIONS
  1838. enum {
  1839. SBO_DEFAULT = 0 ,
  1840. SBO_NOBROWSERPAGES = 1
  1841. };
  1842. // CGID_Explorer Command Target IDs
  1843. enum {
  1844. SBCMDID_ENABLESHOWTREE = 0,
  1845. SBCMDID_SHOWCONTROL = 1, // variant vt_i4 = loword = FCW_* hiword = SBSC_*
  1846. SBCMDID_CANCELNAVIGATION = 2, // cancel last navigation
  1847. SBCMDID_MAYSAVECHANGES = 3, // about to close and may save changes
  1848. SBCMDID_SETHLINKFRAME = 4, // variant vt_i4 = phlinkframe
  1849. SBCMDID_ENABLESTOP = 5, // variant vt_bool = fEnable
  1850. SBCMDID_OPTIONS = 6, // the view.options page
  1851. SBCMDID_EXPLORER = 7, // are you explorer.exe?
  1852. SBCMDID_ADDTOFAVORITES = 8,
  1853. SBCMDID_ACTIVEOBJECTMENUS = 9,
  1854. SBCMDID_MAYSAVEVIEWSTATE = 10, // Should we save view stream
  1855. SBCMDID_DOFAVORITESMENU = 11, // popup the favorites menu
  1856. SBCMDID_DOMAILMENU = 12, // popup the mail menu
  1857. SBCMDID_GETADDRESSBARTEXT = 13, // get user-typed text
  1858. SBCMDID_ASYNCNAVIGATION = 14, // do an async navigation
  1859. SBCMDID_SEARCHBAROBSOLETE = 15, // OBSOLETE beta-1 SEARCHBAR
  1860. SBCMDID_FLUSHOBJECTCACHE = 16, // flush object cache
  1861. SBCMDID_CREATESHORTCUT = 17, // create a shortcut
  1862. SBCMDID_SETMERGEDWEBMENU = 18, // set pre-merged menu for HTML
  1863. SBCMDID_REMOVELOCKICON = 19, // Remove lock icon
  1864. SBCMDID_SELECTHISTPIDL = 20, // QS:EXEC select history pidl on navigate
  1865. SBCMDID_WRITEHIST = 21, // QS only:write history sf on navigate
  1866. SBCMDID_GETHISTPIDL = 22, // EXEC gets most recent history pidl
  1867. SBCMDID_REGISTERNSCBAND = 23, // EXEC registers NscBand when visible
  1868. SBCMDID_COCREATEDOCUMENT = 24, // Create an instance of MSHTML
  1869. SBCMDID_SETSECURELOCKICON = 25, // sets the SSL lock icon for the current page
  1870. SBCMDID_INITFILECTXMENU = 26, // EXEC,QS: file context menu for band item
  1871. SBCMDID_UNREGISTERNSCBAND = 27, // EXEC unregisters NscBand when invisible
  1872. SBCMDID_SEARCHBAR = 28, // show/hide/toggle BrowserBar search
  1873. SBCMDID_HISTORYBAR = 29, // show/hide/toggle BrowserBar history
  1874. SBCMDID_FAVORITESBAR = 30, // show/hide/toggle BrowserBar favorites
  1875. #ifdef ENABLE_CHANNELS
  1876. SBCMDID_CHANNELSBAR = 31, // show/hide/toggle BrowserBar channels
  1877. #endif
  1878. SBCMDID_SENDPAGE = 32, // sends the current page via email
  1879. SBCMDID_SENDSHORTCUT = 33, // sends a shortcut to current page via email
  1880. SBCMDID_TOOLBAREMPTY = 34, // toolbar has nothing visible
  1881. SBCMDID_EXPLORERBAR = 35, // show/hide/toggle BrowserBar all folders
  1882. SBCMDID_GETUSERADDRESSBARTEXT = 36, // get the exact text the user-entered
  1883. SBCMDID_HISTSFOLDER = 37, // EXEC varOut returns cached history IShellFolder
  1884. SBCMDID_UPDATETRAVELLOG = 38, // updates the travellog with the current info
  1885. SBCMDID_MIXEDZONE = 39, // The current view has mixed zones
  1886. SBCMDID_REPLACELOCATION = 40, // replace the current URL with this one.
  1887. SBCMDID_GETPANE = 41, // Browser asks the view for pane ordinal
  1888. SBCMDID_FILERENAME = 42, // Browser forwards file->rename to explorer bar
  1889. SBCMDID_FILEDELETE = 43, // Browser forwards file->delete to explorer bar
  1890. SBCMDID_FILEPROPERTIES = 44, // Browser forwards file->properties to explorer bar
  1891. SBCMDID_IESHORTCUT = 45, // Navigates the browser to an .url file
  1892. SBCMDID_GETSHORTCUTPATH = 46, // Asks for the path to the shortcut - if it exists
  1893. SBCMDID_DISCUSSIONBAND = 47, // show/hide/toggle the Office discussion band
  1894. SBCMDID_SETADDRESSBARFOCUS = 48, // Set focus on address bar on WM_ACTIVATE (UNIX)
  1895. SBCMDID_HASADDRESSBARFOCUS = 49, // Checks whether address bar has focus (UNIX)
  1896. SBCMDID_MSGBAND = 50, // MsgBand Message (UNIX)
  1897. SBCMDID_ISIEMODEBROWSER = 51, // returns S_OK if browser is in IE mode
  1898. SBCMDID_GETTEMPLATEMENU = 52, // get handle to template menu
  1899. SBCMDID_GETCURRENTMENU = 53, // get handle to current menu
  1900. SBCMDID_ERRORPAGE = 54, // informs addressbar mru that this is an error page
  1901. SBCMDID_AUTOSEARCHING = 55, // informs addressbar mru that we are trying a new url
  1902. SBCMDID_STARTEDFORINTERNET = 56, // return S_OK if window started as IE window, S_FALSE otherwise
  1903. SBCMDID_ISBROWSERACTIVE = 57, // return S_OK if the browser is active, S_FALSE otherwise
  1904. SBCMDID_SUGGESTSAVEWINPOS = 58, // return S_OK if browser decides to save window position, S_FALSE otherwise
  1905. SBCMDID_CACHEINETZONEICON = 59, // Cache/refresh internet zone icons painted by status bar
  1906. SBCMDID_ONVIEWMOVETOTOP = 60, // Notification that the view window has moved to HWND_TOP
  1907. SBCMDID_ONCLOSE = 61, // Close notification destined for the dochost.
  1908. SBCMDID_CANCELANDCLOSE = 62, // Cancel the async download and close the browser.
  1909. SBCMDID_MEDIABAR = 63, // show/hide/toggle MediaBar
  1910. };
  1911. #define ZONE_UNKNOWN -1
  1912. #define ZONE_MIXED -2
  1913. #define IS_SPECIAL_ZONE(a) (((a) == ZONE_UNKNOWN) || ((a) == ZONE_MIXED))
  1914. ;end_internal
  1915. // SBCMDID_GETPANE - not necessarily in order
  1916. #define PANE_NONE -1
  1917. #define PANE_ZONE 1
  1918. #define PANE_OFFLINE 2
  1919. #define PANE_PRINTER 3
  1920. #define PANE_SSL 4
  1921. #define PANE_NAVIGATION 5
  1922. #define PANE_PROGRESS 6
  1923. #define PANE_PRIVACY 7
  1924. ;begin_internal
  1925. #if (_WIN32_IE >= 0x0400)
  1926. // CGID_AddresseditBox Command Target IDs
  1927. enum {
  1928. AECMDID_SAVE = 0, // Ask AddressEditBox to save
  1929. };
  1930. #endif
  1931. ;end_internal
  1932. //-------------------------------------------------------------------------
  1933. // ICommDlgBrowser interface
  1934. //
  1935. // ICommDlgBrowser interface is the interface that is provided by the new
  1936. // common dialog window to hook and modify the behavior of IShellView. When
  1937. // a default view is created, it queries its parent IShellBrowser for the
  1938. // ICommDlgBrowser interface. If supported, it calls out to that interface
  1939. // in several cases that need to behave differently in a dialog.
  1940. //
  1941. // Member functions:
  1942. //
  1943. // ICommDlgBrowser::OnDefaultCommand()
  1944. // Called when the user double-clicks in the view or presses Enter. The
  1945. // browser should return S_OK if it processed the action itself, S_FALSE
  1946. // to let the view perform the default action.
  1947. //
  1948. // ICommDlgBrowser::OnStateChange(ULONG uChange)
  1949. // Called when some states in the view change. 'uChange' is one of the
  1950. // CDBOSC_* values. This call is made after the state (selection, focus,
  1951. // etc) has changed. There is no return value.
  1952. //
  1953. // ICommDlgBrowser::IncludeObject(LPCITEMIDLIST pidl)
  1954. // Called when the view is enumerating objects. 'pidl' is a relative
  1955. // IDLIST. The browser should return S_OK to include the object in the
  1956. // view, S_FALSE to hide it
  1957. //
  1958. //-------------------------------------------------------------------------
  1959. #define CDBOSC_SETFOCUS 0x00000000
  1960. #define CDBOSC_KILLFOCUS 0x00000001
  1961. #define CDBOSC_SELCHANGE 0x00000002
  1962. #define CDBOSC_RENAME 0x00000003
  1963. #define CDBOSC_STATECHANGE 0x00000004
  1964. #undef INTERFACE
  1965. #define INTERFACE ICommDlgBrowser
  1966. DECLARE_INTERFACE_(ICommDlgBrowser, IUnknown)
  1967. {
  1968. // *** IUnknown methods ***
  1969. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1970. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1971. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1972. // *** ICommDlgBrowser methods ***
  1973. STDMETHOD(OnDefaultCommand) (THIS_ struct IShellView * ppshv) PURE;
  1974. STDMETHOD(OnStateChange) (THIS_ struct IShellView * ppshv,
  1975. ULONG uChange) PURE;
  1976. STDMETHOD(IncludeObject) (THIS_ struct IShellView * ppshv,
  1977. LPCITEMIDLIST pidl) PURE;
  1978. };
  1979. typedef ICommDlgBrowser * LPCOMMDLGBROWSER;
  1980. //-------------------------------------------------------------------------
  1981. // ICommDlgBrowser2 interface
  1982. //
  1983. // Member functions:
  1984. //
  1985. // ICommDlgBrowser2::Notify(IShellView *pshv, DWORD dwNotfyType)
  1986. // Called when the view is wants to notify common dialog when an event
  1987. // occurrs.
  1988. //
  1989. // CDB2N_CONTEXTMENU_START indicates the context menu has started.
  1990. // CDB2N_CONTEXTMENU_DONE indicates the context menu has completed.
  1991. //
  1992. // ICommDlgBrowser2::GetDefaultMenuText(IShellView *pshv,
  1993. // WCHAR *pszText, INT cchMax)
  1994. // Called when the view wants to get the default context menu text.
  1995. // pszText points to buffer and cchMax specifies the size of the
  1996. // buffer in characters. The browser on return has filled the buffer
  1997. // with the default context menu text. The Shell will call this method
  1998. // with at least a buffer size of MAX_PATH. The browser should return
  1999. // S_OK if it returned a new default menu text, S_FALSE to let the view
  2000. // to use the normal default menu text.
  2001. //
  2002. // ICommDlgBrowser2::GetViewFlags(DWORD *pdwFlags)
  2003. // Called when the view wants to determine if special customization needs to
  2004. // be done for the common dialog browser. For example View calls this function to
  2005. // determin if all files(hidden and system)needs to be shown. If the GetViewFlags returns a DWORD with
  2006. // CDB2GVF_SHOWALLFILES flag set then it will show all the files.
  2007. //-------------------------------------------------------------------------
  2008. #define CDB2N_CONTEXTMENU_DONE 0x00000001
  2009. #define CDB2N_CONTEXTMENU_START 0x00000002
  2010. //GetViewFlags
  2011. #define CDB2GVF_SHOWALLFILES 0x00000001
  2012. #undef INTERFACE
  2013. #define INTERFACE ICommDlgBrowser2
  2014. DECLARE_INTERFACE_(ICommDlgBrowser2, IUnknown)
  2015. {
  2016. // *** IUnknown methods ***
  2017. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2018. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2019. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2020. // *** ICommDlgBrowser methods ***
  2021. STDMETHOD(OnDefaultCommand) (THIS_ struct IShellView * ppshv) PURE;
  2022. STDMETHOD(OnStateChange) (THIS_ struct IShellView * ppshv,
  2023. ULONG uChange) PURE;
  2024. STDMETHOD(IncludeObject) (THIS_ struct IShellView * ppshv,
  2025. LPCITEMIDLIST pidl) PURE;
  2026. // *** ICommDlgBrowser2 methods ***
  2027. STDMETHOD(Notify) (THIS_ struct IShellView * ppshv,
  2028. DWORD dwNotifyType) PURE;
  2029. STDMETHOD(GetDefaultMenuText) (THIS_ struct IShellView * ppshv,
  2030. WCHAR *pszText, INT cchMax) PURE;
  2031. STDMETHOD(GetViewFlags)(THIS_ DWORD *pdwFlags) PURE;
  2032. };
  2033. typedef ICommDlgBrowser2 * LPCOMMDLGBROWSER2;
  2034. ;begin_internal
  2035. #ifdef NONAMELESSUNION
  2036. #define NAMELESS_MEMBER(member) DUMMYUNIONNAME.##member
  2037. #else
  2038. #define NAMELESS_MEMBER(member) member
  2039. #endif
  2040. #define STRRET_OLESTR STRRET_WSTR // same as STRRET_WSTR
  2041. #define STRRET_OFFPTR(pidl,lpstrret) ((LPSTR)((LPBYTE)(pidl)+(lpstrret)->NAMELESS_MEMBER(uOffset)))
  2042. ;end_internal
  2043. //
  2044. // function assumes the size of the buffer (MAX_PATH). The pidl
  2045. // should point to a file system object.
  2046. SHSTDAPI_(BOOL) SHGetPathFromIDList%(LPCITEMIDLIST pidl, LPTSTR% pszPath);
  2047. ;begin_internal
  2048. // DOC'ed for DOJ compliance
  2049. ;end_internal
  2050. SHSTDAPI_(int) SHCreateDirectory(HWND hwnd, LPCWSTR pszPath);
  2051. SHSTDAPI_(int) SHCreateDirectoryEx%(HWND hwnd, LPCTSTR% pszPath, SECURITY_ATTRIBUTES *psa);
  2052. SHSTDAPI SHOpenFolderAndSelectItems(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST *apidl, DWORD dwFlags);
  2053. SHSTDAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi);
  2054. ;begin_internal
  2055. SHSTDAPI SHParseShellItem(LPCWSTR psz, IShellItem **ppsi);
  2056. SHSTDAPI SIEnumObjects(IShellItem *psi, HWND hwnd, SHCONTF flags, IEnumShellItems **ppenum);
  2057. SHSTDAPI SHCreateShellItemArray(LPCITEMIDLIST pidlParent,IShellFolder *psfParent,UINT cidl,
  2058. LPCITEMIDLIST *ppidl,IShellItemArray **ppsiItemArray);
  2059. ;end_internal
  2060. //-------------------------------------------------------------------------
  2061. //
  2062. // SHGetSpecialFolderLocation
  2063. //
  2064. // Caller should use SHGetMalloc to obtain an allocator that can free the pidl
  2065. //
  2066. //
  2067. //-------------------------------------------------------------------------
  2068. //
  2069. // registry entries for special paths are kept in :
  2070. #define REGSTR_PATH_SPECIAL_FOLDERS REGSTR_PATH_EXPLORER TEXT("\\Shell Folders")
  2071. #define REGSTR_PATH_INTERNET_EXPLORER TEXT("\\SOFTWARE\\Microsoft\\Internet Explorer") ; Internal
  2072. #define REGSTR_PATH_IE_MAIN REGSTR_PATH_INTERNET_EXPLORER TEXT("\\Main") ; Internal
  2073. #define REGSTR_VALUE_USER_AGENT TEXT("UserAgent") ; Internal
  2074. #define REGSTR_DEFAULT_USER_AGENT TEXT("Mozilla/2.0 (compatible; MSIE 3.0A; Windows 95)") ; Internal
  2075. #define CSIDL_DESKTOP 0x0000 // <desktop>
  2076. #define CSIDL_INTERNET 0x0001 // Internet Explorer (icon on desktop)
  2077. #define CSIDL_PROGRAMS 0x0002 // Start Menu\Programs
  2078. #define CSIDL_CONTROLS 0x0003 // My Computer\Control Panel
  2079. #define CSIDL_PRINTERS 0x0004 // My Computer\Printers
  2080. #define CSIDL_PERSONAL 0x0005 // My Documents
  2081. #define CSIDL_FAVORITES 0x0006 // <user name>\Favorites
  2082. #define CSIDL_STARTUP 0x0007 // Start Menu\Programs\Startup
  2083. #define CSIDL_RECENT 0x0008 // <user name>\Recent
  2084. #define CSIDL_SENDTO 0x0009 // <user name>\SendTo
  2085. #define CSIDL_BITBUCKET 0x000a // <desktop>\Recycle Bin
  2086. #define CSIDL_STARTMENU 0x000b // <user name>\Start Menu
  2087. #define CSIDL_MYDOCUMENTS 0x000c // logical "My Documents" desktop icon
  2088. #define CSIDL_MYMUSIC 0x000d // "My Music" folder
  2089. #define CSIDL_MYVIDEO 0x000e // "My Videos" folder
  2090. // 0x000f ;Internal
  2091. #define CSIDL_DESKTOPDIRECTORY 0x0010 // <user name>\Desktop
  2092. #define CSIDL_DRIVES 0x0011 // My Computer
  2093. #define CSIDL_NETWORK 0x0012 // Network Neighborhood (My Network Places)
  2094. #define CSIDL_NETHOOD 0x0013 // <user name>\nethood
  2095. #define CSIDL_FONTS 0x0014 // windows\fonts
  2096. #define CSIDL_TEMPLATES 0x0015
  2097. #define CSIDL_COMMON_STARTMENU 0x0016 // All Users\Start Menu
  2098. #define CSIDL_COMMON_PROGRAMS 0X0017 // All Users\Start Menu\Programs
  2099. #define CSIDL_COMMON_STARTUP 0x0018 // All Users\Startup
  2100. #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 // All Users\Desktop
  2101. #define CSIDL_APPDATA 0x001a // <user name>\Application Data
  2102. #define CSIDL_PRINTHOOD 0x001b // <user name>\PrintHood
  2103. #ifndef CSIDL_LOCAL_APPDATA
  2104. #define CSIDL_LOCAL_APPDATA 0x001c // <user name>\Local Settings\Applicaiton Data (non roaming)
  2105. #endif // CSIDL_LOCAL_APPDATA
  2106. #define CSIDL_ALTSTARTUP 0x001d // non localized startup
  2107. #define CSIDL_COMMON_ALTSTARTUP 0x001e // non localized common startup
  2108. #define CSIDL_COMMON_FAVORITES 0x001f
  2109. #ifndef _SHFOLDER_H_
  2110. #define CSIDL_INTERNET_CACHE 0x0020
  2111. #define CSIDL_COOKIES 0x0021
  2112. #define CSIDL_HISTORY 0x0022
  2113. #define CSIDL_COMMON_APPDATA 0x0023 // All Users\Application Data
  2114. #define CSIDL_WINDOWS 0x0024 // GetWindowsDirectory()
  2115. #define CSIDL_SYSTEM 0x0025 // GetSystemDirectory()
  2116. #define CSIDL_PROGRAM_FILES 0x0026 // C:\Program Files
  2117. #define CSIDL_MYPICTURES 0x0027 // C:\Program Files\My Pictures
  2118. #endif // _SHFOLDER_H_
  2119. #define CSIDL_PROFILE 0x0028 // USERPROFILE
  2120. #define CSIDL_SYSTEMX86 0x0029 // x86 system directory on RISC
  2121. #define CSIDL_PROGRAM_FILESX86 0x002a // x86 C:\Program Files on RISC
  2122. #ifndef _SHFOLDER_H_
  2123. #define CSIDL_PROGRAM_FILES_COMMON 0x002b // C:\Program Files\Common
  2124. #endif // _SHFOLDER_H_
  2125. #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c // x86 Program Files\Common on RISC
  2126. #define CSIDL_COMMON_TEMPLATES 0x002d // All Users\Templates
  2127. #ifndef _SHFOLDER_H_
  2128. #define CSIDL_COMMON_DOCUMENTS 0x002e // All Users\Documents
  2129. #define CSIDL_COMMON_ADMINTOOLS 0x002f // All Users\Start Menu\Programs\Administrative Tools
  2130. #define CSIDL_ADMINTOOLS 0x0030 // <user name>\Start Menu\Programs\Administrative Tools
  2131. #endif // _SHFOLDER_H_
  2132. #define CSIDL_CONNECTIONS 0x0031 // Network and Dial-up Connections
  2133. #define CSIDL_PERUSER_TEMP 0x0032 // per user TEMP (reserved, not impelemented);Internal
  2134. #define CSIDL_9XCOMMAND 0x0033 // Win9x COMMANDN (dos programs) (reserved, not impelemented);Internal
  2135. #define CSIDL_9XSYSTEM 0x0034 // Win9x/NT system (not system32) (reserved, not impelemented);Internal
  2136. #define CSIDL_COMMON_MUSIC 0x0035 // All Users\My Music
  2137. #define CSIDL_COMMON_PICTURES 0x0036 // All Users\My Pictures
  2138. #define CSIDL_COMMON_VIDEO 0x0037 // All Users\My Video
  2139. #define CSIDL_RESOURCES 0x0038 // Resource Direcotry
  2140. #ifndef _SHFOLDER_H_
  2141. #define CSIDL_RESOURCES_LOCALIZED 0x0039 // Localized Resource Direcotry
  2142. #endif // _SHFOLDER_H_
  2143. #define CSIDL_COMMON_OEM_LINKS 0x003a // Links to All Users OEM specific apps
  2144. #define CSIDL_CDBURN_AREA 0x003b // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
  2145. // unused 0x003c
  2146. #define CSIDL_COMPUTERSNEARME 0x003d // Computers Near Me (computered from Workgroup membership)
  2147. #ifndef _SHFOLDER_H_
  2148. #define CSIDL_FLAG_CREATE 0x8000 // combine with CSIDL_ value to force folder creation in SHGetFolderPath()
  2149. #endif // _SHFOLDER_H_
  2150. #define CSIDL_FLAG_DONT_VERIFY 0x4000 // combine with CSIDL_ value to return an unverified folder path
  2151. ;begin_internal
  2152. #define CSIDL_FLAG_DONT_UNEXPAND 0x2000 // combine with CSIDL_ value to avoid unexpanding environment variables
  2153. ;end_internal
  2154. #define CSIDL_FLAG_NO_ALIAS 0x1000 // combine with CSIDL_ value to insure non-alias versions of the pidl
  2155. #define CSIDL_FLAG_PER_USER_INIT 0x0800 // combine with CSIDL_ value to indicate per-user init (eg. upgrade)
  2156. #define CSIDL_FLAG_MASK 0xFF00 // mask for all possible flag values
  2157. SHSTDAPI SHGetSpecialFolderLocation(HWND hwnd, int csidl, LPITEMIDLIST *ppidl);
  2158. #if (_WIN32_IE >= 0x0400)
  2159. ;begin_internal
  2160. // DOC'ed for DOJ compliance
  2161. ;end_internal
  2162. SHSTDAPI_(void) SHFlushSFCache(void);
  2163. SHSTDAPI_(LPITEMIDLIST) SHCloneSpecialIDList(HWND hwnd, int csidl, BOOL fCreate);
  2164. SHSTDAPI_(BOOL) SHGetSpecialFolderPath%(HWND hwnd, LPTSTR% pszPath, int csidl, BOOL fCreate);
  2165. #if (_WIN32_IE >= 0x0500)
  2166. typedef enum {
  2167. SHGFP_TYPE_CURRENT = 0, // current value for user, verify it exists
  2168. SHGFP_TYPE_DEFAULT = 1, // default value, may not exist
  2169. } SHGFP_TYPE;
  2170. SHFOLDERAPI SHGetFolderPath%(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR% pszPath);
  2171. SHSTDAPI SHGetFolderLocation(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPITEMIDLIST *ppidl);
  2172. SHFOLDERAPI SHGetFolderPathAndSubDir%(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPCTSTR% pszSubDir, LPTSTR% pszPath);
  2173. ;begin_internal
  2174. SHFOLDERAPI SHSetFolderPath%(int csidl, HANDLE hToken, DWORD dwFlags, LPCTSTR% pszPath);
  2175. SHSTDAPI_(BOOL) MakeShellURLFromPath%(LPCTSTR% pszPathIn, LPTSTR% pszUrl, DWORD dwCch);
  2176. SHSTDAPI_(BOOL) SHIsTempDisplayMode();
  2177. SHSTDAPI_(FILEDESCRIPTOR *) GetFileDescriptor(FILEGROUPDESCRIPTOR *pfgd, BOOL fUnicode, int nIndex, LPTSTR pszName);
  2178. SHSTDAPI CopyStreamUI(IStream *pstmSrc, IStream *pstmDest, IProgressDialog *pdlg, ULONGLONG ullMaxBytes);
  2179. ;end_internal
  2180. #endif // _WIN32_IE >= 0x0500
  2181. #endif // _WIN32_IE >= 0x0400
  2182. ;begin_internal
  2183. // DOC'ed for DOJ compliance
  2184. ;end_internal
  2185. #if (_WIN32_IE >= 0x0500)
  2186. #define FCS_READ 0x00000001
  2187. #define FCS_FORCEWRITE 0x00000002
  2188. #define FCS_WRITE (FCS_READ | FCS_FORCEWRITE)
  2189. #define FCS_FLAG_DRAGDROP 2
  2190. // Mask which values have been retreived or being set.
  2191. #define FCSM_VIEWID 0x00000001
  2192. #define FCSM_WEBVIEWTEMPLATE 0x00000002
  2193. #define FCSM_INFOTIP 0x00000004
  2194. #define FCSM_CLSID 0x00000008
  2195. #define FCSM_ICONFILE 0x00000010
  2196. #define FCSM_LOGO 0x00000020
  2197. #define FCSM_FLAGS 0x00000040
  2198. #include <pshpack8.h>
  2199. // Used by SHGetSetFolderCustomSettingsA
  2200. typedef struct
  2201. {
  2202. DWORD dwSize;
  2203. DWORD dwMask; // IN/OUT Which Attributes to Get/Set
  2204. SHELLVIEWID* pvid; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2205. // The folder's WebView template path
  2206. LPSTR pszWebViewTemplate; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2207. DWORD cchWebViewTemplate; // IN - Specifies the size of the buffer pointed to by pszWebViewTemplate
  2208. // Ignored if dwReadWrite is FCS_READ
  2209. LPSTR pszWebViewTemplateVersion; // currently IN only
  2210. // Infotip for the folder
  2211. LPSTR pszInfoTip; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2212. DWORD cchInfoTip; // IN - Specifies the size of the buffer pointed to by pszInfoTip
  2213. // Ignored if dwReadWrite is FCS_READ
  2214. // CLSID that points to more info in the registry
  2215. CLSID* pclsid; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2216. // Other flags for the folder. Takes FCS_FLAG_* values
  2217. DWORD dwFlags; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2218. LPSTR pszIconFile; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2219. DWORD cchIconFile; // IN - Specifies the size of the buffer pointed to by pszIconFile
  2220. // Ignored if dwReadWrite is FCS_READ
  2221. int iIconIndex; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2222. LPSTR pszLogo; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2223. DWORD cchLogo; // IN - Specifies the size of the buffer pointed to by pszIconFile
  2224. // Ignored if dwReadWrite is FCS_READ
  2225. } SHFOLDERCUSTOMSETTINGSA, *LPSHFOLDERCUSTOMSETTINGSA;
  2226. // Used by SHGetSetFolderCustomSettingsW
  2227. typedef struct
  2228. {
  2229. DWORD dwSize;
  2230. DWORD dwMask; // IN/OUT Which Attributes to Get/Set
  2231. SHELLVIEWID* pvid; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2232. // The folder's WebView template path
  2233. LPWSTR pszWebViewTemplate; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2234. DWORD cchWebViewTemplate; // IN - Specifies the size of the buffer pointed to by pszWebViewTemplate
  2235. // Ignored if dwReadWrite is FCS_READ
  2236. LPWSTR pszWebViewTemplateVersion; // currently IN only
  2237. // Infotip for the folder
  2238. LPWSTR pszInfoTip; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2239. DWORD cchInfoTip; // IN - Specifies the size of the buffer pointed to by pszInfoTip
  2240. // Ignored if dwReadWrite is FCS_READ
  2241. // CLSID that points to more info in the registry
  2242. CLSID* pclsid; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2243. // Other flags for the folder. Takes FCS_FLAG_* values
  2244. DWORD dwFlags; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2245. LPWSTR pszIconFile; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2246. DWORD cchIconFile; // IN - Specifies the size of the buffer pointed to by pszIconFile
  2247. // Ignored if dwReadWrite is FCS_READ
  2248. int iIconIndex; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2249. LPWSTR pszLogo; // OUT - if dwReadWrite is FCS_READ, IN - otherwise
  2250. DWORD cchLogo; // IN - Specifies the size of the buffer pointed to by pszIconFile
  2251. // Ignored if dwReadWrite is FCS_READ
  2252. } SHFOLDERCUSTOMSETTINGSW, *LPSHFOLDERCUSTOMSETTINGSW;
  2253. #include <poppack.h> /* Return to byte packing */
  2254. // Gets/Sets the Folder Custom Settings for pszPath based on dwReadWrite. dwReadWrite can be FCS_READ/FCS_WRITE/FCS_FORCEWRITE
  2255. SHSTDAPI SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs, LPCSTR pszPath, DWORD dwReadWrite);
  2256. SHSTDAPI SHGetSetFolderCustomSettingsW(LPSHFOLDERCUSTOMSETTINGSW pfcs, LPCWSTR pszPath, DWORD dwReadWrite);
  2257. #ifdef UNICODE
  2258. #define SHFOLDERCUSTOMSETTINGS SHFOLDERCUSTOMSETTINGSW
  2259. #define SHGetSetFolderCustomSettings SHGetSetFolderCustomSettingsW
  2260. #define LPSHFOLDERCUSTOMSETTINGS LPSHFOLDERCUSTOMSETTINGSW
  2261. #else
  2262. #define SHFOLDERCUSTOMSETTINGS SHFOLDERCUSTOMSETTINGSA
  2263. #define SHGetSetFolderCustomSettings SHGetSetFolderCustomSettingsA
  2264. #define LPSHFOLDERCUSTOMSETTINGS LPSHFOLDERCUSTOMSETTINGSA
  2265. #endif
  2266. #endif // _WIN32_IE >= 0x0500
  2267. ;begin_internal
  2268. // above was doc'ed for DOJ compliance
  2269. ;end_internal
  2270. //-------------------------------------------------------------------------
  2271. //
  2272. // SHBrowseForFolder API
  2273. //
  2274. //
  2275. //-------------------------------------------------------------------------
  2276. typedef int (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
  2277. #include <pshpack8.h>
  2278. typedef struct _browseinfoA {
  2279. HWND hwndOwner;
  2280. LPCITEMIDLIST pidlRoot;
  2281. LPSTR pszDisplayName; // Return display name of item selected.
  2282. // pszTitle can be a resource, but the hinst is assumed to be shell32.dll ;Internal
  2283. LPCSTR lpszTitle; // text to go in the banner over the tree.
  2284. UINT ulFlags; // Flags that control the return stuff
  2285. BFFCALLBACK lpfn;
  2286. LPARAM lParam; // extra info that's passed back in callbacks
  2287. int iImage; // output var: where to return the Image index.
  2288. } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
  2289. typedef struct _browseinfoW {
  2290. HWND hwndOwner;
  2291. LPCITEMIDLIST pidlRoot;
  2292. LPWSTR pszDisplayName; // Return display name of item selected.
  2293. // lpszTitle can be a resource, but the hinst is assumed to be shell32.dll ;Internal
  2294. LPCWSTR lpszTitle; // text to go in the banner over the tree.
  2295. UINT ulFlags; // Flags that control the return stuff
  2296. BFFCALLBACK lpfn;
  2297. LPARAM lParam; // extra info that's passed back in callbacks
  2298. int iImage; // output var: where to return the Image index.
  2299. } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
  2300. #include <poppack.h> /* Return to byte packing */
  2301. #ifdef UNICODE
  2302. #define BROWSEINFO BROWSEINFOW
  2303. #define PBROWSEINFO PBROWSEINFOW
  2304. #define LPBROWSEINFO LPBROWSEINFOW
  2305. #else
  2306. #define BROWSEINFO BROWSEINFOA
  2307. #define PBROWSEINFO PBROWSEINFOA
  2308. #define LPBROWSEINFO LPBROWSEINFOA
  2309. #endif
  2310. // Browsing for directory.
  2311. #define BIF_RETURNONLYFSDIRS 0x0001 // For finding a folder to start document searching
  2312. #define BIF_DONTGOBELOWDOMAIN 0x0002 // For starting the Find Computer
  2313. #define BIF_STATUSTEXT 0x0004 // Top of the dialog has 2 lines of text for BROWSEINFO.lpszTitle and one line if
  2314. // this flag is set. Passing the message BFFM_SETSTATUSTEXTA to the hwnd can set the
  2315. // rest of the text. This is not used with BIF_USENEWUI and BROWSEINFO.lpszTitle gets
  2316. // all three lines of text.
  2317. #define BIF_RETURNFSANCESTORS 0x0008
  2318. #define BIF_EDITBOX 0x0010 // Add an editbox to the dialog
  2319. #define BIF_VALIDATE 0x0020 // insist on valid result (or CANCEL)
  2320. #define BIF_NEWDIALOGSTYLE 0x0040 // Use the new dialog layout with the ability to resize
  2321. // Caller needs to call OleInitialize() before using this API
  2322. #define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
  2323. #define BIF_BROWSEINCLUDEURLS 0x0080 // Allow URLs to be displayed or entered. (Requires BIF_USENEWUI)
  2324. #define BIF_UAHINT 0x0100 // Add a UA hint to the dialog, in place of the edit box. May not be combined with BIF_EDITBOX
  2325. #define BIF_NONEWFOLDERBUTTON 0x0200 // Do not add the "New Folder" button to the dialog. Only applicable with BIF_NEWDIALOGSTYLE.
  2326. #define BIF_NOTRANSLATETARGETS 0x0400 // don't traverse target as shortcut
  2327. #define BIF_BROWSEFORCOMPUTER 0x1000 // Browsing for Computers.
  2328. #define BIF_BROWSEFORPRINTER 0x2000 // Browsing for Printers
  2329. #define BIF_BROWSEINCLUDEFILES 0x4000 // Browsing for Everything
  2330. #define BIF_SHAREABLE 0x8000 // sharable resources displayed (remote shares, requires BIF_USENEWUI)
  2331. // message from browser
  2332. #define BFFM_INITIALIZED 1
  2333. #define BFFM_SELCHANGED 2
  2334. #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
  2335. #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
  2336. #define BFFM_IUNKNOWN 5 // provides IUnknown to client. lParam: IUnknown*
  2337. // messages to browser
  2338. #define BFFM_SETSTATUSTEXTA (WM_USER + 100)
  2339. #define BFFM_ENABLEOK (WM_USER + 101)
  2340. #define BFFM_SETSELECTIONA (WM_USER + 102)
  2341. #define BFFM_SETSELECTIONW (WM_USER + 103)
  2342. #define BFFM_SETSTATUSTEXTW (WM_USER + 104)
  2343. #define BFFM_SETOKTEXT (WM_USER + 105) // Unicode only
  2344. #define BFFM_SETEXPANDED (WM_USER + 106) // Unicode only
  2345. SHSTDAPI_(LPITEMIDLIST) SHBrowseForFolderA(LPBROWSEINFOA lpbi);
  2346. SHSTDAPI_(LPITEMIDLIST) SHBrowseForFolderW(LPBROWSEINFOW lpbi);
  2347. #ifdef UNICODE
  2348. #define SHBrowseForFolder SHBrowseForFolderW
  2349. #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
  2350. #define BFFM_SETSELECTION BFFM_SETSELECTIONW
  2351. #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
  2352. #else
  2353. #define SHBrowseForFolder SHBrowseForFolderA
  2354. #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
  2355. #define BFFM_SETSELECTION BFFM_SETSELECTIONA
  2356. #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
  2357. #endif
  2358. //-------------------------------------------------------------------------
  2359. //
  2360. // SHLoadInProc
  2361. //
  2362. // When this function is called, the shell calls CoCreateInstance
  2363. // (or equivalent) with CLSCTX_INPROC_SERVER and the specified CLSID
  2364. // from within the shell's process and release it immediately.
  2365. //
  2366. //-------------------------------------------------------------------------
  2367. SHSTDAPI SHLoadInProc(REFCLSID rclsid);
  2368. #if _WIN32_IE >= 0x0600
  2369. //-------------------------------------------------------------------------
  2370. //
  2371. // SHEnableServiceObject
  2372. //
  2373. // Like SHLoadInProc, but gives control over the object's lifetime
  2374. // via fEnable parameter. TRUE tells the shell to create the object
  2375. // and hold onto it, FALSE tells the shell to look for the previously
  2376. // created instance of the object and release it.
  2377. //
  2378. //-------------------------------------------------------------------------
  2379. SHSTDAPI SHEnableServiceObject(REFCLSID rclsid, BOOL fEnable);
  2380. #endif
  2381. ;begin_internal
  2382. //-------------------------------------------------------------------------
  2383. //
  2384. // Shell Service Object
  2385. //
  2386. //-------------------------------------------------------------------------
  2387. // Cmds for CGID_ShellServiceObject
  2388. enum {
  2389. SSOCMDID_OPEN = 2,
  2390. SSOCMDID_CLOSE = 3,
  2391. };
  2392. ;end_internal
  2393. //-------------------------------------------------------------------------
  2394. //
  2395. // Internet Shortcut Object
  2396. //
  2397. //-------------------------------------------------------------------------
  2398. // Cmds for CGID_ShortCut
  2399. enum {
  2400. ISHCUTCMDID_DOWNLOADICON = 0,
  2401. ISHCUTCMDID_INTSHORTCUTCREATE = 1,
  2402. };
  2403. #define CMDID_INTSHORTCUTCREATE ISHCUTCMDID_INTSHORTCUTCREATE
  2404. ;begin_internal
  2405. #define CMDID_SAVEASTHICKET 5
  2406. //-------------------------------------------------------------------------
  2407. // STR_DISPLAY_UI_DURING_BINDING - IBindCtx Key
  2408. //-------------------------------------------------------------------------
  2409. // If displaying UI during binding is allowed, this parameter
  2410. // will be in the IBindCtx so the object binding can get the
  2411. // IUnknown* of the site in order to:
  2412. // 1. Use the site's hwnd as the parent hwnd of any UI dialogs.
  2413. // This is done via. IOleWindow::GetWindow() or IInternetSecurityMgrSite::GetWindow()
  2414. // 2. While the dialog is being displayed, make the site modal
  2415. // This is done via:
  2416. // IOleInPlaceActiveObject::EnableModeless()
  2417. // IOleInPlaceUIWindow::EnableModelessSB()
  2418. // IInternetSecurityMgrSite::EnableModeless()
  2419. #define STR_DISPLAY_UI_DURING_BINDING L"UI During Binding"
  2420. // bindctx key, tells an FS folder to ignore the STGM_CREATE flag in ParseDisplayName.
  2421. // otherwise it will always succeed, but we need to be able to force it to fail for
  2422. // the cd-r drive.
  2423. #define STR_DONT_FORCE_CREATE L"Don't Force Create"
  2424. // bindctx key, passed to IShellFolder::ParseDisplayName(). gives netfldr extra
  2425. // information it can use to route the parsing of the name we are giving it.
  2426. #define STR_PARSE_NETFOLDER_INFO L"Net Parse Data"
  2427. // in the property bag associated with STR_PARSE_NETFOLDER_INFO this string property
  2428. // defines the WNetProvider to be used when calling WNetGetResourceInformation.
  2429. #define STR_PARSE_NETFOLDER_PROVIDERNAME L"WNetProvider"
  2430. ;end_internal
  2431. //
  2432. // Helper function which returns a IShellFolder interface to the desktop
  2433. // folder. This is equivalent to call CoCreateInstance with CLSID_ShellDesktop.
  2434. //
  2435. // CoCreateInstance(CLSID_Desktop, NULL,
  2436. // CLSCTX_INPROC, IID_IShellFolder, &pshf);
  2437. //
  2438. SHSTDAPI SHGetDesktopFolder(IShellFolder **ppshf);
  2439. // IShellFolder IBindCtx* parameters. the IUnknown for these are
  2440. // accessed through IBindCtx::RegisterObjectParam/GetObjectParam
  2441. // use this to provide the data needed create IDLists through
  2442. // IShellFolder::ParseDisplayName(). this data applies to the last element
  2443. // of the name that is parsed (c:\foo\bar.txt, data applies to bar.txt)
  2444. // this makes creating these IDLists much faster that suppling the name only
  2445. #define STR_FILE_SYS_BIND_DATA L"File System Bind Data"
  2446. #undef INTERFACE
  2447. #define INTERFACE IFileSystemBindData
  2448. DECLARE_INTERFACE_(IFileSystemBindData, IUnknown)
  2449. {
  2450. // *** IUnknown methods ***
  2451. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2452. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2453. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2454. // *** IFileSystemBindData methods ***
  2455. STDMETHOD(SetFindData)(THIS_ const WIN32_FIND_DATAW *pfd) PURE;
  2456. STDMETHOD(GetFindData)(THIS_ WIN32_FIND_DATAW *pfd) PURE;
  2457. };
  2458. ;begin_internal
  2459. //
  2460. // The IShellDetails interface was private in win95 and didnt have a _WIN32_IE guard,
  2461. // so it is now in shlobj.h, along with the definition of SHELLDETAILS
  2462. //
  2463. ;end_internal
  2464. #undef INTERFACE
  2465. #define INTERFACE IShellDetails
  2466. DECLARE_INTERFACE_(IShellDetails, IUnknown)
  2467. {
  2468. // *** IUnknown methods ***
  2469. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2470. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2471. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2472. // *** IShellDetails methods ***
  2473. STDMETHOD(GetDetailsOf)(THIS_ LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *pDetails) PURE;
  2474. STDMETHOD(ColumnClick)(THIS_ UINT iColumn) PURE;
  2475. };
  2476. ;begin_internal
  2477. //-------------------------------------------------------------------------
  2478. //
  2479. // DELEGATEITEMID structure
  2480. //
  2481. //
  2482. // A Delegate Item ID is a standard SHITEMID with some additional
  2483. // fields defined.
  2484. //
  2485. //-------------------------------------------------------------------------
  2486. typedef struct tagDELEGATEITEMID {
  2487. WORD cbSize; // Size of entire item ID
  2488. WORD wOuter; // Private data owned by the outer folder
  2489. WORD cbInner; // Size of delegate's data
  2490. BYTE rgb[1]; // Inner folder's data,
  2491. // followed by outer folder's data.
  2492. } DELEGATEITEMID;
  2493. typedef const UNALIGNED DELEGATEITEMID *PCDELEGATEITEMID;
  2494. typedef UNALIGNED DELEGATEITEMID *PDELEGATEITEMID;
  2495. //-------------------------------------------------------------------------
  2496. //
  2497. // IDelegateFolder interface
  2498. //
  2499. //
  2500. // [Member functions]
  2501. //
  2502. // IDelegateFolder::SetItemAlloc(pm)
  2503. // This function gives the object an IMalloc interface that it
  2504. // should use to alloc and free item IDs. These IDs are in the
  2505. // form of DELEGATEITEMIDs.
  2506. //
  2507. //-------------------------------------------------------------------------
  2508. #undef INTERFACE
  2509. #define INTERFACE IDelegateFolder
  2510. DECLARE_INTERFACE_(IDelegateFolder, IUnknown)
  2511. {
  2512. // *** IUnknown methods ***
  2513. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2514. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2515. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2516. // *** IDelegateFolder methods ***
  2517. STDMETHOD(SetItemAlloc)(THIS_ IMalloc *pmalloc) PURE;
  2518. };
  2519. #undef INTERFACE
  2520. #define INTERFACE IMountedVolume
  2521. DECLARE_INTERFACE_(IMountedVolume, IUnknown)
  2522. {
  2523. // *** IUnknown methods ***
  2524. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2525. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2526. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2527. // *** IMountedVolume methods ***
  2528. STDMETHOD(Initialize)(THIS_ LPCWSTR pcszHostFolderPath) PURE;
  2529. };
  2530. ;end_internal
  2531. //-------------------------------------------------------------------------
  2532. //
  2533. // IObjMgr interface
  2534. //
  2535. //
  2536. // [Member functions]
  2537. //
  2538. // IObjMgr::Append(punk)
  2539. // This function adds an object to the end of a list of objects.
  2540. //
  2541. // IObjMgr::Remove(punk)
  2542. // This function removes an object from a list of objects.
  2543. //
  2544. // This is implemented by CLSID_ACLMulti so each AutoComplete List
  2545. // (CLSID_ACLHistory, CLSID_ACListISF, CLSID_ACLMRU) can be added.
  2546. // CLSID_ACLMulti's IEnumString will then be the union of the results
  2547. // from the COM Objects added.
  2548. //-------------------------------------------------------------------------
  2549. #undef INTERFACE
  2550. #define INTERFACE IObjMgr
  2551. DECLARE_INTERFACE_(IObjMgr, IUnknown)
  2552. {
  2553. // *** IUnknown methods ***
  2554. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2555. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  2556. STDMETHOD_(ULONG, Release) (THIS) PURE;
  2557. // *** IObjMgr specific methods ***
  2558. STDMETHOD(Append) (THIS_ IUnknown *punk) PURE;
  2559. STDMETHOD(Remove) (THIS_ IUnknown *punk) PURE;
  2560. };
  2561. //-------------------------------------------------------------------------
  2562. //
  2563. // ICurrentWorkingDirectory interface
  2564. //
  2565. //
  2566. // [Member functions]
  2567. //
  2568. // ICurrentWorkingDirectory::GetDirectory(LPWSTR pwzPath, DWORD cchSize)
  2569. // This function gets the Current Working Directory from a COM object that
  2570. // stores such state.
  2571. //
  2572. // ICurrentWorkingDirectory::SetDirectory(LPCWSTR pwzPath)
  2573. // This function sets the Current Working Directory of a COM object that
  2574. // stores such state.
  2575. //
  2576. // This function can be used generically. One COM object that implements it
  2577. // is CLSID_ACListISF so that the AutoComplete engine can complete relative
  2578. // paths. SetDirectory() will set the "Current Working Directory" and
  2579. // AutoComplete with then complete both absolute and relative paths.
  2580. // For Example, if ::SetDirectory(L"C:\Program Files") is called, then
  2581. // the user can AutoComplete "..\winnt". In order to set the current
  2582. // working directory for non-file system paths, "ftp://ftp.microsoft.com/" or
  2583. // "Control Panel" for example, use IPersistFolder.
  2584. //-------------------------------------------------------------------------
  2585. #undef INTERFACE
  2586. #define INTERFACE ICurrentWorkingDirectory
  2587. DECLARE_INTERFACE_(ICurrentWorkingDirectory, IUnknown)
  2588. {
  2589. // *** IUnknown methods ***
  2590. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2591. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  2592. STDMETHOD_(ULONG, Release) (THIS) PURE;
  2593. // *** ICurrentWorkingDirectory specific methods ***
  2594. STDMETHOD(GetDirectory) (THIS_ LPWSTR pwzPath, DWORD cchSize) PURE;
  2595. STDMETHOD(SetDirectory) (THIS_ LPCWSTR pwzPath) PURE;
  2596. };
  2597. //-------------------------------------------------------------------------
  2598. //
  2599. // IACList interface
  2600. //
  2601. //
  2602. // [Member functions]
  2603. //
  2604. // IObjMgr::Expand(LPCOLESTR)
  2605. // This function tells an autocomplete list to expand a specific string.
  2606. //
  2607. // If the user enters a multi-level path, AutoComplete (CLSID_AutoComplete)
  2608. // will use this interface to tell the "AutoComplete Lists" where to expand
  2609. // the results.
  2610. //
  2611. // For Example, if the user enters "C:\Program Files\Micros", AutoComplete
  2612. // first completely enumerate the "AutoComplete Lists" via IEnumString. Then it
  2613. // will call the "AutoComplete Lists" with IACList::Expand(L"C:\Program Files").
  2614. // It will then enumerate the IEnumString interface again to get results in
  2615. // that directory.
  2616. //-------------------------------------------------------------------------
  2617. #undef INTERFACE
  2618. #define INTERFACE IACList
  2619. DECLARE_INTERFACE_(IACList, IUnknown)
  2620. {
  2621. // *** IUnknown methods ***
  2622. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2623. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  2624. STDMETHOD_(ULONG, Release) (THIS) PURE;
  2625. // *** IACList specific methods ***
  2626. STDMETHOD(Expand) (THIS_ LPCOLESTR pszExpand) PURE;
  2627. };
  2628. //-------------------------------------------------------------------------
  2629. //
  2630. // IACList2 interface
  2631. //
  2632. // [Description]
  2633. // This interface exists to allow the caller to set filter criteria
  2634. // for an AutoComplete List. AutoComplete Lists generates the list of
  2635. // possible AutoComplete completions. CLSID_ACListISF is one AutoComplete
  2636. // List COM object that implements this interface.
  2637. //-------------------------------------------------------------------------
  2638. #undef INTERFACE
  2639. #define INTERFACE IACList2
  2640. typedef enum _tagAUTOCOMPLETELISTOPTIONS
  2641. {
  2642. ACLO_NONE = 0, // don't enumerate anything
  2643. ACLO_CURRENTDIR = 1, // enumerate current directory
  2644. ACLO_MYCOMPUTER = 2, // enumerate MyComputer
  2645. ACLO_DESKTOP = 4, // enumerate Desktop Folder
  2646. ACLO_FAVORITES = 8, // enumerate Favorites Folder
  2647. ACLO_FILESYSONLY = 16, // enumerate only the file system
  2648. ACLO_FILESYSDIRS = 32, // enumerate only the file system dirs, UNC shares, and UNC servers.
  2649. } AUTOCOMPLETELISTOPTIONS;
  2650. DECLARE_INTERFACE_(IACList2, IACList)
  2651. {
  2652. // *** IACList2 specific methods ***
  2653. STDMETHOD(SetOptions)(THIS_ DWORD dwFlag) PURE;
  2654. STDMETHOD(GetOptions)(THIS_ DWORD* pdwFlag) PURE;
  2655. };
  2656. /*-------------------------------------------------------------------------*\
  2657. INTERFACE: IProgressDialog
  2658. DESCRIPTION:
  2659. CLSID_ProgressDialog/IProgressDialog exist to allow a caller to create
  2660. a progress dialog, set it's title, animation, text lines, progress, and
  2661. it will do all the work of updating on a background thread, being modless,
  2662. handling the user cancelling the operation, and estimating the time remaining
  2663. until the operation completes.
  2664. USAGE:
  2665. This is how the dialog is used during operations that require progress
  2666. and the ability to cancel:
  2667. {
  2668. DWORD dwComplete, dwTotal;
  2669. IProgressDialog * ppd;
  2670. CoCreateInstance(CLSID_ProgressDialog, NULL, CLSCTX_INPROC_SERVER, IID_IProgressDialog, (void **)&ppd);
  2671. ppd->SetTitle(L"My Slow Operation"); // Set the title of the dialog.
  2672. ppd->SetAnimation(hInstApp, IDA_OPERATION_ANIMATION); // Set the animation to play.
  2673. ppd->StartProgressDialog(hwndParent, punk, PROGDLG_AUTOTIME, NULL); // Display and enable automatic estimated time remaining.
  2674. ppd->SetCancelMsg(L"Please wait while the current operation is cleaned up", NULL); // Will only be displayed if Cancel button is pressed.
  2675. dwComplete = 0;
  2676. dwTotal = CalcTotalUnitsToDo();
  2677. // Reset because CalcTotalUnitsToDo() took a long time and the estimated time
  2678. // is based on the time between ::StartProgressDialog() and the first
  2679. // ::SetProgress() call.
  2680. ppd->Timer(PDTIMER_RESET, NULL);
  2681. for (nIndex = 0; nIndex < nTotal; nIndex++)
  2682. {
  2683. if (TRUE == ppd->HasUserCancelled())
  2684. break;
  2685. ppd->SetLine(2, L"I'm processing item n", FALSE, NULL);
  2686. dwComplete += DoSlowOperation();
  2687. ppd->SetProgress(dwCompleted, dwTotal);
  2688. }
  2689. ppd->StopProgressDialog();
  2690. ppd->Release();
  2691. }
  2692. \*-------------------------------------------------------------------------*/
  2693. // Flags for IProgressDialog::StartProgressDialog() (dwFlags)
  2694. #define PROGDLG_NORMAL 0x00000000 // default normal progress dlg behavior
  2695. #define PROGDLG_MODAL 0x00000001 // the dialog is modal to its hwndParent (default is modeless)
  2696. #define PROGDLG_AUTOTIME 0x00000002 // automatically updates the "Line3" text with the "time remaining" (you cant call SetLine3 if you passs this!)
  2697. #define PROGDLG_NOTIME 0x00000004 // we dont show the "time remaining" if this is set. We need this if dwTotal < dwCompleted for sparse files
  2698. #define PROGDLG_NOMINIMIZE 0x00000008 // Do not have a minimize button in the caption bar.
  2699. #define PROGDLG_NOPROGRESSBAR 0x00000010 // Don't display the progress bar
  2700. // Time Actions (dwTimerAction)
  2701. #define PDTIMER_RESET 0x00000001 // Reset the timer so the progress will be calculated from now until the first ::SetProgress() is called so
  2702. // those this time will correspond to the values passed to ::SetProgress(). Only do this before ::SetProgress() is called.
  2703. #undef INTERFACE
  2704. #define INTERFACE IProgressDialog
  2705. DECLARE_INTERFACE_(IProgressDialog, IUnknown)
  2706. {
  2707. // *** IUnknown methods ***
  2708. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2709. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2710. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2711. // *** IProgressDialog specific methods
  2712. STDMETHOD(StartProgressDialog)(THIS_ HWND hwndParent, IUnknown * punkEnableModless, DWORD dwFlags, LPCVOID pvResevered) PURE;
  2713. STDMETHOD(StopProgressDialog)(THIS) PURE;
  2714. STDMETHOD(SetTitle)(THIS_ LPCWSTR pwzTitle) PURE;
  2715. STDMETHOD(SetAnimation)(THIS_ HINSTANCE hInstAnimation, UINT idAnimation) PURE;
  2716. STDMETHOD_(BOOL,HasUserCancelled) (THIS) PURE;
  2717. STDMETHOD(SetProgress)(THIS_ DWORD dwCompleted, DWORD dwTotal) PURE;
  2718. STDMETHOD(SetProgress64)(THIS_ ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
  2719. STDMETHOD(SetLine)(THIS_ DWORD dwLineNum, LPCWSTR pwzString, BOOL fCompactPath, LPCVOID pvResevered) PURE;
  2720. STDMETHOD(SetCancelMsg)(THIS_ LPCWSTR pwzCancelMsg, LPCVOID pvResevered) PURE;
  2721. STDMETHOD(Timer)(THIS_ DWORD dwTimerAction, LPCVOID pvResevered) PURE;
  2722. };
  2723. ;begin_internal
  2724. //-------------------------------------------------------------------------
  2725. // This is the interface for a browser to "subclass" the main File Cabinet
  2726. // window. Note that only the hwnd, message, wParam, and lParam fields of
  2727. // the msg structure are used. The browser window will get a WM_NOTIFY
  2728. // message with NULL ID, FCN_MESSAGE as the code, and a pointer to
  2729. // FCMSG_NOTIFY as the lParam.
  2730. //
  2731. //-------------------------------------------------------------------------
  2732. #include <pshpack8.h>
  2733. typedef struct tagFCMSG_NOTIFY
  2734. {
  2735. NMHDR hdr;
  2736. MSG msg;
  2737. LRESULT lResult;
  2738. } FCMSG_NOTIFY;
  2739. #include <poppack.h> /* Return to byte packing */
  2740. #define FCN_MESSAGE (100)
  2741. //---------------------------------------------------------------------------
  2742. // messages that can be send to the cabinet by other apps
  2743. //
  2744. // REVIEW: Do we really need to publish any of those?
  2745. //---------------------------------------------------------------------------
  2746. #define NF_INHERITVIEW 0x0000
  2747. #define NF_LOCALVIEW 0x0001
  2748. // Change the path of an existing folder.
  2749. // wParam:
  2750. // 0: LPARAM is a pidl, handle the message immediately.
  2751. // CSP_REPOST: LPARAM is a pidl, copy the pidl and handle the
  2752. // message later.
  2753. // CSP_NOEXECUTE: if this path is not a folder, fail, don't shell exec
  2754. //
  2755. //
  2756. // lParam: LPITEMIDLIST of path.
  2757. //
  2758. //
  2759. #define CSP_REPOST 0x0001
  2760. #define CSP_INITIATEDBYHLINKFRAME 0x0002
  2761. #define CSP_NOEXECUTE 0x0004
  2762. #define CSP_NONAVIGATE 0x0008
  2763. #define CWM_SETPATH (WM_USER + 2)
  2764. // lpsv points to the Shell View extension that requested idle processing
  2765. // uID is an app define identifier for the processor
  2766. // returns: TRUE if there is more idle processing necessary, FALSE if all done
  2767. // Note that the idle processor should do one "atomic" operation and return
  2768. // as soon as possible.
  2769. typedef BOOL (CALLBACK *FCIDLEPROC)(void *lpsv, UINT uID);
  2770. // Inform the File Cabinet that you want idle messages.
  2771. // This should ONLY be used by File Cabinet extensions.
  2772. // wParam: app define UINT (passed to FCIDLEPROC).
  2773. // lParam: pointer to an FCIDLEPROC.
  2774. // return: TRUE if successful; FALSE otherwise
  2775. //
  2776. #define CWM_WANTIDLE (WM_USER + 3)
  2777. // get or set the FOLDERSETTINGS for a view
  2778. // wParam: BOOL TRUE -> set to view info buffer, FALSE -> get view info buffer
  2779. // lParam: LPFOLDERSETTINGS buffer to get or set view info
  2780. //
  2781. #define CWM_GETSETCURRENTINFO (WM_USER + 4)
  2782. #define FileCabinet_GetSetCurrentInfo(_hwnd, _bSet, _lpfs) \
  2783. SendMessage(_hwnd, CWM_GETSETCURRENTINFO, (WPARAM)(_bSet), (LPARAM)(LPFOLDERSETTINGS)_lpfs)
  2784. // selects the specified item in the current view
  2785. // wParam: SVSI_* flags
  2786. // lParam: LPCITEMIDLIST of the item ID, NULL -> all items
  2787. //
  2788. #define CWM_SELECTITEM (WM_USER + 5)
  2789. #define FileCabinet_SelectItem(_hwnd, _sel, _item) \
  2790. SendMessage(_hwnd, CWM_SELECTITEM, _sel, (LPARAM)(LPCITEMIDLIST)(_item))
  2791. // selects the specified path in the current view
  2792. // wParam: SVSI_* flags
  2793. // lParam: LPCSTR of the display name
  2794. //
  2795. #define CWM_SELECTPATH (WM_USER + 6)
  2796. #define FileCabinet_SelectPath(_hwnd, _sel, _path) \
  2797. SendMessage(_hwnd, CWM_SELECTPATH, _sel, (LPARAM)(LPCSTR)(_path))
  2798. // Get the IShellBrowser object associated with an hwndMain
  2799. #define CWM_GETISHELLBROWSER (WM_USER + 7)
  2800. #define FileCabinet_GetIShellBrowser(_hwnd) \
  2801. (IShellBrowser*)SendMessage(_hwnd, CWM_GETISHELLBROWSER, 0, 0L)
  2802. //
  2803. // two pidls can have the same path, so we need a compare pidl message
  2804. #define CWM_COMPAREPIDL (WM_USER + 9)
  2805. //
  2806. // sent when the global state changes
  2807. #define CWM_GLOBALSTATECHANGE (WM_USER + 10)
  2808. #define CWMF_GLOBALSTATE 0x0000
  2809. #define CWMF_SECURITY 0x0001
  2810. // sent to the desktop from a second instance
  2811. #define CWM_COMMANDLINE (WM_USER + 11)
  2812. // global clone your current pidl
  2813. #define CWM_CLONEPIDL (WM_USER + 12)
  2814. // See if the root of the instance is as specified
  2815. #define CWM_COMPAREROOT (WM_USER + 13)
  2816. // Tell desktop our root
  2817. #define CWM_SPECIFYCOMPARE (WM_USER + 14)
  2818. // See if the root of the instance matches a hwnd
  2819. #define CWM_PERFORMCOMPARE (WM_USER + 15)
  2820. // Forward SHChangeNotify events
  2821. #define CWM_FSNOTIFY (WM_USER + 16)
  2822. // Forward SHChangeRegistration events
  2823. #define CWM_CHANGEREGISTRATION (WM_USER + 17)
  2824. // For AddToRecentDocs processing by desktop
  2825. #define CWM_ADDTORECENT (WM_USER + 18)
  2826. // For SHWaitForFile processing by desktopop
  2827. #define CWM_WAITOP (WM_USER + 19)
  2828. // Notify for changes to the fav's folder.
  2829. #define CWM_FAV_CHANGE (WM_USER + 20)
  2830. #define CWM_SHOWDRAGIMAGE (WM_USER + 21)
  2831. #define CWM_SHOWFOLDEROPT (WM_USER + 22)
  2832. #define CWMW_FOLDEROPTIONS 0 // wParam for CWM_SHOWFOLDEROPT
  2833. #define CWMW_TASKBAROPTIONS 1 // wParam for CWM_SHOWFOLDEROPT
  2834. #define CWM_FSNOTIFYSUSPENDRESUME (WM_USER + 23)
  2835. #define CWM_CREATELOCALSERVER (WM_USER + 24)
  2836. #define CWM_GETSCNWINDOW (WM_USER + 25)
  2837. #define CWM_TASKBARWAKEUP (WM_USER + 26) // Used to restore tray thread to normal priority in extremely stressed machines
  2838. #define CWM_STARTNETCRAWLER (WM_USER + 27)
  2839. #define CWM_RESERVEDFORCOMDLG_FIRST (WM_USER + 100)
  2840. #define CWM_RESERVEDFORCOMDLG_LAST (WM_USER + 199)
  2841. #define CWM_RESERVEDFORWEBBROWSER_FIRST (WM_USER + 200)
  2842. #define CWM_RESERVEDFORWEBBROWSER_LAST (WM_USER + 299)
  2843. ;end_internal
  2844. //==========================================================================
  2845. // IInputObjectSite/IInputObject interfaces
  2846. //
  2847. // These interfaces allow us (or ISVs) to install/update external Internet
  2848. // Toolbar for IE and the shell. The frame will simply get the CLSID from
  2849. // registry (to be defined) and CoCreateInstance it.
  2850. //
  2851. //==========================================================================
  2852. //-------------------------------------------------------------------------
  2853. //
  2854. // IInputObjectSite interface
  2855. //
  2856. // A site implements this interface so the object can communicate
  2857. // focus change to it.
  2858. //
  2859. // [Member functions]
  2860. //
  2861. // IInputObjectSite::OnFocusChangeIS(punkObj, fSetFocus)
  2862. // Object (punkObj) is getting or losing the focus.
  2863. //
  2864. //-------------------------------------------------------------------------
  2865. #undef INTERFACE
  2866. #define INTERFACE IInputObjectSite
  2867. DECLARE_INTERFACE_(IInputObjectSite, IUnknown)
  2868. {
  2869. // *** IUnknown methods ***
  2870. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2871. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2872. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2873. // *** IInputObjectSite specific methods ***
  2874. STDMETHOD(OnFocusChangeIS)(THIS_ IUnknown* punkObj, BOOL fSetFocus) PURE;
  2875. };
  2876. //-------------------------------------------------------------------------
  2877. //
  2878. // IInputObject interface
  2879. //
  2880. // An object implements this interface so the site can communicate
  2881. // activation and accelerator events to it.
  2882. //
  2883. // [Member functions]
  2884. //
  2885. // IInputObject::UIActivateIO(fActivate, lpMsg)
  2886. // Activates or deactivates the object. lpMsg may be NULL. Returns
  2887. // S_OK if the activation succeeded.
  2888. //
  2889. // IInputObject::HasFocusIO()
  2890. // Returns S_OK if the object has the focus, S_FALSE if not.
  2891. //
  2892. // IInputObject::TranslateAcceleratorIO(lpMsg)
  2893. // Allow the object to process the message. Returns S_OK if the
  2894. // message was processed (eaten).
  2895. //
  2896. //-------------------------------------------------------------------------
  2897. #undef INTERFACE
  2898. #define INTERFACE IInputObject
  2899. DECLARE_INTERFACE_(IInputObject, IUnknown)
  2900. {
  2901. // *** IUnknown methods ***
  2902. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2903. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2904. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2905. // *** IInputObject specific methods ***
  2906. STDMETHOD(UIActivateIO)(THIS_ BOOL fActivate, LPMSG lpMsg) PURE;
  2907. STDMETHOD(HasFocusIO)(THIS) PURE;
  2908. STDMETHOD(TranslateAcceleratorIO)(THIS_ LPMSG lpMsg) PURE;
  2909. };
  2910. //==========================================================================
  2911. // IDockingWindowSite/IDockingWindow/IDockingWindowFrame interfaces
  2912. // IInputObjectSite/IInputObject interfaces
  2913. //
  2914. // These interfaces allow us (or ISVs) to install/update external Internet
  2915. // Toolbar for IE and the shell. The frame will simply get the CLSID from
  2916. // registry (to be defined) and CoCreateInstance it.
  2917. //
  2918. //==========================================================================
  2919. //-------------------------------------------------------------------------
  2920. //
  2921. // IDockingWindowSite interface
  2922. //
  2923. // A site implements this interface so the object can negotiate for
  2924. // and inquire about real estate on the site.
  2925. //
  2926. // [Member functions]
  2927. //
  2928. // IDockingWindowSite::GetBorderDW(punkObj, prcBorder)
  2929. // Site returns the bounding rectangle of the given source object
  2930. // (punkObj).
  2931. //
  2932. // IDockingWindowSite::RequestBorderSpaceDW(punkObj, pbw)
  2933. // Object requests that the site makes room for it, as specified in
  2934. // *pbw.
  2935. //
  2936. // IDockingWindowSite::SetBorderSpaceDW(punkObj, pbw)
  2937. // Object requests that the site set the border spacing to the size
  2938. // specified in *pbw.
  2939. //
  2940. //-------------------------------------------------------------------------
  2941. #undef INTERFACE
  2942. #define INTERFACE IDockingWindowSite
  2943. DECLARE_INTERFACE_(IDockingWindowSite, IOleWindow)
  2944. {
  2945. // *** IUnknown methods ***
  2946. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2947. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2948. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2949. // *** IOleWindow methods ***
  2950. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  2951. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  2952. // *** IDockingWindowSite methods ***
  2953. STDMETHOD(GetBorderDW) (THIS_ IUnknown* punkObj, LPRECT prcBorder) PURE;
  2954. STDMETHOD(RequestBorderSpaceDW) (THIS_ IUnknown* punkObj, LPCBORDERWIDTHS pbw) PURE;
  2955. STDMETHOD(SetBorderSpaceDW) (THIS_ IUnknown* punkObj, LPCBORDERWIDTHS pbw) PURE;
  2956. };
  2957. //-------------------------------------------------------------------------
  2958. //
  2959. // IDockingWindowFrame interface
  2960. //
  2961. // ;BUGBUG (scotth): fill this in ;Internal
  2962. //
  2963. // [Member functions]
  2964. //
  2965. // IDockingWindowFrame::AddToolbar(punkSrc, pwszItem, dwReserved)
  2966. //
  2967. // IDockingWindowFrame::RemoveToolbar(punkSrc, dwRemoveFlags)
  2968. //
  2969. // IDockingWindowFrame::FindToolbar(pwszItem, riid, ppv)
  2970. //
  2971. //-------------------------------------------------------------------------
  2972. // flags for RemoveToolbar
  2973. #define DWFRF_NORMAL 0x0000
  2974. #define DWFRF_DELETECONFIGDATA 0x0001
  2975. ;begin_internal
  2976. #define STFRF_NORMAL DWFRF_NORMAL
  2977. #define STFRF_DELETECONFIGDATA DWFRF_DELETECONFIGDATA
  2978. ;end_internal
  2979. // flags for AddToolbar
  2980. #define DWFAF_HIDDEN 0x0001 // add hidden
  2981. #undef INTERFACE
  2982. #define INTERFACE IDockingWindowFrame
  2983. DECLARE_INTERFACE_(IDockingWindowFrame, IOleWindow)
  2984. {
  2985. // *** IUnknown methods ***
  2986. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2987. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2988. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2989. // *** IOleWindow methods ***
  2990. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  2991. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  2992. // *** IDockingWindowFrame methods ***
  2993. STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
  2994. STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
  2995. STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, void **ppv) PURE;
  2996. };
  2997. ;begin_internal
  2998. #undef INTERFACE
  2999. #define INTERFACE IMultiMonitorDockingSite
  3000. DECLARE_INTERFACE_(IMultiMonitorDockingSite, IUnknown)
  3001. {
  3002. // *** IUnknown methods ***
  3003. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3004. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3005. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3006. // *** IMultiMonitorDockingSite methods ***
  3007. STDMETHOD(GetMonitor) (THIS_ IUnknown* punkSrc, HMONITOR * phMon) PURE;
  3008. STDMETHOD(RequestMonitor) (THIS_ IUnknown* punkSrc, HMONITOR * phMon) PURE;
  3009. STDMETHOD(SetMonitor) (THIS_ IUnknown* punkSrc, HMONITOR hMonNew, HMONITOR *phMonOld) PURE;
  3010. };
  3011. ;end_internal
  3012. #if (_WIN32_IE >= 0x0400)
  3013. //-------------------------------------------------------------------------
  3014. //
  3015. // IRunnableTask interface
  3016. //
  3017. // This is a free threaded interface used for putting items on a background
  3018. // scheduler for execution within the view. It allows a scheduler to start and
  3019. // stop tasks on as many worker threads as it deems necessary.
  3020. //
  3021. // Run(), Kill() and Suspend() may be called from different threads.
  3022. //
  3023. // [Member functions]
  3024. //
  3025. // IRunnableTask::Run(void)
  3026. // Initiate the task to run. This should return E_PENDING if the task
  3027. // has been suspended.
  3028. //
  3029. // IRunnableTask::Kill(void)
  3030. //
  3031. // IRunnableTask::Suspend(void)
  3032. //
  3033. // IRunnableTask::Resume(void)
  3034. //
  3035. // IRunnableTask::IsRunning(void)
  3036. //
  3037. //-------------------------------------------------------------------------
  3038. // Convenient state values
  3039. #define IRTIR_TASK_NOT_RUNNING 0
  3040. #define IRTIR_TASK_RUNNING 1
  3041. #define IRTIR_TASK_SUSPENDED 2
  3042. #define IRTIR_TASK_PENDING 3
  3043. #define IRTIR_TASK_FINISHED 4
  3044. #undef INTERFACE
  3045. #define INTERFACE IRunnableTask
  3046. DECLARE_INTERFACE_( IRunnableTask, IUnknown )
  3047. {
  3048. // *** IUnknown methods ***
  3049. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3050. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  3051. STDMETHOD_(ULONG, Release)(THIS) PURE;
  3052. // *** IRunnableTask methods ***
  3053. STDMETHOD (Run)(THIS) PURE;
  3054. STDMETHOD (Kill)(THIS_ BOOL fWait ) PURE;
  3055. STDMETHOD (Suspend)(THIS) PURE;
  3056. STDMETHOD (Resume)(THIS) PURE;
  3057. STDMETHOD_(ULONG, IsRunning)(THIS) PURE;
  3058. };
  3059. typedef IRunnableTask * LPRUNNABLETASK;
  3060. #endif
  3061. #if (_WIN32_IE >= 0x0400)
  3062. #define TASKOWNERID GUID
  3063. #define REFTASKOWNERID REFGUID
  3064. // ---IShellTaskScheduler
  3065. // An interface for interacting with and controlling a task scheduler. This
  3066. // interface does not need to be free-threaded unless the items in the queue
  3067. // interact with the scheduler as well as the main execution thread on which the
  3068. // task scheduler was created.
  3069. // IShellTaskScheduler::AddTask()
  3070. // Adds Tasks to the scheduler's background queue. The TASKOWNERID allow particular types
  3071. // of tasks to be grouped so that they can be counted or removed. The lParam allows the task
  3072. // to be associated with a particular item (for example an item in a listview).
  3073. // IShellTaskScheduler::RemoveTasks()
  3074. // Removes tasks from the scheduler's queue. These can be sepcified in terms of their TASKOWNERID
  3075. // or their LPARAM, or both, or neither (TOID_NULL && ITSAT_DEFAULT_LPARAM results in all tasks being
  3076. // removed). If a task that matches is currently running and ITaskScheduler::Status() has been
  3077. // passeed ITSSFLAG_KILL_ON_DESTROY then the scheduler will attempt to kill the current task. The
  3078. // fWaitIfRunning parameter is then passed to IRunnableTask::Kill().
  3079. // IShellTaskScheduler::CountTasks()
  3080. // Counts the tasks in the queue depending upon the TASKOWNERID and the LPARAM passed. (TOID_NULL and
  3081. // ITSAT_DEFAULT_LPARAM will count all tasks in the queue)
  3082. // IShellTaskScheduler::Status()
  3083. // This sets the ReleaseStatus for the current task and the background thread timeout. When
  3084. // ITaskScheduler::RemoveTasks() is called and there is a task currently running that matches
  3085. // ITSSFLAG_COMPLETE_ON_DESTROY will cause TRUE to be passed to the task's IRunnableTask::Kill().
  3086. // The dwThreadTimeout parameter if not set to the default will cause the background thread to
  3087. // die if no new tasks have been added to the queue in the timeout period. The Thread will be
  3088. // recreated when the next new task is added.
  3089. ////////////////////////
  3090. // Status() flags,
  3091. // wait for the current task to complete before deleting the scheduler
  3092. #define ITSSFLAG_COMPLETE_ON_DESTROY 0x0000
  3093. // kill the current task (if there is one) when the task scheduler is deleted
  3094. #define ITSSFLAG_KILL_ON_DESTROY 0x0001
  3095. #define ITSSFLAG_SUPPORTS_TERMINATE 0x0002
  3096. #define ITSSFLAG_FLAGS_MASK 0x0003
  3097. // set the timeout for killing the thread when the object is terminated.
  3098. // this timeout can be used to stop the object from blocking the system
  3099. // indefinitely.
  3100. #define ITSSFLAG_THREAD_TERMINATE_TIMEOUT 0x0010
  3101. // set the timeout for threads that are idle in the thread pool
  3102. #define ITSSFLAG_THREAD_POOL_TIMEOUT 0x0020
  3103. // The default timeout passed to release Status to determine how long the thread
  3104. // can be asleep before the thread is expired
  3105. #define ITSS_THREAD_DESTROY_DEFAULT_TIMEOUT (60*1000)
  3106. // default, we won't kill it...
  3107. #define ITSS_THREAD_TERMINATE_TIMEOUT (INFINITE)
  3108. // there is no change to the thread timeout
  3109. #define ITSS_THREAD_TIMEOUT_NO_CHANGE (INFINITE - 1)
  3110. // the LPARAM allows task to be associated with items thus all tasks owned by a
  3111. // particular item can be accessed by passing a non default value for this parameter
  3112. #define ITSAT_DEFAULT_LPARAM 0xffffffff
  3113. // Task priorities
  3114. // ---------------
  3115. // This depends on the cooperation of tasks currently under execution. New tasks will
  3116. // be inserted in the queue in priority order. If a task of a low priority is currently
  3117. // under execution when a higher priority task is added, the scheduler will attempt
  3118. // to suspend the task currently under execution. It will be resumed when the other tasks
  3119. // have been completed.
  3120. #define ITSAT_DEFAULT_PRIORITY 0x10000000
  3121. #define ITSAT_MAX_PRIORITY 0x7fffffff
  3122. #define ITSAT_MIN_PRIORITY 0x00000000
  3123. #define TOID_NULL CLSID_NULL
  3124. #undef INTERFACE
  3125. #define INTERFACE IShellTaskScheduler
  3126. DECLARE_INTERFACE_( IShellTaskScheduler, IUnknown )
  3127. {
  3128. // *** IUnknown methods ***
  3129. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3130. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  3131. STDMETHOD_(ULONG, Release)(THIS) PURE;
  3132. // *** IShellTaskScheduler methods ***
  3133. STDMETHOD (AddTask)(THIS_ IRunnableTask * pTask,
  3134. REFTASKOWNERID rtoid,
  3135. DWORD_PTR lParam,
  3136. DWORD dwPriority ) PURE;
  3137. STDMETHOD (RemoveTasks)(THIS_ REFTASKOWNERID rtoid,
  3138. DWORD_PTR lParam,
  3139. BOOL fWaitIfRunning ) PURE;
  3140. STDMETHOD_(UINT, CountTasks)(THIS_ REFTASKOWNERID rtoid) PURE;
  3141. STDMETHOD (Status)(THIS_ DWORD dwReleaseStatus, DWORD dwThreadTimeout ) PURE;
  3142. };
  3143. typedef IShellTaskScheduler * LPSHELLTASKSCHEDULER;
  3144. #if (_WIN32_IE >= 0x0501)
  3145. #define ITSSFLAG_TASK_PLACEINFRONT 0x00000001
  3146. #define ITSSFLAG_TASK_PLACEINBACK 0x00000002
  3147. #undef INTERFACE
  3148. #define INTERFACE IShellTaskScheduler2
  3149. DECLARE_INTERFACE_( IShellTaskScheduler2, IShellTaskScheduler )
  3150. {
  3151. // *** IUnknown methods ***
  3152. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3153. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  3154. STDMETHOD_(ULONG, Release)(THIS) PURE;
  3155. // *** IShellTaskScheduler methods ***
  3156. STDMETHOD (AddTask)(THIS_ IRunnableTask * pTask,
  3157. REFTASKOWNERID rtoid,
  3158. DWORD_PTR lParam,
  3159. DWORD dwPriority ) PURE;
  3160. STDMETHOD (RemoveTasks)(THIS_ REFTASKOWNERID rtoid,
  3161. DWORD_PTR lParam,
  3162. BOOL fWaitIfRunning ) PURE;
  3163. STDMETHOD_(UINT, CountTasks)(THIS_ REFTASKOWNERID rtoid) PURE;
  3164. STDMETHOD (Status)(THIS_ DWORD dwReleaseStatus, DWORD dwThreadTimeout ) PURE;
  3165. // *** IShellTaskScheduler2 methods ***
  3166. STDMETHOD (AddTask2)(THIS_ IRunnableTask * pTask,
  3167. REFTASKOWNERID rtoid,
  3168. DWORD_PTR lParam,
  3169. DWORD dwPriority,
  3170. DWORD grfFlags ) PURE;
  3171. STDMETHOD (MoveTask)(THIS_ REFTASKOWNERID rtoid,
  3172. DWORD_PTR lParam,
  3173. DWORD dwPriority,
  3174. DWORD grfFlags ) PURE;
  3175. };
  3176. #endif // (_WIN32_IE >= 0x0501)
  3177. #endif // (_WIN32_IE >= 0x0400)
  3178. #if (_WIN32_IE >= 0x0400)
  3179. /* ***************** IThumbnailCapture
  3180. * CaptureThumbnail : takes an IHTMLDocument2 and returns a thumbnail of specified
  3181. * size as an hbitmap
  3182. */
  3183. #undef INTERFACE
  3184. #define INTERFACE IThumbnailCapture
  3185. DECLARE_INTERFACE_ ( IThumbnailCapture, IUnknown )
  3186. {
  3187. // *** IThumbnailCapture methods ***
  3188. STDMETHOD (CaptureThumbnail) ( THIS_ const SIZE * pMaxSize,
  3189. IUnknown * pHTMLDoc2,
  3190. HBITMAP * phbmThumbnail ) PURE;
  3191. };
  3192. typedef IThumbnailCapture * LPTHUMBNAILCAPTURE;
  3193. #endif
  3194. ;begin_internal
  3195. #if (_WIN32_IE >= 0x0400)
  3196. // Interface used to scale and sharpen images...
  3197. // right now, always pass the palette from SHCreateShellPalette on a 256 colour machine...
  3198. #undef INTERFACE
  3199. #define INTERFACE IScaleAndSharpenImage2
  3200. DECLARE_INTERFACE_ (IScaleAndSharpenImage2, IUnknown )
  3201. {
  3202. // *** IUnknown methods ***
  3203. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3204. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3205. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3206. // *** IScaleAndSharpenImage methods ***
  3207. STDMETHOD( ScaleSharpen2 ) ( THIS_ BITMAPINFO * pbi,
  3208. void * pBits,
  3209. HBITMAP * phBmpThumbnail,
  3210. const SIZE * prgSize,
  3211. DWORD dwRecClrDepth,
  3212. HPALETTE hpal,
  3213. UINT uiSharpPct,
  3214. BOOL fOrigSize) PURE;
  3215. };
  3216. // IImageCache
  3217. // Interface for controlling and accessing an imagecache of bitmaps for icons..
  3218. // flags for the dwMask member of IMAGECACHEINFO
  3219. #define ICIFLAG_LARGE 0x0001
  3220. #define ICIFLAG_SMALL 0x0002
  3221. #define ICIFLAG_BITMAP 0x0004
  3222. #define ICIFLAG_ICON 0x0008
  3223. #define ICIFLAG_INDEX 0x0010
  3224. #define ICIFLAG_NAME 0x0020
  3225. #define ICIFLAG_FLAGS 0x0040
  3226. #define ICIFLAG_NOUSAGE 0x0080
  3227. #define ICIFLAG_DATESTAMP 0x0100
  3228. #define ICIFLAG_MIRROR 0x2000
  3229. #if (_WIN32_IE >= 0x0501)
  3230. #define ICIFLAG_SYSTEM 0x4000
  3231. #endif
  3232. typedef struct _tagImageCacheInfo
  3233. {
  3234. DWORD cbSize;
  3235. DWORD dwMask;
  3236. union
  3237. {
  3238. HBITMAP hBitmapLarge;
  3239. HICON hIconLarge;
  3240. };
  3241. HBITMAP hMaskLarge;
  3242. union
  3243. {
  3244. HBITMAP hBitmapSmall;
  3245. HICON hIconSmall;
  3246. };
  3247. HBITMAP hMaskSmall;
  3248. LPCWSTR pszName;
  3249. int iIndex;
  3250. DWORD dwFlags;
  3251. #if (_WIN32_IE >= 0x0500)
  3252. FILETIME ftDateStamp;
  3253. #endif
  3254. } IMAGECACHEINFO;
  3255. typedef IMAGECACHEINFO * LPIMAGECACHEINFO;
  3256. typedef const IMAGECACHEINFO * LPCIMAGECACHEINFO;
  3257. #define ICIIFLAG_LARGE 0x0001
  3258. #define ICIIFLAG_SMALL 0x0002
  3259. #if (_WIN32_IE >= 0x0501)
  3260. #define ICIIFLAG_SORTBYUSED 0x0004
  3261. #endif
  3262. typedef struct _tagImageCacheInitInfo
  3263. {
  3264. DWORD cbSize;
  3265. DWORD dwMask;
  3266. HIMAGELIST himlLarge;
  3267. HIMAGELIST himlSmall;
  3268. SIZEL rgSizeLarge;
  3269. SIZEL rgSizeSmall;
  3270. DWORD dwFlags;
  3271. int iStart;
  3272. int iGrow;
  3273. }IMAGECACHEINITINFO;
  3274. typedef IMAGECACHEINITINFO * LPIMAGECACHEINITINFO;
  3275. #undef INTERFACE
  3276. #define INTERFACE IImageCache
  3277. DECLARE_INTERFACE_ ( IImageCache, IUnknown )
  3278. {
  3279. // *** IUnknown methods ***
  3280. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3281. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3282. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3283. // *** IImageCache methods ***
  3284. STDMETHOD ( AddImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  3285. STDMETHOD ( FindImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  3286. STDMETHOD ( FreeImage ) ( THIS_ UINT iImageIndex ) PURE;
  3287. STDMETHOD ( Flush )( THIS_ BOOL fRelease ) PURE;
  3288. STDMETHOD ( ChangeImageInfo ) ( THIS_ UINT IImageIndex, LPCIMAGECACHEINFO pInfo ) PURE;
  3289. STDMETHOD ( GetCacheSize ) ( THIS_ UINT * puSize ) PURE;
  3290. STDMETHOD ( GetUsage ) ( THIS_ UINT uIndex, UINT * puUsage ) PURE;
  3291. STDMETHOD( GetImageList ) ( THIS_ LPIMAGECACHEINITINFO pInfo ) PURE;
  3292. };
  3293. typedef IImageCache * LPIMAGECACHE;
  3294. #if (_WIN32_IE >= 0x0500)
  3295. // IImageCache 2
  3296. #undef INTERFACE
  3297. #define INTERFACE IImageCache2
  3298. DECLARE_INTERFACE_ ( IImageCache2, IImageCache )
  3299. {
  3300. // *** IUnknown methods ***
  3301. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3302. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3303. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3304. // *** IImageCache methods ***
  3305. STDMETHOD ( AddImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  3306. STDMETHOD ( FindImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  3307. STDMETHOD ( FreeImage ) ( THIS_ UINT iImageIndex ) PURE;
  3308. STDMETHOD ( Flush )( THIS_ BOOL fRelease ) PURE;
  3309. STDMETHOD ( ChangeImageInfo ) ( THIS_ UINT IImageIndex, LPCIMAGECACHEINFO pInfo ) PURE;
  3310. STDMETHOD ( GetCacheSize ) ( THIS_ UINT * puSize ) PURE;
  3311. STDMETHOD ( GetUsage ) ( THIS_ UINT uIndex, UINT * puUsage ) PURE;
  3312. STDMETHOD( GetImageList ) ( THIS_ LPIMAGECACHEINITINFO pInfo ) PURE;
  3313. // IImageCache2 methods
  3314. STDMETHOD ( DeleteImage ) ( THIS_ UINT iImageIndex ) PURE;
  3315. STDMETHOD ( GetImageInfo ) (THIS_ UINT iImageIndex, LPIMAGECACHEINFO pInfo ) PURE;
  3316. };
  3317. #endif
  3318. #if (_WIN32_IE >= 0x0501)
  3319. // These are values returned from IImageCache::GetUsage which correspond
  3320. // to the state of the cache entry
  3321. #define ICD_USAGE_NOUSAGE (UINT) -1
  3322. #define ICD_USAGE_DELETED (UINT) -2
  3323. #define ICD_USAGE_SYSTEM (UINT) -3
  3324. // IImageCache 3
  3325. #undef INTERFACE
  3326. #define INTERFACE IImageCache3
  3327. DECLARE_INTERFACE_ ( IImageCache3, IImageCache2 )
  3328. {
  3329. // *** IUnknown methods ***
  3330. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3331. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3332. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3333. // *** IImageCache methods ***
  3334. STDMETHOD ( AddImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  3335. STDMETHOD ( FindImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  3336. STDMETHOD ( FreeImage ) ( THIS_ UINT iImageIndex ) PURE;
  3337. STDMETHOD ( Flush )( THIS_ BOOL fRelease ) PURE;
  3338. STDMETHOD ( ChangeImageInfo ) ( THIS_ UINT IImageIndex, LPCIMAGECACHEINFO pInfo ) PURE;
  3339. STDMETHOD ( GetCacheSize ) ( THIS_ UINT * puSize ) PURE;
  3340. STDMETHOD ( GetUsage ) ( THIS_ UINT uIndex, UINT * puUsage ) PURE;
  3341. STDMETHOD ( GetImageList ) ( THIS_ LPIMAGECACHEINITINFO pInfo ) PURE;
  3342. // *** IImageCache2 methods ***
  3343. STDMETHOD ( DeleteImage ) ( THIS_ UINT iImageIndex ) PURE;
  3344. STDMETHOD ( GetImageInfo ) (THIS_ UINT iImageIndex, LPIMAGECACHEINFO pInfo ) PURE;
  3345. // *** IImageCache3 methods ***
  3346. STDMETHOD ( GetImageIndexFromCacheIndex )( UINT iCacheIndex, UINT * puImageIndex ) PURE;
  3347. };
  3348. #endif
  3349. ;end_internal
  3350. #if ( _WIN32_IE >= 0x0500 )
  3351. ///////////////////////////////////////////////////////////////////////
  3352. // interface for
  3353. #include <pshpack8.h>
  3354. typedef struct _EnumImageStoreDATAtag
  3355. {
  3356. WCHAR szPath[MAX_PATH];
  3357. FILETIME ftTimeStamp;
  3358. } ENUMSHELLIMAGESTOREDATA, * PENUMSHELLIMAGESTOREDATA;
  3359. #include <poppack.h> /* Return to byte packing */
  3360. #undef INTERFACE
  3361. #define INTERFACE IEnumShellImageStore
  3362. DECLARE_INTERFACE_( IEnumShellImageStore, IUnknown )
  3363. {
  3364. STDMETHOD ( QueryInterface ) ( THIS_ REFIID riid, void **ppv ) PURE;
  3365. STDMETHOD_( ULONG, AddRef ) ( THIS ) PURE;
  3366. STDMETHOD_( ULONG, Release ) ( THIS ) PURE;
  3367. STDMETHOD ( Reset ) ( THIS ) PURE;
  3368. STDMETHOD ( Next ) ( THIS_ ULONG celt, PENUMSHELLIMAGESTOREDATA * prgElt, ULONG * pceltFetched ) PURE;
  3369. STDMETHOD ( Skip ) ( THIS_ ULONG celt ) PURE;
  3370. STDMETHOD ( Clone ) ( THIS_ IEnumShellImageStore ** ppEnum ) PURE;
  3371. };
  3372. typedef IEnumShellImageStore * LPENUMSHELLIMAGESTORE;
  3373. // flags used to determine the capabilities of the storage for the images
  3374. #define SHIMSTCAPFLAG_LOCKABLE 0x0001 // does the store require/support locking
  3375. #define SHIMSTCAPFLAG_PURGEABLE 0x0002 // does the store require dead items purging externally ?
  3376. #undef INTERFACE
  3377. #define INTERFACE IShellImageStore
  3378. // this interface is used to manipulate the Image cache. It can potentially be used
  3379. // in a free threaded manner in conjunction with the Lock parameter to Open and close
  3380. DECLARE_INTERFACE_( IShellImageStore, IUnknown )
  3381. {
  3382. STDMETHOD ( QueryInterface )( THIS_ REFIID riid, void **ppv ) PURE;
  3383. STDMETHOD_( ULONG, AddRef ) ( THIS ) PURE;
  3384. STDMETHOD_( ULONG, Release ) ( THIS ) PURE;
  3385. // if the lock parameter is used, then all other calls into
  3386. // open and/or create will block until the lock is released.
  3387. STDMETHOD ( Open ) ( THIS_ DWORD dwMode, DWORD * pdwLock ) PURE;
  3388. STDMETHOD ( Create ) ( THIS_ DWORD dwMode, DWORD * pdwLock ) PURE;
  3389. // if the lock is passed to either of these two methods, it releases the lock
  3390. // once the operation is complete.
  3391. STDMETHOD ( ReleaseLock ) ( THIS_ DWORD const * pdwLock ) PURE;
  3392. STDMETHOD ( Close ) ( THIS_ DWORD const * pdwLock ) PURE;
  3393. STDMETHOD ( Commit ) ( THIS_ DWORD const * pdwLock ) PURE;
  3394. STDMETHOD ( IsLocked ) ( THIS ) PURE;
  3395. STDMETHOD ( GetMode ) ( THIS_ DWORD * pdwMode ) PURE;
  3396. STDMETHOD ( GetCapabilities ) ( THIS_ DWORD * pdwCapMask ) PURE;
  3397. STDMETHOD ( AddEntry ) ( THIS_ LPCWSTR pszName, const FILETIME * pftTimeStamp, DWORD dwMode, HBITMAP hImage ) PURE;
  3398. STDMETHOD ( GetEntry ) ( THIS_ LPCWSTR pszName, DWORD dwMode, HBITMAP * phImage ) PURE;
  3399. STDMETHOD ( DeleteEntry ) ( THIS_ LPCWSTR pszName ) PURE;
  3400. STDMETHOD ( IsEntryInStore ) ( THIS_ LPCWSTR pszName, FILETIME * pftTimeStamp ) PURE;
  3401. STDMETHOD ( Enum ) ( THIS_ LPENUMSHELLIMAGESTORE * ppEnum ) PURE;
  3402. };
  3403. typedef IShellImageStore * LPSHELLIMAGESTORE;
  3404. #endif
  3405. ;begin_internal
  3406. //
  3407. // Interface for interacting with the IE splash screen
  3408. //
  3409. #undef INTERFACE
  3410. #define INTERFACE ISplashScreen
  3411. DECLARE_INTERFACE_( ISplashScreen, IUnknown )
  3412. {
  3413. // *** IUnknown methods ***
  3414. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3415. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3416. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3417. // *** ISplashScreen methods ***
  3418. STDMETHOD ( Show ) ( THIS_ HINSTANCE hinst, UINT idResHi, UINT idResLow, HWND * phwnd ) PURE;
  3419. STDMETHOD ( Dismiss ) (THIS) PURE;
  3420. };
  3421. typedef ISplashScreen * LPSPLASHSCREEN;
  3422. ;begin_internal
  3423. //
  3424. // Interface for Multiple Monitor Configurations
  3425. //
  3426. #define MD_PRIMARY 0x00000001
  3427. #define MD_ATTACHED 0x00000002
  3428. #include <pshpack8.h>
  3429. typedef struct _MonitorData
  3430. {
  3431. DWORD dwSize;
  3432. DWORD dwFlags;
  3433. DWORD dwStatus;
  3434. RECT rcPos;
  3435. } MonitorData, * LPMONITORDATA;
  3436. #include <poppack.h> /* Return to byte packing */
  3437. #undef INTERFACE
  3438. #define INTERFACE IMultiMonConfig
  3439. DECLARE_INTERFACE_( IMultiMonConfig, IUnknown )
  3440. {
  3441. // *** IUnknown methods ***
  3442. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3443. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3444. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3445. // *** IMultiMonConfig methods ***
  3446. STDMETHOD ( Initialize ) ( THIS_ HWND hwndHost, WNDPROC WndProc, DWORD dwReserved) PURE;
  3447. STDMETHOD ( GetNumberOfMonitors ) (THIS_ int * pCMon, DWORD dwReserved) PURE;
  3448. STDMETHOD ( GetMonitorData) (THIS_ int iMonitor, MonitorData * pmd, DWORD dwReserved) PURE;
  3449. STDMETHOD ( Paint) (THIS_ int iMonitor, DWORD dwReserved) PURE;
  3450. };
  3451. typedef IMultiMonConfig * LPMULTIMONCONFIG;
  3452. ;end_internal
  3453. #endif // _WIN32_IE > 0x0400
  3454. //// IRestrict
  3455. // For the pdwRestrictionResult out parameter in IRestrict::IsRestricted() for
  3456. // all pguidIDs.
  3457. typedef enum
  3458. {
  3459. RR_ALLOW = 1,
  3460. RR_DISALLOW,
  3461. RR_NOCHANGE,
  3462. } RESTRICTION_RESULT;
  3463. // IRestrict::IsRestricted() dwRestrictAction parameter values for
  3464. // the RID_RDeskBars pguidID.
  3465. typedef enum
  3466. {
  3467. RA_DRAG = 1,
  3468. RA_DROP,
  3469. RA_ADD,
  3470. RA_CLOSE,
  3471. RA_MOVE,
  3472. } RESTRICT_ACTIONS;
  3473. #undef INTERFACE
  3474. #define INTERFACE IRestrict
  3475. DECLARE_INTERFACE_(IRestrict, IUnknown)
  3476. {
  3477. // *** IUnknown methods ***
  3478. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3479. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3480. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3481. // *** IRestrict Methods ***
  3482. STDMETHOD(IsRestricted) (THIS_ const GUID * pguidID, DWORD dwRestrictAction, VARIANT * pvarArgs, OUT DWORD * pdwRestrictionResult) PURE;
  3483. };
  3484. //// IAddressBand
  3485. #define OLECMD_REFRESH_TOPMOST 0x00000000
  3486. #define OLECMD_REFRESH_ENTIRELIST 0x00000001
  3487. #undef INTERFACE
  3488. #define INTERFACE IAddressBand
  3489. DECLARE_INTERFACE_(IAddressBand, IUnknown)
  3490. {
  3491. // *** IUnknown methods ***
  3492. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3493. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3494. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3495. // *** IAddressBand Methods ***
  3496. STDMETHOD(FileSysChange) (THIS_ DWORD dwEvent, LPCITEMIDLIST * ppidl1) PURE;
  3497. STDMETHOD(Refresh) (THIS_ VARIANT * pvarType) PURE;
  3498. };
  3499. #undef INTERFACE
  3500. #define INTERFACE IAddressEditBox
  3501. // Init Flags
  3502. #define AEB_INIT_DEFAULT 0x00000000
  3503. #define AEB_INIT_NOSHELL 0x00000001
  3504. #define AEB_INIT_NOWEB 0x00000002
  3505. #define AEB_INIT_NOFILE 0x00000004
  3506. #define AEB_INIT_AUTOEXEC 0x00000008 // Set if you want the item Navigated/ShellExeced when ENTER occurs.
  3507. #define AEB_INIT_SUBCLASS 0x00000010 // If set parent needs to pass HWND events thru IWinEventHandler::OnWinEvent()
  3508. #define AEB_INIT_NOASYNC 0x00000020 // Set if you don't want/support async navigation (from a modal dlg for instance)
  3509. // Parse Flags for IAddressEditBox::ParseNow()
  3510. #define SHURL_FLAGS_NONE 0x00000000
  3511. #define SHURL_FLAGS_NOUI 0x00000001 // Don't display any UI.
  3512. #define SHURL_FLAGS_NOSNS 0x00000002 // Ignore SHELL URLs. (FILE and Internet URLs still work)
  3513. #define SHURL_FLAGS_NOWEB 0x00000004 // Ignore WEB URLs. (Don't successfully parse if not found in shell name space)
  3514. #define SHURL_FLAGS_NOPATHSEARCH 0x00000008 // don't search on dos paths or app path
  3515. #define SHURL_FLAGS_AUTOCORRECT 0x00000010 // Try to autocorrect WEB URLs
  3516. // Exec Flags for IAddressEditBox::Execute()
  3517. #define SHURL_EXECFLAGS_NONE 0x00000000
  3518. #define SHURL_EXECFLAGS_SEPVDM 0x00000001 // If ShellExec(), set SEE_MASK_FLAG_SEPVDM fMask.
  3519. #define SHURL_EXECFLAGS_DONTFORCEIE 0x00000002 // If some browser other than IE is associated with HTML files, allow them to launch.
  3520. DECLARE_INTERFACE_(IAddressEditBox, IUnknown)
  3521. {
  3522. // *** IUnknown methods ***
  3523. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3524. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3525. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3526. // *** IAddressEditBox Methods ***
  3527. STDMETHOD(Init) (THIS_ HWND hwnd, HWND hwndEditBox, DWORD dwFlags, IUnknown * punkParent) PURE;
  3528. STDMETHOD(SetCurrentDir) (THIS_ LPCOLESTR pwzDir) PURE;
  3529. STDMETHOD(ParseNow) (THIS_ DWORD dwParseFlags) PURE;
  3530. STDMETHOD(Execute) (THIS_ DWORD dwExecFlags) PURE;
  3531. STDMETHOD(Save) (THIS_ DWORD dwReserved) PURE;
  3532. };
  3533. ;begin_both
  3534. #if (_WIN32_IE >= 0x0400)
  3535. ;end_both
  3536. ;end_internal
  3537. //// IShellFolderBand
  3538. // Field mask
  3539. #define ISFB_MASK_STATE 0x00000001 // TRUE if dwStateMask and dwState is valid
  3540. #define ISFB_MASK_BKCOLOR 0x00000002 // TRUE if crBkgnd field is valid
  3541. #define ISFB_MASK_VIEWMODE 0x00000004 // TRUE if wViewMode field is valid
  3542. #define ISFB_MASK_SHELLFOLDER 0x00000008
  3543. #define ISFB_MASK_IDLIST 0x00000010
  3544. #define ISFB_MASK_COLORS 0x00000020 // TRUE if crXXXX fields are valid (except bkgnd)
  3545. #define ISFB_MASK_ALL 0x0000003F // ;Internal
  3546. #define ISFB_MASK_INVALID (~(ISFB_MASK_ALL)) // ;Internal
  3547. #define ISFB_STATE_DEFAULT 0x00000000
  3548. #define ISFB_STATE_DEBOSSED 0x00000001
  3549. #define ISFB_STATE_ALLOWRENAME 0x00000002
  3550. #define ISFB_STATE_NOSHOWTEXT 0x00000004 // TRUE if _fNoShowText
  3551. //#define ISFB_STATE_NOTITLE 0x00000008 // obsolete! (use cbs::SetBandState) ;Internal
  3552. #define ISFB_STATE_CHANNELBAR 0x00000010 // TRUE if we want NavigateTarget support
  3553. #define ISFB_STATE_QLINKSMODE 0x00000020 // TRUE if we want to turn off drag & drop onto content items
  3554. #define ISFB_STATE_FULLOPEN 0x00000040 // TRUE if band should maximize when opened
  3555. #define ISFB_STATE_NONAMESORT 0x00000080 // TRUE if band should _not_ sort icons by name
  3556. #define ISFB_STATE_BTNMINSIZE 0x00000100 // TRUE if band should report min thickness of button
  3557. #define ISFB_STATE_ALL 0x000001FF // ;Internal
  3558. #define ISFBVIEWMODE_SMALLICONS 0x0001
  3559. #define ISFBVIEWMODE_LARGEICONS 0x0002
  3560. #define ISFBVIEWMODE_LOGOS 0x0003
  3561. #include <pshpack8.h>
  3562. typedef struct {
  3563. DWORD dwMask; // [in] ISFB_MASK mask of valid fields from crBkgnd on
  3564. DWORD dwStateMask; // [in] ISFB_STATE mask of dwState bits being set/queried
  3565. DWORD dwState; // [in/out] ISFB_STATE bits
  3566. COLORREF crBkgnd; // [in/out]
  3567. COLORREF crBtnLt; // [in/out]
  3568. COLORREF crBtnDk; // [in/out]
  3569. WORD wViewMode; // [in/out]
  3570. WORD wAlign; // not used (yet)
  3571. IShellFolder * psf; // [out]
  3572. LPITEMIDLIST pidl; // [out]
  3573. } BANDINFOSFB, *PBANDINFOSFB;
  3574. #include <poppack.h> /* Return to byte packing */
  3575. #undef INTERFACE
  3576. #define INTERFACE IShellFolderBand
  3577. DECLARE_INTERFACE_(IShellFolderBand, IUnknown)
  3578. {
  3579. // *** IUnknown methods ***
  3580. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3581. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3582. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3583. // *** IShellFolderBand Methods ***
  3584. STDMETHOD(InitializeSFB)(THIS_ IShellFolder *psf, LPCITEMIDLIST pidl) PURE;
  3585. STDMETHOD(SetBandInfoSFB)(THIS_ PBANDINFOSFB pbi) PURE;
  3586. STDMETHOD(GetBandInfoSFB)(THIS_ PBANDINFOSFB pbi) PURE;
  3587. };
  3588. // Command Target IDs
  3589. enum {
  3590. SFBID_PIDLCHANGED,
  3591. };
  3592. ;begin_internal
  3593. //-------------------------------------------------------------------------
  3594. //
  3595. // IWinEventHandler interface
  3596. //
  3597. // An object that wants to send messages to another object (typically
  3598. // a sub-object) QI's for the sub-object's IWinEventHandler interface.
  3599. // Once the object determines the hwnd is owned by the sub-object (via
  3600. // IsWindowOwner), the object calls OnWinEvent for send the message.
  3601. //
  3602. //
  3603. // [Member functions]
  3604. //
  3605. // IWinEventHandler::IsWindowOwner(hwnd)
  3606. // Returns S_OK if the hwnd is owned by the object, S_FALSE if not.
  3607. //
  3608. // IWinEventHandler::OnWinEvent(hwnd, dwMsg, wParam, lParam, plRet)
  3609. // Sends a message to the object. The Win32 return value (i.e., the
  3610. // value returned by DefWindowProc) is returned in *plRet. Return
  3611. // S_OK if the message is handled, otherwise S_FALSE.
  3612. //
  3613. //-------------------------------------------------------------------------
  3614. #undef INTERFACE
  3615. #define INTERFACE IWinEventHandler
  3616. DECLARE_INTERFACE_(IWinEventHandler, IUnknown)
  3617. {
  3618. // *** IUnknown methods ***
  3619. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3620. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3621. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3622. // *** IWinEventHandler Methods ***
  3623. STDMETHOD(OnWinEvent) (THIS_ HWND hwnd, UINT dwMsg, WPARAM wParam, LPARAM lParam, LRESULT* plres) PURE;
  3624. STDMETHOD(IsWindowOwner) (THIS_ HWND hwnd) PURE;
  3625. };
  3626. ;end_internal
  3627. //// IDeskBarClient
  3628. #undef INTERFACE
  3629. #define INTERFACE IDeskBarClient
  3630. DECLARE_INTERFACE_(IDeskBarClient, IOleWindow)
  3631. {
  3632. // *** IUnknown methods ***
  3633. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3634. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3635. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3636. // *** IOleWindow methods ***
  3637. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  3638. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  3639. // *** IDeskBarClient methods ***
  3640. STDMETHOD(SetDeskBarSite) (THIS_ IUnknown* punkSite) PURE;
  3641. STDMETHOD(SetModeDBC) (THIS_ DWORD dwMode) PURE;
  3642. STDMETHOD(UIActivateDBC) (THIS_ DWORD dwState) PURE;
  3643. STDMETHOD(GetSize) (THIS_ DWORD dwWhich, LPRECT prc) PURE;
  3644. };
  3645. #define DBC_GS_IDEAL 0 // get the ideal size
  3646. #define DBC_GS_SIZEDOWN 1 // clip the height of a rect to a multiple of the rebar's integral size
  3647. #define DBC_HIDE 0 // Band is hidden (being destroyed)
  3648. #define DBC_SHOW 1 // Band is visible
  3649. #define DBC_SHOWOBSCURE 2 // Band is completely obscured
  3650. enum {
  3651. DBCID_EMPTY = 0, // bandsite is empty
  3652. DBCID_ONDRAG = 1, // (down)DragMoveEnter/Leave vaIn:I4:eDrag
  3653. DBCID_CLSIDOFBAR = 2, // clsid of bar inside
  3654. DBCID_RESIZE = 3, // resize from keyboard
  3655. DBCID_GETBAR = 4, // returns vaOut:VT_UNKNOWN of hosting dockbar (IDeskBar)
  3656. };
  3657. ;begin_both
  3658. #endif // _WIN32_IE > 0x0400
  3659. ;end_both
  3660. ;begin_internal
  3661. //==========================================================================
  3662. // IExplorerToolbar interfaces
  3663. //
  3664. // This is an interface to the shell toolbar which allows shell views
  3665. // to add buttons and process.
  3666. // See http://ohserv/users/satona/toolbar_extension.htm for spec.
  3667. //
  3668. //==========================================================================
  3669. // Bitmap types
  3670. #define BITMAP_NORMAL 0x1
  3671. #define BITMAP_HOT 0x2
  3672. #define BITMAP_DISABLED 0x3
  3673. // Band Visibility Flags
  3674. #define VBF_TOOLS 0x00000001
  3675. #define VBF_ADDRESS 0x00000002
  3676. #define VBF_LINKS 0x00000004
  3677. #define VBF_BRAND 0x00000008
  3678. #define VBF_MENU 0x00000010
  3679. #define VBF_ONELINETEXT 0x00000020
  3680. #define VBF_TWOLINESTEXT 0x00000040
  3681. #define VBF_NOCUSTOMIZE 0x00000080
  3682. #define VBF_EXTERNALBANDS 0xFFFF0000
  3683. #define VBF_VALID (VBF_TOOLS | VBF_ADDRESS | VBF_LINKS | VBF_BRAND | VBF_MENU | VBF_EXTERNALBANDS)
  3684. #undef INTERFACE
  3685. #define INTERFACE IExplorerToolbar
  3686. typedef enum {
  3687. ETCMDID_GETBUTTONS = 0x0001,
  3688. ETCMDID_NEWCOMMANDTARGET = 0x0002, // sent to the previous command target when a new one is coming in
  3689. #if (_WIN32_IE >= 0x500)
  3690. ETCMDID_RELOADBUTTONS = 0x0003, // command target needs to call AddButtons again
  3691. #endif
  3692. } ENUM_ETCMDID;
  3693. DECLARE_INTERFACE_(IExplorerToolbar, IUnknown)
  3694. {
  3695. // *** IUnknown methods ***
  3696. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3697. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3698. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3699. // *** IExplorerToolbar methods ***
  3700. STDMETHOD(SetCommandTarget) (THIS_ IUnknown* punkCmdTarget, const GUID* pguidCmdGrp, DWORD dwFlags) PURE;
  3701. STDMETHOD(AddStdBrowserButtons) (THIS) PURE;
  3702. // Wrap of the TB_* messages the messages that are implmented
  3703. // are just the ones to add delete and modify the buttons, and not
  3704. // the ones to manipulate the toolbar.
  3705. STDMETHOD(AddButtons) (THIS_ const GUID * pguidButtonGroup, UINT nButtons, const TBBUTTON * lpButtons) PURE;
  3706. STDMETHOD(AddString) (THIS_ const GUID * pguidButtonGroup, HINSTANCE hInst, UINT_PTR uiResID, LRESULT * pOffset) PURE;
  3707. STDMETHOD(GetButton) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, LPTBBUTTON lpButton) PURE;
  3708. STDMETHOD(GetState) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, UINT * pfState) PURE;
  3709. STDMETHOD(SetState) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, UINT fState) PURE;
  3710. STDMETHOD(AddBitmap) (THIS_ const GUID * pguidButtonGroup, UINT uiBMPType, UINT uiCount, TBADDBITMAP * ptb,
  3711. LRESULT * pOffset, COLORREF rgbMask) PURE;
  3712. STDMETHOD(GetBitmapSize) (THIS_ UINT * uiID) PURE;
  3713. STDMETHOD(SendToolbarMsg) (THIS_ const GUID * pguidButtonGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * plRes) PURE;
  3714. STDMETHOD(SetImageList) (THIS_ const GUID* pguidCmdGroup, HIMAGELIST himlNormal, HIMAGELIST himlHot, HIMAGELIST himlDisabled) PURE;
  3715. STDMETHOD(ModifyButton) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, LPTBBUTTON lpButton) PURE;
  3716. };
  3717. //==========================================================================
  3718. // DefView supports a private service id for extended views.
  3719. // DefView's IOleCommandTarget supports the below command group and ids too.
  3720. //==========================================================================
  3721. // SID_DefView and CGID_DefView are defined in shlguid.w
  3722. //
  3723. #define DVCMDID_GETTHISDIRPATH 1 // pvaOut = path to this directory (if in filesystem)
  3724. #define DVCMDID_GETTHISDIRNAME 2 // pvaOut = friendly name of this directory
  3725. #define DVCMDID_GETTEMPLATEDIRNAME 3 // pvaOut = webview template (.htt) dir
  3726. ;end_internal
  3727. #if (_WIN32_IE >= 0x400)
  3728. //
  3729. // We need to make sure that WININET.H is included before this interface is
  3730. // used because the COMPONENT structure uses INTERNET_MAX_URL_LENGTH
  3731. //
  3732. #ifdef _WININET_
  3733. //
  3734. // Flags and structures used by IActiveDesktop
  3735. //
  3736. typedef struct _tagWALLPAPEROPT
  3737. {
  3738. DWORD dwSize; // size of this Structure.
  3739. DWORD dwStyle; // WPSTYLE_* mentioned above
  3740. }
  3741. WALLPAPEROPT;
  3742. typedef WALLPAPEROPT *LPWALLPAPEROPT;
  3743. typedef const WALLPAPEROPT *LPCWALLPAPEROPT;
  3744. typedef struct _tagCOMPONENTSOPT
  3745. {
  3746. DWORD dwSize; //Size of this structure
  3747. BOOL fEnableComponents; //Enable components?
  3748. BOOL fActiveDesktop; // Active desktop enabled ?
  3749. }
  3750. COMPONENTSOPT;
  3751. typedef COMPONENTSOPT *LPCOMPONENTSOPT;
  3752. typedef const COMPONENTSOPT *LPCCOMPONENTSOPT;
  3753. typedef struct _tagCOMPPOS
  3754. {
  3755. DWORD dwSize; //Size of this structure
  3756. int iLeft; //Left of top-left corner in screen co-ordinates.
  3757. int iTop; //Top of top-left corner in screen co-ordinates.
  3758. DWORD dwWidth; // Width in pixels.
  3759. DWORD dwHeight; // Height in pixels.
  3760. int izIndex; // Indicates the Z-order of the component.
  3761. BOOL fCanResize; // Is the component resizeable?
  3762. BOOL fCanResizeX; // Resizeable in X-direction?
  3763. BOOL fCanResizeY; // Resizeable in Y-direction?
  3764. int iPreferredLeftPercent; //Left of top-left corner as percent of screen width
  3765. int iPreferredTopPercent; //Top of top-left corner as percent of screen height
  3766. }
  3767. COMPPOS;
  3768. typedef COMPPOS *LPCOMPPOS;
  3769. typedef const COMPPOS *LPCCOMPPOS;
  3770. typedef struct _tagCOMPSTATEINFO
  3771. {
  3772. DWORD dwSize; // Size of this structure.
  3773. int iLeft; // Left of the top-left corner in screen co-ordinates.
  3774. int iTop; // Top of top-left corner in screen co-ordinates.
  3775. DWORD dwWidth; // Width in pixels.
  3776. DWORD dwHeight; // Height in pixels.
  3777. DWORD dwItemState; // State of the component (full-screen mode or split-screen or normal state.
  3778. }
  3779. COMPSTATEINFO;
  3780. typedef COMPSTATEINFO *LPCOMPSTATEINFO;
  3781. typedef const COMPSTATEINFO *LPCCOMPSTATEINFO;
  3782. #define COMPONENT_TOP (0x3fffffff) // izOrder value meaning component is at the top
  3783. // iCompType values
  3784. #define COMP_TYPE_HTMLDOC 0
  3785. #define COMP_TYPE_PICTURE 1
  3786. #define COMP_TYPE_WEBSITE 2
  3787. #define COMP_TYPE_CONTROL 3
  3788. #define COMP_TYPE_CFHTML 4
  3789. #define COMP_TYPE_MAX 4
  3790. // The following is the COMPONENT structure used in IE4.01, IE4.0 and Memphis. It is kept here for compatibility
  3791. // reasons.
  3792. typedef struct _tagIE4COMPONENT
  3793. {
  3794. DWORD dwSize; //Size of this structure
  3795. DWORD dwID; //Reserved: Set it always to zero.
  3796. int iComponentType; //One of COMP_TYPE_*
  3797. BOOL fChecked; // Is this component enabled?
  3798. BOOL fDirty; // Had the component been modified and not yet saved to disk?
  3799. BOOL fNoScroll; // Is the component scrollable?
  3800. COMPPOS cpPos; // Width, height etc.,
  3801. WCHAR wszFriendlyName[MAX_PATH]; // Friendly name of component.
  3802. WCHAR wszSource[INTERNET_MAX_URL_LENGTH]; //URL of the component.
  3803. WCHAR wszSubscribedURL[INTERNET_MAX_URL_LENGTH]; //Subscrined URL
  3804. }
  3805. IE4COMPONENT;
  3806. typedef IE4COMPONENT *LPIE4COMPONENT;
  3807. typedef const IE4COMPONENT *LPCIE4COMPONENT;
  3808. //
  3809. // The following is the new NT5 component structure. Note that the initial portion of this component exactly
  3810. // matches the IE4COMPONENT structure. All new fields are added at the bottom and the dwSize field is used to
  3811. // distinguish between IE4COMPONENT and the new COMPONENT structures.
  3812. //
  3813. typedef struct _tagCOMPONENT
  3814. {
  3815. DWORD dwSize; //Size of this structure
  3816. DWORD dwID; //Reserved: Set it always to zero.
  3817. int iComponentType; //One of COMP_TYPE_*
  3818. BOOL fChecked; // Is this component enabled?
  3819. BOOL fDirty; // Had the component been modified and not yet saved to disk?
  3820. BOOL fNoScroll; // Is the component scrollable?
  3821. COMPPOS cpPos; // Width, height etc.,
  3822. WCHAR wszFriendlyName[MAX_PATH]; // Friendly name of component.
  3823. WCHAR wszSource[INTERNET_MAX_URL_LENGTH]; //URL of the component.
  3824. WCHAR wszSubscribedURL[INTERNET_MAX_URL_LENGTH]; //Subscrined URL
  3825. //New fields are added below. Everything above here must exactly match the IE4COMPONENT Structure.
  3826. DWORD dwCurItemState; // Current state of the Component.
  3827. COMPSTATEINFO csiOriginal; // Original state of the component when it was first added.
  3828. COMPSTATEINFO csiRestored; // Restored state of the component.
  3829. }
  3830. COMPONENT;
  3831. typedef COMPONENT *LPCOMPONENT;
  3832. typedef const COMPONENT *LPCCOMPONENT;
  3833. // Defines for dwCurItemState
  3834. #define IS_NORMAL 0x00000001
  3835. #define IS_FULLSCREEN 0x00000002
  3836. #define IS_SPLIT 0x00000004
  3837. #define IS_VALIDSIZESTATEBITS (IS_NORMAL | IS_SPLIT | IS_FULLSCREEN) // The set of IS_* state bits which define the "size" of the component - these bits are mutually exclusive.
  3838. #define IS_VALIDSTATEBITS (IS_NORMAL | IS_SPLIT | IS_FULLSCREEN | 0x80000000 | 0x40000000) // All of the currently defined IS_* bits.
  3839. ;begin_internal
  3840. #define IS_ADJUSTLISTVIEW 0x80000000
  3841. #define IS_INTERNALDUMMYBIT 0x40000000
  3842. #define IS_VALIDINTERNALBITS (IS_ADJUSTLISTVIEW | IS_INTERNALDUMMYBIT)
  3843. ;end_internal
  3844. ////////////////////////////////////////////
  3845. // Flags for IActiveDesktop::ApplyChanges()
  3846. #define AD_APPLY_SAVE 0x00000001
  3847. #define AD_APPLY_HTMLGEN 0x00000002
  3848. #define AD_APPLY_REFRESH 0x00000004
  3849. #define AD_APPLY_ALL (AD_APPLY_SAVE | AD_APPLY_HTMLGEN | AD_APPLY_REFRESH)
  3850. #define AD_APPLY_FORCE 0x00000008
  3851. #define AD_APPLY_BUFFERED_REFRESH 0x00000010
  3852. #define AD_APPLY_DYNAMICREFRESH 0x00000020
  3853. ////////////////////////////////////////////
  3854. // Flags for IActiveDesktop::GetWallpaperOptions()
  3855. // IActiveDesktop::SetWallpaperOptions()
  3856. #define WPSTYLE_CENTER 0
  3857. #define WPSTYLE_TILE 1
  3858. #define WPSTYLE_STRETCH 2
  3859. #define WPSTYLE_MAX 3
  3860. ////////////////////////////////////////////
  3861. // Flags for IActiveDesktop::ModifyComponent()
  3862. #define COMP_ELEM_TYPE 0x00000001
  3863. #define COMP_ELEM_CHECKED 0x00000002
  3864. #define COMP_ELEM_DIRTY 0x00000004
  3865. #define COMP_ELEM_NOSCROLL 0x00000008
  3866. #define COMP_ELEM_POS_LEFT 0x00000010
  3867. #define COMP_ELEM_POS_TOP 0x00000020
  3868. #define COMP_ELEM_SIZE_WIDTH 0x00000040
  3869. #define COMP_ELEM_SIZE_HEIGHT 0x00000080
  3870. #define COMP_ELEM_POS_ZINDEX 0x00000100
  3871. #define COMP_ELEM_SOURCE 0x00000200
  3872. #define COMP_ELEM_FRIENDLYNAME 0x00000400
  3873. #define COMP_ELEM_SUBSCRIBEDURL 0x00000800
  3874. #define COMP_ELEM_ORIGINAL_CSI 0x00001000
  3875. #define COMP_ELEM_RESTORED_CSI 0x00002000
  3876. #define COMP_ELEM_CURITEMSTATE 0x00004000
  3877. #define COMP_ELEM_ALL (COMP_ELEM_TYPE | COMP_ELEM_CHECKED | COMP_ELEM_DIRTY | \
  3878. COMP_ELEM_NOSCROLL | COMP_ELEM_POS_LEFT | COMP_ELEM_SIZE_WIDTH | \
  3879. COMP_ELEM_SIZE_HEIGHT | COMP_ELEM_POS_ZINDEX | COMP_ELEM_SOURCE | \
  3880. COMP_ELEM_FRIENDLYNAME | COMP_ELEM_POS_TOP | COMP_ELEM_SUBSCRIBEDURL | \
  3881. COMP_ELEM_ORIGINAL_CSI | COMP_ELEM_RESTORED_CSI | COMP_ELEM_CURITEMSTATE)
  3882. ////////////////////////////////////////////
  3883. // Flags for IActiveDesktop::AddDesktopItemWithUI()
  3884. typedef enum tagDTI_ADTIWUI
  3885. {
  3886. DTI_ADDUI_DEFAULT = 0x00000000,
  3887. DTI_ADDUI_DISPSUBWIZARD = 0x00000001,
  3888. DTI_ADDUI_POSITIONITEM = 0x00000002,
  3889. };
  3890. ////////////////////////////////////////////
  3891. // Flags for IActiveDesktop::AddUrl()
  3892. #define ADDURL_SILENT 0X0001
  3893. ////////////////////////////////////////////
  3894. // Default positions for ADI
  3895. #define COMPONENT_DEFAULT_LEFT (0xFFFF)
  3896. #define COMPONENT_DEFAULT_TOP (0xFFFF)
  3897. //
  3898. // Interface for manipulating the Active Desktop.
  3899. //
  3900. #undef INTERFACE
  3901. #define INTERFACE IActiveDesktop
  3902. DECLARE_INTERFACE_( IActiveDesktop, IUnknown )
  3903. {
  3904. // IUnknown methods
  3905. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3906. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3907. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3908. // IActiveDesktop methods
  3909. STDMETHOD (ApplyChanges)(THIS_ DWORD dwFlags) PURE;
  3910. STDMETHOD (GetWallpaper)(THIS_ LPWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwReserved) PURE;
  3911. STDMETHOD (SetWallpaper)(THIS_ LPCWSTR pwszWallpaper, DWORD dwReserved) PURE;
  3912. STDMETHOD (GetWallpaperOptions)(THIS_ LPWALLPAPEROPT pwpo, DWORD dwReserved) PURE;
  3913. STDMETHOD (SetWallpaperOptions)(THIS_ LPCWALLPAPEROPT pwpo, DWORD dwReserved) PURE;
  3914. STDMETHOD (GetPattern)(THIS_ LPWSTR pwszPattern, UINT cchPattern, DWORD dwReserved) PURE;
  3915. STDMETHOD (SetPattern)(THIS_ LPCWSTR pwszPattern, DWORD dwReserved) PURE;
  3916. STDMETHOD (GetDesktopItemOptions)(THIS_ LPCOMPONENTSOPT pco, DWORD dwReserved) PURE;
  3917. STDMETHOD (SetDesktopItemOptions)(THIS_ LPCCOMPONENTSOPT pco, DWORD dwReserved) PURE;
  3918. STDMETHOD (AddDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwReserved) PURE;
  3919. STDMETHOD (AddDesktopItemWithUI)(THIS_ HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
  3920. STDMETHOD (ModifyDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwFlags) PURE;
  3921. STDMETHOD (RemoveDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwReserved) PURE;
  3922. STDMETHOD (GetDesktopItemCount)(THIS_ LPINT lpiCount, DWORD dwReserved) PURE;
  3923. STDMETHOD (GetDesktopItem)(THIS_ int nComponent, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
  3924. STDMETHOD (GetDesktopItemByID)(THIS_ ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
  3925. STDMETHOD (GenerateDesktopItemHtml)(THIS_ LPCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
  3926. STDMETHOD (AddUrl)(THIS_ HWND hwnd, LPCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags) PURE;
  3927. STDMETHOD (GetDesktopItemBySource)(THIS_ LPCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
  3928. };
  3929. typedef IActiveDesktop * LPACTIVEDESKTOP;
  3930. // Flags for SetSafeMode
  3931. #define SSM_CLEAR 0x0000
  3932. #define SSM_SET 0x0001
  3933. #define SSM_REFRESH 0x0002
  3934. #define SSM_UPDATE 0x0004
  3935. // Flags for Set/GetScheme
  3936. #define SCHEME_DISPLAY 0x0001
  3937. #define SCHEME_EDIT 0x0002
  3938. #define SCHEME_LOCAL 0x0004
  3939. #define SCHEME_GLOBAL 0x0008
  3940. #define SCHEME_REFRESH 0x0010
  3941. #define SCHEME_UPDATE 0x0020
  3942. #define SCHEME_DONOTUSE 0x0040 // used to be SCHEME_ENUMERATE; no longer supported
  3943. #define SCHEME_CREATE 0x0080
  3944. #undef INTERFACE
  3945. #define INTERFACE IActiveDesktopP
  3946. DECLARE_INTERFACE_( IActiveDesktopP, IUnknown )
  3947. {
  3948. // IUnknown methods
  3949. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3950. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3951. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3952. // IActiveDesktopP methods
  3953. STDMETHOD (SetSafeMode)(THIS_ DWORD dwFlags) PURE;
  3954. STDMETHOD (EnsureUpdateHTML)(THIS) PURE;
  3955. STDMETHOD (SetScheme)(THIS_ LPCWSTR pwszSchemeName, DWORD dwFlags) PURE;
  3956. STDMETHOD (GetScheme)(THIS_ LPWSTR pwszSchemeName, DWORD *lpdwcchBuffer, DWORD dwFlags) PURE;
  3957. //
  3958. };
  3959. typedef IActiveDesktopP * LPACTIVEDESKTOPP;
  3960. //Flags for GetObjectFlags
  3961. #define GADOF_DIRTY 0x00000001
  3962. #undef INTERFACE
  3963. #define INTERFACE IADesktopP2
  3964. DECLARE_INTERFACE_( IADesktopP2, IUnknown )
  3965. {
  3966. // IUnknown methods
  3967. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3968. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  3969. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  3970. // IADesktopP2 methods
  3971. STDMETHOD (ReReadWallpaper)(THIS) PURE;
  3972. STDMETHOD (GetADObjectFlags)(THIS_ DWORD *lpdwFlags, DWORD dwMask) PURE;
  3973. STDMETHOD (UpdateAllDesktopSubscriptions)(THIS) PURE;
  3974. STDMETHOD (MakeDynamicChanges)(THIS_ IOleObject *pOleObj) PURE;
  3975. };
  3976. typedef IADesktopP2 * LPADESKTOPP2;
  3977. #endif // _WININET_
  3978. #if (_WIN32_IE >= 0x0500)
  3979. #define MAX_COLUMN_NAME_LEN 80
  3980. #define MAX_COLUMN_DESC_LEN 128
  3981. #include <pshpack1.h>
  3982. typedef struct {
  3983. SHCOLUMNID scid; // OUT the unique identifier of this column
  3984. VARTYPE vt; // OUT the native type of the data returned
  3985. DWORD fmt; // OUT this listview format (LVCFMT_LEFT, usually)
  3986. UINT cChars; // OUT the default width of the column, in characters
  3987. DWORD csFlags; // OUT SHCOLSTATE flags
  3988. WCHAR wszTitle[MAX_COLUMN_NAME_LEN]; // OUT the title of the column
  3989. WCHAR wszDescription[MAX_COLUMN_DESC_LEN]; // OUT full description of this column
  3990. } SHCOLUMNINFO, *LPSHCOLUMNINFO;
  3991. typedef const SHCOLUMNINFO* LPCSHCOLUMNINFO;
  3992. #include <poppack.h> /* Return to default */
  3993. #include <pshpack8.h>
  3994. typedef struct {
  3995. ULONG dwFlags; // initialization flags
  3996. ULONG dwReserved; // reserved for future use.
  3997. WCHAR wszFolder[MAX_PATH]; // fully qualified folder path (or empty if multiple folders)
  3998. } SHCOLUMNINIT, *LPSHCOLUMNINIT;
  3999. typedef const SHCOLUMNINIT* LPCSHCOLUMNINIT;
  4000. #define SHCDF_UPDATEITEM 0x00000001 // this flag is a hint that the file has changed since the last call to GetItemData
  4001. typedef struct {
  4002. ULONG dwFlags; // combination of SHCDF_ flags.
  4003. DWORD dwFileAttributes; // file attributes.
  4004. ULONG dwReserved; // reserved for future use.
  4005. WCHAR* pwszExt; // address of file name extension
  4006. WCHAR wszFile[MAX_PATH]; // Absolute path of file.
  4007. } SHCOLUMNDATA, *LPSHCOLUMNDATA;
  4008. typedef const SHCOLUMNDATA* LPCSHCOLUMNDATA;
  4009. #include <poppack.h> /* Return to byte packing */
  4010. #undef INTERFACE
  4011. #define INTERFACE IColumnProvider
  4012. // Note: these objects must be threadsafe! GetItemData _will_ be called
  4013. // simultaneously from multiple threads.
  4014. DECLARE_INTERFACE_(IColumnProvider, IUnknown)
  4015. {
  4016. // IUnknown methods
  4017. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  4018. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  4019. STDMETHOD_(ULONG, Release)(THIS) PURE;
  4020. // IColumnProvider methods
  4021. STDMETHOD (Initialize)(THIS_ LPCSHCOLUMNINIT psci) PURE;
  4022. STDMETHOD (GetColumnInfo)(THIS_ DWORD dwIndex, SHCOLUMNINFO *psci) PURE;
  4023. STDMETHOD (GetItemData)(THIS_ LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) PURE;
  4024. };
  4025. ///////////////////////////////////////////////////////
  4026. //
  4027. // Drag and Drop helper
  4028. //
  4029. // Purpose: To expose the Shell drag images
  4030. //
  4031. // This interface is implemented in the shell by CLSID_DragDropHelper.
  4032. //
  4033. // To use:
  4034. // If you are the source of a drag (i.e. in response to LV_DRAGBEGIN or
  4035. // equivelent begin drag message) call
  4036. // IDragSourceHelper::InitializeFromWindow
  4037. // (<hwnd of window supporting DI_GETDRAGIMAGE>,
  4038. // <pointer to POINT indicating offset to the mouse from
  4039. // the upper left corner of the image>,
  4040. // <pointer to data object>)
  4041. //
  4042. // NOTE: The Data object must support IDataObject::SetData with multiple
  4043. // data types and GetData must implement data type cloning
  4044. // (Including HGLOBAL), not just aliasing.
  4045. //
  4046. // If you wish to have an image while over your application add the
  4047. // IDragImages::Dr* calls to your IDropTarget implementation. For Example:
  4048. //
  4049. // STDMETHODIMP CUserDropTarget::DragEnter(IDataObject* pDataObject,
  4050. // DWORD grfKeyState,
  4051. // POINTL pt, DWORD* pdwEffect)
  4052. // {
  4053. // // Process your DragEnter
  4054. // // Call IDragImages::DragEnter last.
  4055. // _pDropTargetHelper->DragEnter(_hwndDragOver, pDataObject,
  4056. // (POINT*)&pt, *pdwEffect);
  4057. // return hres;
  4058. // }
  4059. //
  4060. //
  4061. // If you wish to be able to source a drag image from a custom control,
  4062. // implement a handler for the RegisterWindowMessage(DI_GETDRAGIMAGE).
  4063. // The LPARAM is a pointer to an SHDRAGIMAGE structure.
  4064. //
  4065. // sizeDragImage - Calculate the length and width required to render
  4066. // the images.
  4067. // ptOffset - Calculate the offset from the upper left corner to
  4068. // the mouse cursor within the image
  4069. // hbmpDragImage - CreateBitmap( sizeDragImage.cx, sizeDragImage.cy,
  4070. // GetDeviceCaps(hdcScreen, PLANES),
  4071. // GetDeviceCaps(hdcScreen, BITSPIXEL),
  4072. // NULL);
  4073. //
  4074. // Drag Images will only be displayed on Windows NT 5.0 or later.
  4075. //
  4076. //
  4077. // Note about IDropTargetHelper::Show - This method is provided for
  4078. // showing/hiding the Drag image in low color depth video modes. When
  4079. // painting to a window that is currently being dragged over (i.e. For
  4080. // indicating a selection) you need to hide the drag image by calling this
  4081. // method passing FALSE. After the window is done painting, Show the image
  4082. // again by passing TRUE.
  4083. #include <pshpack8.h>
  4084. typedef struct
  4085. {
  4086. SIZE sizeDragImage; // OUT - The length and Width of the
  4087. // rendered image
  4088. POINT ptOffset; // OUT - The Offset from the mouse cursor to
  4089. // the upper left corner of the image
  4090. HBITMAP hbmpDragImage; // OUT - The Bitmap containing the rendered
  4091. // drag images
  4092. COLORREF crColorKey; // OUT - The COLORREF that has been blitted
  4093. // to the background of the images
  4094. } SHDRAGIMAGE, *LPSHDRAGIMAGE;
  4095. #include <poppack.h> /* Return to byte packing */
  4096. // This is sent to a window to get the rendered images to a bitmap
  4097. // Call RegisterWindowMessage to get the ID
  4098. #define DI_GETDRAGIMAGE TEXT("ShellGetDragImage")
  4099. #undef INTERFACE
  4100. #define INTERFACE IDropTargetHelper
  4101. DECLARE_INTERFACE_( IDropTargetHelper, IUnknown )
  4102. {
  4103. // IUnknown methods
  4104. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  4105. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  4106. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  4107. // IDropTargetHelper
  4108. STDMETHOD (DragEnter)(THIS_ HWND hwndTarget, IDataObject* pDataObject,
  4109. POINT* ppt, DWORD dwEffect) PURE;
  4110. STDMETHOD (DragLeave)(THIS) PURE;
  4111. STDMETHOD (DragOver)(THIS_ POINT* ppt, DWORD dwEffect) PURE;
  4112. STDMETHOD (Drop)(THIS_ IDataObject* pDataObject, POINT* ppt,
  4113. DWORD dwEffect) PURE;
  4114. STDMETHOD (Show)(THIS_ BOOL fShow) PURE;
  4115. };
  4116. #undef INTERFACE
  4117. #define INTERFACE IDragSourceHelper
  4118. DECLARE_INTERFACE_( IDragSourceHelper, IUnknown )
  4119. {
  4120. // IUnknown methods
  4121. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  4122. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  4123. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  4124. // IDragSourceHelper
  4125. STDMETHOD (InitializeFromBitmap)(THIS_ LPSHDRAGIMAGE pshdi,
  4126. IDataObject* pDataObject) PURE;
  4127. STDMETHOD (InitializeFromWindow)(THIS_ HWND hwnd, POINT* ppt,
  4128. IDataObject* pDataObject) PURE;
  4129. };
  4130. #endif // _WIN32_IE >= 0x0500
  4131. #endif // _WIN32_IE
  4132. //==========================================================================
  4133. // Clipboard format which may be supported by IDataObject from system
  4134. // defined shell folders (such as directories, network, ...).
  4135. //==========================================================================
  4136. #define CFSTR_SHELLIDLISTP TEXT("Shell IDLData Private") ;Internal
  4137. #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") // CF_IDLIST
  4138. #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") // CF_OBJECTPOSITIONS
  4139. #define CFSTR_NETRESOURCES TEXT("Net Resource") // CF_NETRESOURCE
  4140. #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") // CF_FILEGROUPDESCRIPTORA
  4141. #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW") // CF_FILEGROUPDESCRIPTORW
  4142. #define CFSTR_FILECONTENTS TEXT("FileContents") // CF_FILECONTENTS
  4143. #define CFSTR_FILENAMEA TEXT("FileName") // CF_FILENAMEA
  4144. #define CFSTR_FILENAMEW TEXT("FileNameW") // CF_FILENAMEW
  4145. #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName") // CF_PRINTERS
  4146. #define CFSTR_FILENAMEMAPA TEXT("FileNameMap") // CF_FILENAMEMAPA
  4147. #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW") // CF_FILENAMEMAPW
  4148. #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
  4149. #define CFSTR_INETURLA CFSTR_SHELLURL
  4150. #define CFSTR_INETURLW TEXT("UniformResourceLocatorW")
  4151. #define CFSTR_SHELLCOPYDATA TEXT("Shell Copy Data") ;Internal
  4152. #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
  4153. #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
  4154. #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
  4155. #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
  4156. #define CFSTR_DRAGCONTEXT TEXT("DragContext")
  4157. #define CFSTR_MOUNTEDVOLUME TEXT("MountedVolume")
  4158. #define CFSTR_PERSISTEDDATAOBJECT TEXT("PersistedDataObject")
  4159. #define CFSTR_TARGETCLSID TEXT("TargetCLSID") // HGLOBAL with a CLSID of the drop target
  4160. #define CFSTR_LOGICALPERFORMEDDROPEFFECT TEXT("Logical Performed DropEffect")
  4161. #define CFSTR_DROPEFFECTFOLDERLIST TEXT("DropEffectFolderList") ;Internal
  4162. #define CFSTR_AUTOPLAY_SHELLIDLISTS TEXT("Autoplay Enumerated IDList Array") // (HGLOBAL with LPIDA)
  4163. #ifdef UNICODE
  4164. #define CFSTR_FILEDESCRIPTOR CFSTR_FILEDESCRIPTORW
  4165. #define CFSTR_FILENAME CFSTR_FILENAMEW
  4166. #define CFSTR_FILENAMEMAP CFSTR_FILENAMEMAPW
  4167. #define CFSTR_INETURL CFSTR_INETURLW
  4168. #else
  4169. #define CFSTR_FILEDESCRIPTOR CFSTR_FILEDESCRIPTORA
  4170. #define CFSTR_FILENAME CFSTR_FILENAMEA
  4171. #define CFSTR_FILENAMEMAP CFSTR_FILENAMEMAPA
  4172. #define CFSTR_INETURL CFSTR_INETURLA
  4173. #endif
  4174. #define DVASPECT_SHORTNAME 2 // use for CF_HDROP to get short name version of file paths
  4175. #define DVASPECT_COPY 3 // use to indicate format is a "Copy" of the data (FILECONTENTS, FILEDESCRIPTOR, etc)
  4176. #define DVASPECT_LINK 4 // use to indicate format is a "Shortcut" to the data (FILECONTENTS, FILEDESCRIPTOR, etc)
  4177. #include <pshpack8.h>
  4178. //
  4179. // format of CF_NETRESOURCE
  4180. //
  4181. typedef struct _NRESARRAY { // anr
  4182. UINT cItems;
  4183. NETRESOURCE nr[1];
  4184. } NRESARRAY, * LPNRESARRAY;
  4185. #include <poppack.h> /* Return to byte packing */
  4186. //
  4187. // format of CF_IDLIST
  4188. //
  4189. typedef struct _IDA {
  4190. UINT cidl; // number of relative IDList
  4191. UINT aoffset[1]; // [0]: folder IDList, [1]-[cidl]: item IDList
  4192. } CIDA, * LPIDA;
  4193. //
  4194. // FILEDESCRIPTOR.dwFlags field indicate which fields are to be used
  4195. //
  4196. typedef enum {
  4197. FD_CLSID = 0x0001,
  4198. FD_SIZEPOINT = 0x0002,
  4199. FD_ATTRIBUTES = 0x0004,
  4200. FD_CREATETIME = 0x0008,
  4201. FD_ACCESSTIME = 0x0010,
  4202. FD_WRITESTIME = 0x0020,
  4203. FD_FILESIZE = 0x0040,
  4204. FD_PROGRESSUI = 0x4000, // Show Progress UI w/Drag and Drop
  4205. FD_LINKUI = 0x8000, // 'link' UI is prefered
  4206. } FD_FLAGS;
  4207. typedef struct _FILEDESCRIPTORA { // fod
  4208. DWORD dwFlags;
  4209. CLSID clsid;
  4210. SIZEL sizel;
  4211. POINTL pointl;
  4212. DWORD dwFileAttributes;
  4213. FILETIME ftCreationTime;
  4214. FILETIME ftLastAccessTime;
  4215. FILETIME ftLastWriteTime;
  4216. DWORD nFileSizeHigh;
  4217. DWORD nFileSizeLow;
  4218. CHAR cFileName[ MAX_PATH ];
  4219. } FILEDESCRIPTORA, *LPFILEDESCRIPTORA;
  4220. typedef struct _FILEDESCRIPTORW { // fod
  4221. DWORD dwFlags;
  4222. CLSID clsid;
  4223. SIZEL sizel;
  4224. POINTL pointl;
  4225. DWORD dwFileAttributes;
  4226. FILETIME ftCreationTime;
  4227. FILETIME ftLastAccessTime;
  4228. FILETIME ftLastWriteTime;
  4229. DWORD nFileSizeHigh;
  4230. DWORD nFileSizeLow;
  4231. WCHAR cFileName[ MAX_PATH ];
  4232. } FILEDESCRIPTORW, *LPFILEDESCRIPTORW;
  4233. #ifdef UNICODE
  4234. #define FILEDESCRIPTOR FILEDESCRIPTORW
  4235. #define LPFILEDESCRIPTOR LPFILEDESCRIPTORW
  4236. #else
  4237. #define FILEDESCRIPTOR FILEDESCRIPTORA
  4238. #define LPFILEDESCRIPTOR LPFILEDESCRIPTORA
  4239. #endif
  4240. //
  4241. // format of CF_FILEGROUPDESCRIPTOR
  4242. //
  4243. typedef struct _FILEGROUPDESCRIPTORA { // fgd
  4244. UINT cItems;
  4245. FILEDESCRIPTORA fgd[1];
  4246. } FILEGROUPDESCRIPTORA, * LPFILEGROUPDESCRIPTORA;
  4247. typedef struct _FILEGROUPDESCRIPTORW { // fgd
  4248. UINT cItems;
  4249. FILEDESCRIPTORW fgd[1];
  4250. } FILEGROUPDESCRIPTORW, * LPFILEGROUPDESCRIPTORW;
  4251. #ifdef UNICODE
  4252. #define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORW
  4253. #define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORW
  4254. #else
  4255. #define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORA
  4256. #define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORA
  4257. #endif
  4258. //
  4259. // format of CF_HDROP and CF_PRINTERS, in the HDROP case the data that follows
  4260. // is a double null terinated list of file names, for printers they are printer
  4261. // friendly names
  4262. //
  4263. typedef struct _DROPFILES {
  4264. DWORD pFiles; // offset of file list
  4265. POINT pt; // drop point (client coords)
  4266. BOOL fNC; // is it on NonClient area
  4267. // and pt is in screen coords
  4268. BOOL fWide; // WIDE character switch
  4269. } DROPFILES, *LPDROPFILES;
  4270. // ;Internal
  4271. // Win 3.1 style HDROP ;Internal
  4272. // ;Internal
  4273. // Notes: Our API works only if pFiles == sizeof(DROPFILES16) ;Internal
  4274. // ;Internal
  4275. typedef struct _DROPFILES16 { ;Internal
  4276. WORD pFiles; // offset to double null list of files ;Internal
  4277. POINTS pt; // drop point (client coords) ;Internal
  4278. WORD fNC; // is it on non client area ;Internal
  4279. // and pt is in screen coords ;Internal
  4280. } DROPFILES16, * LPDROPFILES16; ;Internal
  4281. ;Internal
  4282. // ;Internal
  4283. // format of CF_SHELLCOPYDATA ;Internal
  4284. // ;Internal
  4285. ;Internal
  4286. typedef struct _SHELLCOPYDATA { ;Internal
  4287. DWORD dwEffect; // Intended effect ;Internal
  4288. } SHELLCOPYDATA; ;Internal
  4289. ;begin_internal
  4290. //
  4291. // CFSTR_DROPEFFECTFOLDERLIST defines the drop effects to certain folders
  4292. // this is applied when dropping to a file system folder.
  4293. //
  4294. typedef struct {
  4295. DWORD dwDropEffect;
  4296. WCHAR wszPath[MAX_PATH];
  4297. } DROPEFFECTFOLDER;
  4298. typedef struct {
  4299. DWORD dwDefaultDropEffect; // default drop effect (==0 for current behaviour)
  4300. INT cFolders; // number of folders in the list
  4301. DROPEFFECTFOLDER aFolders[1];
  4302. } DROPEFFECTFOLDERLIST;
  4303. ;end_internal
  4304. //====== File System Notification APIs ===============================
  4305. //
  4306. //------ See shelldll\fsnotify.c for function descriptions. ---------- ;Internal
  4307. ;Internal
  4308. // ;Internal
  4309. // Definition of the function type to be called by the notification ;Internal
  4310. // service when a file the client has registered to monitor changes. ;Internal
  4311. // ;Internal
  4312. // DOC'ed for DOJ compliance: ;Internal
  4313. typedef struct _SHChangeNotifyEntry
  4314. {
  4315. LPCITEMIDLIST pidl;
  4316. BOOL fRecursive;
  4317. } SHChangeNotifyEntry;
  4318. //
  4319. // File System Notification flags
  4320. //
  4321. #define SHCNRF_InterruptLevel 0x0001 ;Internal
  4322. #define SHCNRF_ShellLevel 0x0002 ;Internal
  4323. // If the caller passes SHCNRF_RecursiveInterrupt (meaning that they want interrupt events on the whole ;Internal
  4324. // subtree), then they must also pass SHCNRF_InterruptLevel flag (duh), and they must be a recursive (eg ;Internal
  4325. // fRecursive == TRUE) type notification. ;Internal
  4326. #define SHCNRF_RecursiveInterrupt 0x1000 ;Internal
  4327. #define SHCNRF_ResumeThread 0x2000 ;Internal
  4328. #define SHCNRF_CreateSuspended 0x4000 ;Internal
  4329. #define SHCNRF_NewDelivery 0x8000 ;Internal
  4330. ;begin_internal
  4331. // !! WARNING !!
  4332. // If you change/add any new SHCNE_ events, you will need
  4333. // to possibly modify the SHCNE_XXXXEVENTS masks that are
  4334. // defined below as well.
  4335. ;end_internal
  4336. #define SHCNE_RENAMEITEM 0x00000001L
  4337. #define SHCNE_CREATE 0x00000002L
  4338. #define SHCNE_DELETE 0x00000004L
  4339. #define SHCNE_MKDIR 0x00000008L
  4340. #define SHCNE_RMDIR 0x00000010L
  4341. #define SHCNE_MEDIAINSERTED 0x00000020L
  4342. #define SHCNE_MEDIAREMOVED 0x00000040L
  4343. #define SHCNE_DRIVEREMOVED 0x00000080L
  4344. #define SHCNE_DRIVEADD 0x00000100L
  4345. #define SHCNE_NETSHARE 0x00000200L
  4346. #define SHCNE_NETUNSHARE 0x00000400L
  4347. #define SHCNE_ATTRIBUTES 0x00000800L
  4348. #define SHCNE_UPDATEDIR 0x00001000L
  4349. #define SHCNE_UPDATEITEM 0x00002000L
  4350. #define SHCNE_SERVERDISCONNECT 0x00004000L
  4351. #define SHCNE_UPDATEIMAGE 0x00008000L
  4352. #define SHCNE_DRIVEADDGUI 0x00010000L
  4353. #define SHCNE_RENAMEFOLDER 0x00020000L
  4354. #define SHCNE_FREESPACE 0x00040000L
  4355. #if (_WIN32_IE >= 0x0400)
  4356. // SHCNE_EXTENDED_EVENT: the extended event is identified in dwItem1,
  4357. // packed in LPITEMIDLIST format (same as SHCNF_DWORD packing).
  4358. // Additional information can be passed in the dwItem2 parameter
  4359. // of SHChangeNotify (called "pidl2" below), which if present, must also
  4360. // be in LPITEMIDLIST format.
  4361. //
  4362. // Unlike the standard events, the extended events are ORDINALs, so we
  4363. // don't run out of bits. Extended events follow the SHCNEE_* naming
  4364. // convention.
  4365. //
  4366. // The dwItem2 parameter varies according to the extended event.
  4367. #define SHCNE_EXTENDED_EVENT 0x04000000L
  4368. #endif // _WIN32_IE >= 0x0400
  4369. #define SHCNE_ASSOCCHANGED 0x08000000L
  4370. #define SHCNE_DISKEVENTS 0x0002381FL
  4371. ;begin_internal
  4372. // NOTE: SHCNE_GLOBALEVENTS are typically used to pass
  4373. // non-pidl information (packed into pidl format). We cannot
  4374. // extend SHCNE_GLOBALEVENTS and expect clients of the new
  4375. // events to work on a down-level shell32. In fact, they
  4376. // may very well fault during psfDesktop->CompareIDs.
  4377. // So be careful when adding to this bitfield!
  4378. //
  4379. // Win95 and NT4 and IE4 shipped with 0x0C0581E0L.
  4380. ;end_internal
  4381. #define SHCNE_GLOBALEVENTS 0x0C0581E0L // Events that dont match pidls first
  4382. #define SHCNE_ALLEVENTS 0x7FFFFFFFL
  4383. #define SHCNE_INTERRUPT 0x80000000L // The presence of this flag indicates
  4384. // that the event was generated by an
  4385. // interrupt. It is stripped out before
  4386. // the clients of SHCNNotify_ see it.
  4387. ;begin_internal
  4388. // We use this event mask to tell if we need to possibly throw out a SHCNE_UPDATEDIR that was
  4389. // generated by the filesystem because we have a more specific event already in our queue.
  4390. // NOTE: only non-interrupt events could cause us to throw out a interrupt generated UPDATEDIR event.
  4391. #define SHCNE_UPDATEDIR_OVERRIDE_EVENTS 0x00023818L
  4392. ;end_internal
  4393. #if (_WIN32_IE >= 0x0400)
  4394. // SHCNE_EXTENDED_EVENT extended events. These events are ordinals.
  4395. // This is not a bitfield.
  4396. ;begin_internal
  4397. // This event was defined early on in IE4 for the Theme Switcher to
  4398. // notify the shell that a system-wide update needed to happen.
  4399. // This has been removed but I don't want to re-use the id just yet...
  4400. // BUGBUG (scotth) 6/11/98: can we remove this yet??
  4401. //#define SHCNEE_THEMECHANGED 1L // The theme changed
  4402. ;end_internal
  4403. #define SHCNEE_ORDERCHANGED 2L // pidl2 is the changed folder
  4404. ;begin_internal
  4405. #define SHCNEE_WININETCHANGED 3L // dwItem2 contains CACHE_NOTIFY_* bits
  4406. ;end_internal
  4407. #define SHCNEE_MSI_CHANGE 4L // pidl2 is a SHChangeProductKeyAsIDList
  4408. #define SHCNEE_MSI_UNINSTALL 5L // pidl2 is a SHChangeProductKeyAsIDList
  4409. ;begin_internal
  4410. #if (_WIN32_IE >= 0x0500)
  4411. #define SHCNEE_PROMOTEDITEM 6L // pidl2 is the pidl of the Promoted item
  4412. #define SHCNEE_DEMOTEDITEM 7L // pidl2 is the pidl of the demoted item
  4413. #define SHCNEE_ALIASINUSE 8L // some alias style folder is now being used
  4414. #endif
  4415. #if (_WIN32_IE >= 0x0600)
  4416. #define SHCNEE_SHORTCUTINVOKE 9L // an app has been launched via a shortcut
  4417. // pidl1 = SHShortcutInvokeAsIDList, pidl2=unused
  4418. #define SHCNEE_PINLISTCHANGED 10L // a change was made to the pin list
  4419. // pidl1 = SHChangeDWORDAsIDList, pidl2=unused
  4420. #define SHCNEE_USERINFOCHANGED 11L // A user picture was updated. pidl1 = SHChangeDWORDAsIDList, pidl2=unused
  4421. #define SHCNEE_UPDATEFOLDERLOCATION 12L // a special folder changed pidl1 = {SHChangeDWORDAsIDList, csidlFolder}, pidl2=unused
  4422. #endif
  4423. ;end_internal
  4424. #endif
  4425. // Update types for the UpdateEntryList api ;Internal
  4426. #define SHCNNU_SET 1 // Set the notify list to passed in list ;Internal
  4427. #define SHCNNU_ADD 2 // Add the items to the current list ;Internal
  4428. #define SHCNNU_REMOVE 3 // Remove the items from the current list ;Internal
  4429. // Flags
  4430. // uFlags & SHCNF_TYPE is an ID which indicates what dwItem1 and dwItem2 mean
  4431. #define SHCNF_IDLIST 0x0000 // LPITEMIDLIST
  4432. #define SHCNF_PATHA 0x0001 // path name
  4433. #define SHCNF_PRINTERA 0x0002 // printer friendly name
  4434. #define SHCNF_DWORD 0x0003 // DWORD
  4435. #define SHCNF_PRINTJOBA 0x0004 // dwItem1: printer name ;Internal
  4436. // dwItem2: SHCNF_PRINTJOB_DATA ;Internal
  4437. #define SHCNF_PATHW 0x0005 // path name
  4438. #define SHCNF_PRINTERW 0x0006 // printer friendly name
  4439. #define SHCNF_PRINTJOBW 0x0007 // dwItem1: printer name ;Internal
  4440. // dwItem2: SHCNF_PRINTJOB_DATA ;Internal
  4441. #define SHCNF_INSTRUMENT 0x0080 // dwItem1: LPSHCNF_INSTRUMENT ;Internal
  4442. #define SHCNF_TYPE 0x00FF
  4443. #define SHCNF_FLUSH 0x1000
  4444. #define SHCNF_FLUSHNOWAIT 0x2000
  4445. #define SHCNF_TRANSLATEDALIAS 0x4000 // for internals to filter on ;Internal
  4446. #define SHCNF_ONLYNOTIFYINTERNALS 0x8000 // only notify internal clients ;Internal
  4447. #ifdef UNICODE
  4448. #define SHCNF_PATH SHCNF_PATHW
  4449. #define SHCNF_PRINTER SHCNF_PRINTERW
  4450. #else
  4451. #define SHCNF_PATH SHCNF_PATHA
  4452. #define SHCNF_PRINTER SHCNF_PRINTERA
  4453. #endif
  4454. #ifdef UNICODE ;Internal
  4455. #define SHCNF_PRINTJOB SHCNF_PRINTJOBW ;Internal
  4456. #else ;Internal
  4457. #define SHCNF_PRINTJOB SHCNF_PRINTJOBA ;Internal
  4458. #endif ;Internal
  4459. ;Internal
  4460. typedef struct tagSHCNF_PRINTJOB_DATA { ;Internal
  4461. DWORD JobId; ;Internal
  4462. DWORD Status; ;Internal
  4463. DWORD TotalPages; ;Internal
  4464. DWORD Size; ;Internal
  4465. DWORD PagesPrinted; ;Internal
  4466. } SHCNF_PRINTJOB_DATA, *LPSHCNF_PRINTJOB_DATA; ;Internal
  4467. // ;Internal
  4468. // This is all the INSTRUMENTation stuff... ;Internal
  4469. // make this look like an ITEMIDLIST (uOffset points to 0 uTerm) ;Internal
  4470. #include <pshpack1.h> ;Internal
  4471. typedef struct tagSHCNF_INSTRUMENT { ;Internal
  4472. USHORT uOffset; ;Internal
  4473. USHORT uAlign; ;Internal
  4474. DWORD dwEventType; ;Internal
  4475. DWORD dwEventStructure; ;Internal
  4476. SYSTEMTIME st; ;Internal
  4477. union tagEvents { ;Internal
  4478. struct tagSTRING { ;Internal
  4479. TCHAR sz[32]; ;Internal
  4480. } string; ;Internal
  4481. struct tagHOTKEY { ;Internal
  4482. WPARAM wParam; ;Internal
  4483. } hotkey; ;Internal
  4484. struct tagWNDPROC { ;Internal
  4485. HWND hwnd; ;Internal
  4486. UINT uMsg; ;Internal
  4487. WPARAM wParam; ;Internal
  4488. LPARAM lParam; ;Internal
  4489. } wndproc; ;Internal
  4490. struct tagCOMMAND { ;Internal
  4491. HWND hwnd; ;Internal
  4492. UINT idCmd; ;Internal
  4493. } command; ;Internal
  4494. struct tagDROP { ;Internal
  4495. HWND hwnd; ;Internal
  4496. UINT idCmd; ;Internal
  4497. // TCHAR sz[32]; // convert pDataObject into something we can log ;Internal
  4498. } drop; ;Internal
  4499. } e; ;Internal
  4500. USHORT uTerm; ;Internal
  4501. } SHCNF_INSTRUMENT_INFO, * LPSHCNF_INSTRUMENT_INFO; ;Internal
  4502. #include <poppack.h> ;Internal
  4503. ;Internal
  4504. #define SHCNFI_EVENT_STATECHANGE 0 // dwEventType ;Internal
  4505. #define SHCNFI_EVENT_STRING 1 // e.string ;Internal
  4506. #define SHCNFI_EVENT_HOTKEY 2 // e.hotkey ;Internal
  4507. #define SHCNFI_EVENT_WNDPROC 3 // e.wndproc ;Internal
  4508. #define SHCNFI_EVENT_WNDPROC_HOOK 4 // e.wndproc ;Internal
  4509. #define SHCNFI_EVENT_ONCOMMAND 5 // e.command ;Internal
  4510. #define SHCNFI_EVENT_INVOKECOMMAND 6 // e.command ;Internal
  4511. #define SHCNFI_EVENT_TRACKPOPUPMENU 7 // e.command ;Internal
  4512. #define SHCNFI_EVENT_DROP 8 // e.drop ;Internal
  4513. #define SHCNFI_EVENT_MAX 9 ;Internal
  4514. ;Internal
  4515. #define SHCNFI_STRING_SHOWEXTVIEW 0 ;Internal
  4516. ;Internal
  4517. #define SHCNFI_STATE_KEYBOARDACTIVE 0 // _KEYBOARDACTIVE or _MOUSEACTIVE ;Internal
  4518. #define SHCNFI_STATE_MOUSEACTIVE 1 // _KEYBOARDACTIVE or _MOUSEACTIVE ;Internal
  4519. #define SHCNFI_STATE_ACCEL_TRAY 2 // _ACCEL_TRAY or _ACCEL_DESKTOP ;Internal
  4520. #define SHCNFI_STATE_ACCEL_DESKTOP 3 // _ACCEL_TRAY or _ACCEL_DESKTOP ;Internal
  4521. #define SHCNFI_STATE_START_DOWN 4 // _START_DOWN or _START_UP ;Internal
  4522. #define SHCNFI_STATE_START_UP 5 // _START_DOWN or _START_UP ;Internal
  4523. #define SHCNFI_STATE_TRAY_CONTEXT 6 ;Internal
  4524. #define SHCNFI_STATE_TRAY_CONTEXT_CLOCK 7 ;Internal
  4525. #define SHCNFI_STATE_TRAY_CONTEXT_START 8 ;Internal
  4526. #define SHCNFI_STATE_DEFVIEWX_ALT_DBLCLK 9 ;Internal
  4527. #define SHCNFI_STATE_DEFVIEWX_SHIFT_DBLCLK 10 ;Internal
  4528. #define SHCNFI_STATE_DEFVIEWX_DBLCLK 11 ;Internal
  4529. ;Internal
  4530. #define SHCNFI_GLOBALHOTKEY 0 ;Internal
  4531. ;Internal
  4532. #define SHCNFI_CABINET_WNDPROC 0 ;Internal
  4533. #define SHCNFI_DESKTOP_WNDPROC 1 ;Internal
  4534. #define SHCNFI_PROXYDESKTOP_WNDPROC 2 ;Internal
  4535. #define SHCNFI_TRAY_WNDPROC 3 ;Internal
  4536. #define SHCNFI_DRIVES_WNDPROC 4 ;Internal
  4537. #define SHCNFI_ONETREE_WNDPROC 5 ;Internal
  4538. #define SHCNFI_MAIN_WNDPROC 6 ;Internal
  4539. #define SHCNFI_FOLDEROPTIONS_DLGPROC 7 ;Internal
  4540. #define SHCNFI_VIEWOPTIONS_DLGPROC 8 ;Internal
  4541. #define SHCNFI_FT_DLGPROC 9 ;Internal
  4542. #define SHCNFI_FTEdit_DLGPROC 10 ;Internal
  4543. #define SHCNFI_FTCmd_DLGPROC 11 ;Internal
  4544. #define SHCNFI_TASKMAN_DLGPROC 12 ;Internal
  4545. #define SHCNFI_TRAYVIEWOPTIONS_DLGPROC 13 ;Internal
  4546. #define SHCNFI_INITSTARTMENU_DLGPROC 14 ;Internal
  4547. #define SHCNFI_PRINTERQUEUE_DLGPROC 15 ;Internal
  4548. ;Internal
  4549. #define SHCNFI_CABINET_ONCOMMAND 0 ;Internal
  4550. #define SHCNFI_TRAYCOMMAND 1 ;Internal
  4551. ;Internal
  4552. #define SHCNFI_BITBUCKET_DFM_INVOKE 0 ;Internal
  4553. #define SHCNFI_BITBUCKET_FNV_INVOKE 1 ;Internal
  4554. #define SHCNFI_BITBUCKET_INVOKE 2 ;Internal
  4555. #define SHCNFI_BITBUCKETBG_DFM_INVOKE 3 ;Internal
  4556. #define SHCNFI_CONTROLS_DFM_INVOKE 4 ;Internal
  4557. #define SHCNFI_CONTROLS_FNV_INVOKE 5 ;Internal
  4558. #define SHCNFI_CONTROLSBG_DFM_INVOKE 6 ;Internal
  4559. #define SHCNFI_DEFFOLDER_DFM_INVOKE 7 ;Internal
  4560. #define SHCNFI_DEFFOLDER_INVOKE 8 ;Internal
  4561. #define SHCNFI_FINDEXT_INVOKE 9 ;Internal
  4562. #define SHCNFI_DEFFOLDER_FNV_INVOKE 10 ;Internal
  4563. #define SHCNFI_DRIVESBG_DFM_INVOKE 11 ;Internal
  4564. #define SHCNFI_DRIVES_FNV_INVOKE 12 ;Internal
  4565. #define SHCNFI_DRIVES_DFM_INVOKE 13 ;Internal
  4566. #define SHCNFI_FOLDERBG_DFM_INVOKE 14 ;Internal
  4567. #define SHCNFI_FOLDER_FNV_INVOKE 15 ;Internal
  4568. #define SHCNFI_FOLDER_DFM_INVOKE 16 ;Internal
  4569. #define SHCNFI_NETWORKBG_DFM_INVOKE 17 ;Internal
  4570. #define SHCNFI_NETWORK_FNV_INVOKE 18 ;Internal
  4571. #define SHCNFI_NETWORK_DFM_INVOKE 19 ;Internal
  4572. #define SHCNFI_NETWORKPRINTER_DFM_INVOKE 20 ;Internal
  4573. #define SHCNFI_DESKTOPBG_DFM_INVOKE 21 ;Internal
  4574. #define SHCNFI_DESKTOP_DFM_INVOKE 22 ;Internal
  4575. #define SHCNFI_DESKTOP_FNV_INVOKE 23 ;Internal
  4576. #define SHCNFI_PRINTERS_DFM_INVOKE 24 ;Internal
  4577. #define SHCNFI_PRINTERSBG_DFM_INVOKE 25 ;Internal
  4578. #define SHCNFI_PRINTERS_FNV_INVOKE 26 ;Internal
  4579. #define SHCNFI_DEFVIEWX_INVOKE 27 ;Internal
  4580. ;Internal
  4581. #define SHCNFI_FOLDER_DROP 0 ;Internal
  4582. #define SHCNFI_PRINTQUEUE_DROP 1 ;Internal
  4583. #define SHCNFI_DEFVIEWX_TPM 2 ;Internal
  4584. #define SHCNFI_DROP_EXE_TPM 3 ;Internal
  4585. #define SHCNFI_IDLDT_TPM 4 ;Internal
  4586. ;Internal
  4587. #define SHCNFI_DROP_BITBUCKET 0 ;Internal
  4588. #define SHCNFI_DROP_PRINTFOLDER 1 ;Internal
  4589. #define SHCNFI_DROP_PRINTER 2 ;Internal
  4590. #define SHCNFI_DROP_RUN 3 ;Internal
  4591. #define SHCNFI_DROP_SHELLLINK 4 ;Internal
  4592. #define SHCNFI_DROP_DRIVES 5 ;Internal
  4593. #define SHCNFI_DROP_FS 6 ;Internal
  4594. #define SHCNFI_DROP_EXE 7 ;Internal
  4595. #define SHCNFI_DROP_NETROOT 8 ;Internal
  4596. #define SHCNFI_DROP_PRINTQUEUE 9 ;Internal
  4597. #define SHCNFI_DROP_BRIEFCASE 10 ;Internal
  4598. ;Internal
  4599. #ifdef WANT_SHELL_INSTRUMENTATION ;Internal
  4600. #define INSTRUMENT_STATECHANGE(t) \ ;Internal
  4601. { \ ;Internal
  4602. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4603. s.dwEventType=(t); \ ;Internal
  4604. s.dwEventStructure=SHCNFI_EVENT_STATECHANGE; \ ;Internal
  4605. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4606. } ;Internal
  4607. #define INSTRUMENT_STRING(t,p) \ ;Internal
  4608. { \ ;Internal
  4609. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4610. s.dwEventType=(t); \ ;Internal
  4611. s.dwEventStructure=SHCNFI_EVENT_STRING; \ ;Internal
  4612. lstrcpyn(s.e.string.sz,(p),ARRAYSIZE(s.e.string.sz)); \ ;Internal
  4613. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4614. } ;Internal
  4615. #define INSTRUMENT_HOTKEY(t,w) \ ;Internal
  4616. { \ ;Internal
  4617. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4618. s.dwEventType=(t); \ ;Internal
  4619. s.dwEventStructure=SHCNFI_EVENT_HOTKEY; \ ;Internal
  4620. s.e.hotkey.wParam=(w); \ ;Internal
  4621. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4622. } ;Internal
  4623. #define INSTRUMENT_WNDPROC(t,h,u,w,l) \ ;Internal
  4624. { \ ;Internal
  4625. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4626. s.dwEventType=(t); \ ;Internal
  4627. s.dwEventStructure=SHCNFI_EVENT_WNDPROC; \ ;Internal
  4628. s.e.wndproc.hwnd=(h); \ ;Internal
  4629. s.e.wndproc.uMsg=(u); \ ;Internal
  4630. s.e.wndproc.wParam=(w); \ ;Internal
  4631. s.e.wndproc.lParam=(l); \ ;Internal
  4632. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4633. } ;Internal
  4634. #define INSTRUMENT_WNDPROC_HOOK(h,u,w,l) \ ;Internal
  4635. { \ ;Internal
  4636. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4637. s.dwEventType=0; \ ;Internal
  4638. s.dwEventStructure=SHCNFI_EVENT_WNDPROC_HOOK; \ ;Internal
  4639. s.e.wndproc.hwnd=(h); \ ;Internal
  4640. s.e.wndproc.uMsg=(u); \ ;Internal
  4641. s.e.wndproc.wParam=(w); \ ;Internal
  4642. s.e.wndproc.lParam=(l); \ ;Internal
  4643. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4644. } ;Internal
  4645. #define INSTRUMENT_ONCOMMAND(t,h,u) \ ;Internal
  4646. { \ ;Internal
  4647. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4648. s.dwEventType=(t); \ ;Internal
  4649. s.dwEventStructure=SHCNFI_EVENT_ONCOMMAND; \ ;Internal
  4650. s.e.command.hwnd=(h); \ ;Internal
  4651. s.e.command.idCmd=(u); \ ;Internal
  4652. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4653. } ;Internal
  4654. #define INSTRUMENT_INVOKECOMMAND(t,h,u) \ ;Internal
  4655. { \ ;Internal
  4656. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4657. s.dwEventType=(t); \ ;Internal
  4658. s.dwEventStructure=SHCNFI_EVENT_INVOKECOMMAND; \ ;Internal
  4659. s.e.command.hwnd=(h); \ ;Internal
  4660. s.e.command.idCmd=(u); \ ;Internal
  4661. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4662. } ;Internal
  4663. #define INSTRUMENT_TRACKPOPUPMENU(t,h,u) \ ;Internal
  4664. { \ ;Internal
  4665. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4666. s.dwEventType=(t); \ ;Internal
  4667. s.dwEventStructure=SHCNFI_EVENT_TRACKPOPUPMENU; \ ;Internal
  4668. s.e.command.hwnd=(h); \ ;Internal
  4669. s.e.command.idCmd=(u); \ ;Internal
  4670. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4671. } ;Internal
  4672. #define INSTRUMENT_DROP(t,h,u,p) \ ;Internal
  4673. { \ ;Internal
  4674. SHCNF_INSTRUMENT_INFO s; \ ;Internal
  4675. s.dwEventType=(t); \ ;Internal
  4676. s.dwEventStructure=SHCNFI_EVENT_DROP; \ ;Internal
  4677. s.e.drop.hwnd=(h); \ ;Internal
  4678. s.e.drop.idCmd=(u); \ ;Internal
  4679. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \ ;Internal
  4680. } ;Internal
  4681. #else ;Internal
  4682. #define INSTRUMENT_STATECHANGE(t) ;Internal
  4683. #define INSTRUMENT_STRING(t,p) ;Internal
  4684. #define INSTRUMENT_HOTKEY(t,w) ;Internal
  4685. #define INSTRUMENT_WNDPROC(t,h,u,w,l) ;Internal
  4686. #define INSTRUMENT_WNDPROC_HOOK(h,u,w,l) ;Internal
  4687. #define INSTRUMENT_ONCOMMAND(t,h,u) ;Internal
  4688. #define INSTRUMENT_INVOKECOMMAND(t,h,u) ;Internal
  4689. #define INSTRUMENT_TRACKPOPUPMENU(t,h,u) ;Internal
  4690. #define INSTRUMENT_DROP(t,h,u,p) ;Internal
  4691. #endif //WANT_SHELL_INSTRUMENTATION ;Internal
  4692. // ;Internal
  4693. //
  4694. // APIs
  4695. //
  4696. SHSTDAPI_(void) SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
  4697. //
  4698. // IShellChangeNotify
  4699. //
  4700. #undef INTERFACE
  4701. #define INTERFACE IShellChangeNotify
  4702. DECLARE_INTERFACE_(IShellChangeNotify, IUnknown)
  4703. {
  4704. // *** IUnknown methods ***
  4705. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4706. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4707. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4708. // *** IShellChangeNotify methods ***
  4709. STDMETHOD(OnChange) (THIS_ LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  4710. } ;
  4711. //
  4712. // IQueryInfo
  4713. //
  4714. //-------------------------------------------------------------------------
  4715. //
  4716. // IQueryInfo interface
  4717. //
  4718. // [Methods]
  4719. // ::GetInfoTip()
  4720. //-------------------------------------------------------------------------
  4721. #undef INTERFACE
  4722. #define INTERFACE IQueryInfo
  4723. DECLARE_INTERFACE_(IQueryInfo, IUnknown)
  4724. {
  4725. // *** IUnknown methods ***
  4726. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4727. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4728. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4729. // *** IQueryInfo methods ***
  4730. STDMETHOD(GetInfoTip)(THIS_ DWORD dwFlags, WCHAR **ppwszTip) PURE;
  4731. STDMETHOD(GetInfoFlags)(THIS_ DWORD *pdwFlags) PURE;
  4732. } ;
  4733. #define QITIPF_DEFAULT 0x00000000
  4734. #define QITIPF_USENAME 0x00000001
  4735. #define QITIPF_LINKNOTARGET 0x00000002
  4736. #define QITIPF_LINKUSETARGET 0x00000004
  4737. #define QITIPF_USESLOWTIP 0x00000008 // Flag says it's OK to take a long time generating tip
  4738. #define QIF_CACHED 0x00000001
  4739. #define QIF_DONTEXPANDFOLDER 0x00000002
  4740. ;begin_internal
  4741. //
  4742. // IQueryCodePage
  4743. //
  4744. #undef INTERFACE
  4745. #define INTERFACE IQueryCodePage
  4746. DECLARE_INTERFACE_(IQueryCodePage, IUnknown)
  4747. {
  4748. // *** IUnknown methods ***
  4749. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4750. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4751. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4752. // *** IQueryCodePage methods ***
  4753. STDMETHOD(GetCodePage)(THIS_ UINT * puiCodePage) PURE;
  4754. STDMETHOD(SetCodePage)(THIS_ UINT uiCodePage) PURE;
  4755. } ;
  4756. ;end_internal
  4757. //
  4758. // SHAddToRecentDocs
  4759. //
  4760. #define SHARD_PIDL 0x00000001L
  4761. #define SHARD_PATHA 0x00000002L
  4762. #define SHARD_PATHW 0x00000003L
  4763. #ifdef UNICODE
  4764. #define SHARD_PATH SHARD_PATHW
  4765. #else
  4766. #define SHARD_PATH SHARD_PATHA
  4767. #endif
  4768. SHSTDAPI_(void) SHAddToRecentDocs(UINT uFlags, LPCVOID pv);
  4769. ;begin_internal
  4770. SHSTDAPI_(void) SHWaitOp_Operate(HANDLE hWaitOp, DWORD dwProcId);
  4771. // DOC'ed for DOJ compliance:
  4772. ;end_internal
  4773. typedef struct _SHChangeDWORDAsIDList {
  4774. USHORT cb;
  4775. DWORD dwItem1;
  4776. DWORD dwItem2;
  4777. USHORT cbZero;
  4778. } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
  4779. #if (_WIN32_IE >= 0x0400) ;both
  4780. ;begin_internal
  4781. // Use this instead of SHChangeDWORDAsIDList for SHCNEE_ORDERCHANGED
  4782. // SHCNEE_PROMOTEDITEM and SHCNEE_DEMOTEDITEM
  4783. //
  4784. // When filling in the pSender, cast LPVOID directly to INT64.
  4785. // Do not cast through DWORD_PTR because that will not sign extend
  4786. // properly on Win32.
  4787. typedef struct _SHChangeMenuAsIDList {
  4788. USHORT cb;
  4789. DWORD dwItem1; // SHCNEE_EXTENDED_EVENT requires this
  4790. // pSender must appear immediately after dwItem1 for IE5.0 compat
  4791. INT64 pSender; // address of sender (64-bit for Win64)
  4792. DWORD dwProcessID; // pid of sender
  4793. USHORT cbZero;
  4794. } SHChangeMenuAsIDList, * LPSHChangeMenuAsIDList;
  4795. // DOC'ed for DOJ Compliance
  4796. ;end_internal
  4797. typedef struct _SHChangeUpdateImageIDList {
  4798. USHORT cb;
  4799. int iIconIndex;
  4800. int iCurIndex;
  4801. UINT uFlags;
  4802. DWORD dwProcessID;
  4803. WCHAR szName[MAX_PATH];
  4804. USHORT cbZero;
  4805. } SHChangeUpdateImageIDList, * LPSHChangeUpdateImageIDList;
  4806. SHSTDAPI_(int) SHHandleUpdateImage( LPCITEMIDLIST pidlExtra );
  4807. ;begin_internal
  4808. ;end_internal
  4809. typedef struct _SHChangeProductKeyAsIDList {
  4810. USHORT cb;
  4811. WCHAR wszProductKey[39];
  4812. USHORT cbZero;
  4813. } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
  4814. ;begin_internal
  4815. typedef struct _SHShortcutInvokeAsIDList {
  4816. USHORT cb;
  4817. DWORD dwItem1; // SHCNEE_EXTENDED_EVENT requires this
  4818. DWORD dwPid; // PID of target application
  4819. WCHAR szShortcutName[MAX_PATH]; // Path to shortcut
  4820. WCHAR szTargetName[MAX_PATH]; // Path to target application
  4821. USHORT cbZero;
  4822. } SHShortcutInvokeAsIDList, *LPSHShortcutInvokeAsIDList;
  4823. ;end_internal
  4824. SHSTDAPI_(void) SHUpdateImage%(LPCTSTR% pszHashItem, int iIndex, UINT uFlags, int iImageIndex);
  4825. #endif /* _WIN32_IE */ ;both
  4826. ;begin_internal
  4827. #define SHChangeNotifyHandleEvents() SHChangeNotify(0, SHCNF_FLUSH, NULL, NULL)
  4828. // DOC'ed for DOJ compliance
  4829. ;end_internal
  4830. SHSTDAPI_(ULONG) SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg, int cEntries, SHChangeNotifyEntry *pshcne);
  4831. ;begin_internal
  4832. #define SHChangeNotifyRegisterORD 2
  4833. // DOC'ed for DOJ compliance
  4834. ;end_internal
  4835. SHSTDAPI_(BOOL) SHChangeNotifyDeregister(unsigned long ulID);
  4836. ;begin_internal
  4837. #define SHChangeNotifyDeregisterORD 4
  4838. SHSTDAPI_(BOOL) SHChangeNotifyUpdateEntryList(unsigned long ulID, int iUpdateType, int cEntries, SHChangeNotifyEntry *pshcne);
  4839. SHSTDAPI_(void) SHChangeNotifyReceive(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlExtra);
  4840. SHSTDAPI_(BOOL) SHChangeRegistrationReceive(HANDLE hChangeNotification, DWORD dwProcId);
  4841. SHSTDAPI_(void) SHChangeNotifyDeregisterWindow(HWND hwnd);
  4842. SHSTDAPI_(LRESULT) SHChangeNotifySuspendResumeReceive(WPARAM wParam, LPARAM lParam);
  4843. SHSTDAPI_(BOOL) SHChangeNotifySuspendResume(BOOL bSuspend, LPITEMIDLIST pidlSuspend, BOOL bRescursive, DWORD dwReserved);
  4844. typedef HANDLE LPSHChangeNotificationLock;
  4845. // DOC'ed for DOJ compliance
  4846. ;end_internal
  4847. SHSTDAPI_(HANDLE) SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId, LPITEMIDLIST **pppidl, LONG *plEvent);
  4848. SHSTDAPI_(BOOL) SHChangeNotification_Unlock(HANDLE hLock);
  4849. ;begin_internal
  4850. // END Internal SHChangeNotify HELPERS
  4851. // DOC'ed for DOJ compliance
  4852. ;end_internal
  4853. #if (_WIN32_IE >= 0x0400)
  4854. // The pidls that are given to the view via the ChangeNotifyEvents are simple Pidls,
  4855. // SHGetRealIDL() will convert them to true PIDLs.
  4856. SHSTDAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST * ppidlReal);
  4857. #endif // _WIN32_IE >= 0x0400
  4858. SHSTDAPI SHGetInstanceExplorer(IUnknown **ppunk);
  4859. //
  4860. // SHGetDataFromIDListA/W
  4861. //
  4862. // SHGetDataFromIDList nFormat values TCHAR
  4863. #define SHGDFIL_FINDDATA 1
  4864. #define SHGDFIL_NETRESOURCE 2
  4865. #define SHGDFIL_DESCRIPTIONID 3
  4866. #define SHDID_ROOT_REGITEM 1
  4867. #define SHDID_FS_FILE 2
  4868. #define SHDID_FS_DIRECTORY 3
  4869. #define SHDID_FS_OTHER 4
  4870. #define SHDID_COMPUTER_DRIVE35 5
  4871. #define SHDID_COMPUTER_DRIVE525 6
  4872. #define SHDID_COMPUTER_REMOVABLE 7
  4873. #define SHDID_COMPUTER_FIXED 8
  4874. #define SHDID_COMPUTER_NETDRIVE 9
  4875. #define SHDID_COMPUTER_CDROM 10
  4876. #define SHDID_COMPUTER_RAMDISK 11
  4877. #define SHDID_COMPUTER_OTHER 12
  4878. #define SHDID_NET_DOMAIN 13
  4879. #define SHDID_NET_SERVER 14
  4880. #define SHDID_NET_SHARE 15
  4881. #define SHDID_NET_RESTOFNET 16
  4882. #define SHDID_NET_OTHER 17
  4883. #define SHDID_COMPUTER_IMAGING 18
  4884. #define SHDID_COMPUTER_AUDIO 19
  4885. #define SHDID_COMPUTER_SHAREDDOCS 20
  4886. #include <pshpack8.h>
  4887. typedef struct _SHDESCRIPTIONID {
  4888. DWORD dwDescriptionId;
  4889. CLSID clsid;
  4890. } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
  4891. #include <poppack.h> /* Return to byte packing */
  4892. // these delegate to IShellFolder2::GetItemData()
  4893. SHSTDAPI SHGetDataFromIDList%(IShellFolder *psf, LPCITEMIDLIST pidl, int nFormat, void *pv, int cb);
  4894. ;begin_internal
  4895. #ifndef NOOCHOST // {
  4896. //
  4897. // ====== OCHOST CONTROL ==========================================
  4898. //
  4899. // The following are all definations of structures, windows messages needed for OCHOST,
  4900. // the window control you can use to host an OC.
  4901. // To use OCHOST, you must specify the window class as OCHOST_CLASS or "OCHOST"
  4902. // -- To Create and initialize OCHOST:
  4903. // 1. CreateWindow with window title = the string version of class id or the OC
  4904. // 2. CreateWindow with a pointer to the OCHINITSTRUCT structure as the last parameter
  4905. // you must allocate and initialize the OCHINITSTRUCT structure
  4906. // 3. CreateWindow with no title and the last param == NULL, then use the OCM_INITIALIZE message
  4907. // or the OCHost_InitOC macro to initialize it.
  4908. // 4. Use OCM_QUERYINTERFACE to QI an interface pointer from the OC.
  4909. // 5. Simply destroy the window when you exit.
  4910. // SHDRC -- Shell Doc Register Classes
  4911. typedef struct _SHDRC {
  4912. DWORD cbSize; // size of this structure in bytes
  4913. DWORD dwFlags; // SHDRCF_ flags
  4914. } SHDRC;
  4915. #define SHDRCF_OCHOST 0x0001 // Register the OCHOST_CLASS window
  4916. #define SHDRCF_ALL 0x0001 // ;Internal
  4917. SHDOCAPI_(BOOL) DllRegisterWindowClasses(const SHDRC * pshdrc);
  4918. BROWSEUIAPI_(BOOL) InitOCHostClass(const SHDRC *pshdrc);
  4919. #define OCHOST_CLASSA "OCHost"
  4920. #define OCHOST_CLASSW L"OCHost"
  4921. #ifdef UNICODE
  4922. #define OCHOST_CLASS OCHOST_CLASSW
  4923. #else
  4924. #define OCHOST_CLASS OCHOST_CLASSA
  4925. #endif
  4926. // ------------------- Window messages for OC Host --------------------
  4927. // IUnknown::QueryInterface the hosted OC
  4928. typedef struct _QIMSG {
  4929. const IID * qiid;
  4930. void **ppvObject;
  4931. } QIMSG, *LPQIMSG;
  4932. // ................. Query Interface Message ..........
  4933. #define OCM_QUERYINTERFACE (WM_USER+0)
  4934. #ifdef __cplusplus
  4935. inline HRESULT OCHost_QueryInterface(HWND hwndOCH, REFIID riid, void **ppv) \
  4936. { QIMSG qimsg = {&riid, ppv}; \
  4937. return (HRESULT)SNDMSG((hwndOCH), OCM_QUERYINTERFACE, (WPARAM)sizeof(qimsg), (LPARAM)&qimsg); \
  4938. }
  4939. #else
  4940. #define OCHost_QueryInterface(hwndOCH, riid, ppv) \
  4941. { QIMSG qimsg = {&riid, ppv}; \
  4942. SNDMSG((hwndOCH), OCM_QUERYINTERFACE, (WPARAM)sizeof(qimsg), (LPARAM)&qimsg); \
  4943. }
  4944. #endif
  4945. // ------------------- OC Initialization Structure ---------------------
  4946. // This is intended to be passed in as the lParam of the OCM_INITOC message
  4947. typedef struct _OCHINITSTRUCT {
  4948. UINT cbSize; // size of this structure
  4949. CLSID clsidOC; // class ID of the OC
  4950. IUnknown * punkOwner; // owner of OCHOST
  4951. } OCHINITSTRUCT, *LPOCHINITSTRUCT;
  4952. //--------------------------------------------------------------------
  4953. // ................ Initialize and activate the OC ...............
  4954. #define OCM_INITIALIZE (WM_USER+1)
  4955. #define OCM_INITOC OCM_INITIALIZE
  4956. #define OCHost_InitOC(hwndOCH, lpOCS) \
  4957. (HRESULT)SNDMSG((hwndOCH), OCM_INITOC, 0, (LPARAM)lpOCS)
  4958. // ............... give ochost a parent IUnknown .......
  4959. #define OCM_SETOWNER (WM_USER+2)
  4960. #define OCHost_SetOwner(hwndOC, punk) \
  4961. (HRESULT)SNDMSG((hwndOC), OCM_SETOWNER, 0, (LPARAM)(IUnknown*)(punk))
  4962. // ............... DoVerb the OC .......
  4963. // n.b. iVerb is technically a long, WPARAM might truncate it
  4964. #define OCM_DOVERB (WM_USER+3)
  4965. #define OCHost_DoVerb(hwndOC, iVerb, lpMsg) \
  4966. (HRESULT)SNDMSG((hwndOC), OCM_DOVERB, (WPARAM)iVerb, (LPARAM)lpMsg)
  4967. //.................Enable/Disable OC event notifications
  4968. #define OCM_ENABLEEVENTS (WM_USER+4)
  4969. // WPARAM: TRUE to enable event notifications, FALSE to disable.
  4970. // returns: TRUE if successful, otherwise FALSE.
  4971. // Event notification is in the form of a WM_NOTIFY with
  4972. // code OCN_OCEVENT and an NMOCEVENT block.
  4973. #define OCHost_EnableEvents(hwndOC, bEnable) \
  4974. (BOOL)SNDMSG((hwndOC), OCM_ENABLEEVENTS, (WPARAM)bEnable, 0L)
  4975. #define OCM_SETSERVICEPROVIDER (WM_USER+5)
  4976. // LPARAM: IServiceProvider* pSP.
  4977. // This message sets a service provider for SID_OleClientSite delegation.
  4978. // Currently, OCHost will just call this guy with (SID_OleClientSite, IDispatch)
  4979. // and the client-implemented service provider can return an IDispatch to
  4980. // handle ambient properties.
  4981. #define OCHost_SetServiceProvider(hwndOC, pSP) \
  4982. (BOOL)SNDMSG((hwndOC), OCM_SETSERVICEPROVIDER, 0L, (LPARAM) pSP)
  4983. // ------------------ Window Notify messages from OC Host --------------
  4984. #define OCN_FIRST 0x1300
  4985. #define OCN_COCREATEINSTANCE (OCN_FIRST + 1)
  4986. typedef struct _OCNCOCREATEMSG {
  4987. NMHDR nmhdr;
  4988. CLSID clsidOC;
  4989. IUnknown ** ppunk;
  4990. } OCNCOCREATEMSG, *LPOCNCOCREATEMSG;
  4991. // NOTE: return values are defined as the following
  4992. // If the handler of OCN_COCREATEINSTANCE Notify message returns OCNCOCREATE_ALREADYCREATED,
  4993. // on return the (*ppvObj) is assumed to have the value of the OC's IUnkown pointer
  4994. #define OCNCOCREATE_CONTINUE 0
  4995. #define OCNCOCREATE_HANDLED -1
  4996. #define OCN_PERSISTINIT (OCN_FIRST + 2)
  4997. // NOTE: return values are defined as the following
  4998. // If the handler of OCN_PERSISTINIT Notify message returns OCNPERSIST_ABORT,
  4999. // the OCHOST will abort IPersist's initialization.
  5000. #define OCNPERSISTINIT_CONTINUE 0
  5001. #define OCNPERSISTINIT_HANDLED -1
  5002. // The return value on the following notify messages are ignored.
  5003. #define OCN_ACTIVATE (OCN_FIRST + 3)
  5004. #define OCN_DEACTIVATE (OCN_FIRST + 4)
  5005. #define OCN_EXIT (OCN_FIRST + 5)
  5006. #define OCN_ONPOSRECTCHANGE (OCN_FIRST + 6)
  5007. typedef struct _OCNONPOSRECTCHANGEMSG {
  5008. NMHDR nmhdr;
  5009. LPCRECT prcPosRect;
  5010. } OCNONPOSRECTCHANGEMSG, *LPOCNONPOSRECTCHANGEMSG;
  5011. #define OCN_ONUIACTIVATE (OCN_FIRST + 7)
  5012. typedef struct _OCNONUIACTIVATEMSG {
  5013. NMHDR nmhdr;
  5014. IUnknown *punk;
  5015. } OCNONUIACTIVATEMSG, *LPOCNONUIACTIVATEMSG;
  5016. #define OCNONUIACTIVATE_HANDLED -1
  5017. #define OCN_ONSETSTATUSTEXT (OCN_FIRST + 8)
  5018. typedef struct _OCNONSETSTATUSTEXT {
  5019. NMHDR nmhdr;
  5020. LPCOLESTR pwszStatusText;
  5021. } OCNONSETSTATUSTEXTMSG, *LPOCNONSETSTATUSTEXTMSG;
  5022. #define OCN_OCEVENT (OCN_FIRST + 9)
  5023. // OC event notification block.
  5024. // Recipient should return nonzero if any outbound parameters were modified
  5025. // and should be returned to the ActiveX control object; otherwse zero.
  5026. // NOTE: Structure is not properly aligned. Already shipped so too late to fix;internal
  5027. typedef struct tagNMOCEVENT
  5028. {
  5029. IN NMHDR hdr ;
  5030. IN DISPID dispID ;
  5031. IN IID iid ;
  5032. IN LCID lcid ;
  5033. IN WORD wFlags ;
  5034. IN OUT DISPPARAMS *pDispParams ;
  5035. OUT VARIANT *pVarResult ;
  5036. OUT EXCEPINFO *pExepInfo ;
  5037. OUT UINT *puArgErr ;
  5038. } NMOCEVENT, *PNMOCEVENT, *LPNMOCEVENT ;
  5039. #endif // NOOCHOST // }
  5040. ;end_internal
  5041. ;begin_internal
  5042. //
  5043. // Access to shdocvw's active session count
  5044. //
  5045. enum SessionOp {
  5046. SESSION_QUERY = 0,
  5047. SESSION_INCREMENT,
  5048. SESSION_DECREMENT,
  5049. SESSION_INCREMENT_NODEFAULTBROWSERCHECK
  5050. };
  5051. long SetQueryNetSessionCount(enum SessionOp Op);
  5052. SHDOCAPI_(void) IEWriteErrorLog(const EXCEPTION_RECORD* pexr);
  5053. ;end_internal
  5054. //===========================================================================
  5055. ;begin_internal
  5056. //
  5057. // Internal APIs Follow. NOT FOR PUBLIC CONSUMPTION.
  5058. //
  5059. // Errors shared in the shell
  5060. #define E_FILE_NOT_FOUND MAKE_SCODE(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
  5061. #define E_PATH_NOT_FOUND MAKE_SCODE(SEVERITY_ERROR, FACILITY_WIN32, ERROR_PATH_NOT_FOUND)
  5062. // Useful macros
  5063. #define ResultFromShort(i) MAKE_HRESULT(SEVERITY_SUCCESS, 0, (USHORT)(i))
  5064. #define ShortFromResult(r) (short)HRESULT_CODE(r)
  5065. #if (defined(UNICODE) && !defined(_X86_)) // all non-x86 systems require alignment
  5066. #ifndef ALIGNMENT_SCENARIO
  5067. #define ALIGNMENT_SCENARIO
  5068. #endif
  5069. #endif
  5070. #ifndef LPNTSTR_DEFINED
  5071. #define LPNTSTR_DEFINED
  5072. typedef UNALIGNED const WCHAR * LPNCWSTR;
  5073. typedef UNALIGNED WCHAR * LPNWSTR;
  5074. #ifdef UNICODE
  5075. #define LPNCTSTR LPNCWSTR
  5076. #define LPNTSTR LPNWSTR
  5077. #else
  5078. #define LPNCTSTR LPCSTR
  5079. #define LPNTSTR LPSTR
  5080. #endif
  5081. #endif // LPNTSTR_DEFINED
  5082. #define RFN_FIRST (0U-510U) // run file dialog notify
  5083. #define RFN_LAST (0U-519U)
  5084. //=======================================================================
  5085. // String constants for
  5086. // 1. Registration database keywords (prefix STRREG_)
  5087. // 2. Exported functions from handler dlls (prefix STREXP_)
  5088. // 3. .INI file keywords (prefix STRINI_)
  5089. // 4. Others (prefix STR_)
  5090. //=======================================================================
  5091. #define STRREG_SHELLUI TEXT("ShellUIHandler")
  5092. #define STRREG_SHELL TEXT("Shell")
  5093. #define STRREG_DEFICON TEXT("DefaultIcon")
  5094. #define STRREG_SHEX TEXT("shellex")
  5095. #define STRREG_SHEX_PROPSHEET STRREG_SHEX TEXT("\\PropertySheetHandlers")
  5096. #define STRREG_SHEX_DDHANDLER STRREG_SHEX TEXT("\\DragDropHandlers")
  5097. #define STRREG_SHEX_MENUHANDLER STRREG_SHEX TEXT("\\ContextMenuHandlers")
  5098. #define STRREG_SHEX_COPYHOOK TEXT("Directory\\") STRREG_SHEX TEXT("\\CopyHookHandlers")
  5099. #define STRREG_SHEX_PRNCOPYHOOK TEXT("Printers\\") STRREG_SHEX TEXT("\\CopyHookHandlers")
  5100. #define STRREG_STARTMENU TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Start Menu")
  5101. #define STRREG_STARTMENU2 TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Start Menu2")
  5102. #define STRREG_FAVORITES TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Favorites")
  5103. #define STRREG_DISCARDABLE TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Discardable")
  5104. #define STRREG_POSTSETUP TEXT("\\PostSetup")
  5105. #define STREXP_CANUNLOAD "DllCanUnloadNow" // From OLE 2.0
  5106. #define STRINI_CLASSINFO TEXT(".ShellClassInfo") // secton name
  5107. #define STRINI_SHELLUI TEXT("ShellUIHandler")
  5108. #define STRINI_OPENDIRICON TEXT("OpenDirIcon")
  5109. #define STRINI_DIRICON TEXT("DirIcon")
  5110. #define STR_DESKTOPINI TEXT("desktop.ini")
  5111. #define STR_DESKTOPINIA "desktop.ini"
  5112. #define DRIVEID(path) ((*path - 'A') & 31)
  5113. #define PATH_CCH_EXT 64
  5114. // DOC'ed for DOJ Compliance
  5115. ;end_internal
  5116. // PathResolve flags
  5117. #define PRF_VERIFYEXISTS 0x0001
  5118. #define PRF_TRYPROGRAMEXTENSIONS (0x0002 | PRF_VERIFYEXISTS)
  5119. #define PRF_FIRSTDIRDEF 0x0004
  5120. #define PRF_DONTFINDLNK 0x0008 // if PRF_TRYPROGRAMEXTENSIONS is specified
  5121. ;begin_internal
  5122. #ifndef NOUSER ;internal_win40
  5123. typedef struct { ;internal_win40
  5124. NMHDR hdr; ;internal_win40
  5125. TCHAR% szCmd[MAX_PATH*2]; ;internal_win40
  5126. DWORD dwHotKey; ;internal_win40
  5127. HMONITOR hMonitor; ;internal_win40
  5128. } NMVIEWFOLDER%, *LPNMVIEWFOLDER%; ;internal_win40
  5129. #endif
  5130. // ;internal_win40
  5131. // DDE related APIs ;internal_win40
  5132. // ;internal_win40
  5133. SHSTDDOCAPI_(void) ShellDDEInit(BOOL fInit); ;internal_win40
  5134. SHSTDDOCAPI_(BOOL) DDEHandleViewFolderNotify(IShellBrowser* psb, HWND hwnd, LPNMVIEWFOLDER lpnm); ;internal_win40
  5135. SHSTDDOCAPI_(LPNMVIEWFOLDER) DDECreatePostNotify(LPNMVIEWFOLDER lpnm); ;internal_win40
  5136. // DOC'ed for DOJ compliance
  5137. ;end_internal
  5138. SHSTDAPI_(int) RestartDialog(HWND hwnd, LPCWSTR lpPrompt, DWORD dwReturn);
  5139. SHSTDAPI_(int) RestartDialogEx(HWND hwnd, LPCWSTR lpPrompt, DWORD dwReturn, DWORD dwReasonCode);
  5140. SHSTDAPI SHCoCreateInstance(LPCWSTR pszCLSID, const CLSID *pclsid, IUnknown *pUnkOuter, REFIID riid, void **ppv);
  5141. ;begin_internal
  5142. SHSTDAPI CIDLData_CreateFromIDArray(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[], IDataObject **ppdtobj);
  5143. SHSTDAPI SHCreateFileDataObject(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST *apidl, IDataObject *pdtInner, IDataObject **pdtobj);
  5144. // Common strings
  5145. #define STR_DESKTOPCLASS "Progman"
  5146. //
  5147. // Storage name of a scrap/bookmark item
  5148. //
  5149. #define WSTR_SCRAPITEM L"\003ITEM000"
  5150. // DOC'ed for DOJ Compliance
  5151. ;end_internal
  5152. // For CallCPLEntry16
  5153. //
  5154. DECLARE_HANDLE(FARPROC16);
  5155. SHSTDAPI_(LRESULT) CallCPLEntry16(HINSTANCE hinst, FARPROC16 lpfnEntry, HWND hwndCPL, UINT msg, LPARAM lParam1, LPARAM lParam2);
  5156. ;begin_internal
  5157. #ifdef RFN_FIRST
  5158. #define RFN_EXECUTE (RFN_FIRST - 0)
  5159. typedef struct {
  5160. NMHDR hdr;
  5161. LPCTSTR% lpszCmd;
  5162. LPCTSTR% lpszWorkingDir;
  5163. int nShowCmd;
  5164. } NMRUNFILE%, *LPNMRUNFILE%;
  5165. #endif
  5166. // DOC'ed for DOJ compliance
  5167. ;end_internal
  5168. SHSTDAPI SHCreateStdEnumFmtEtc(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC **ppenumFormatEtc);
  5169. ;begin_internal
  5170. // Shell create link API
  5171. #define SHCL_USETEMPLATE 0x0001
  5172. #define SHCL_USEDESKTOP 0x0002
  5173. #define SHCL_CONFIRM 0x0004
  5174. #define SHCL_MAKEFOLDERSHORTCUT 0x0008
  5175. #if (_WIN32_IE >= 0x0600)
  5176. #define SHCL_NOUNIQUE 0x0010
  5177. #endif // _WIN2_IE >= 0x0600
  5178. SHSTDAPI SHCreateLinks(HWND hwnd, LPCTSTR pszDir, IDataObject *pDataObj, UINT fFlags, LPITEMIDLIST* ppidl);
  5179. SHSTDAPI SHRegisterDragDrop(HWND hwnd, IDropTarget *pdtgt);
  5180. SHSTDAPI SHRevokeDragDrop(HWND hwnd);
  5181. // DOC'ed for DOJ compliance
  5182. ;end_internal
  5183. SHSTDAPI SHDoDragDrop(HWND hwnd, IDataObject *pdata, IDropSource *pdsrc, DWORD dwEffect, DWORD *pdwEffect);
  5184. ;begin_internal
  5185. //===========================================================================
  5186. // office 9 pluggable UI
  5187. //===========================================================================
  5188. #define PUI_OFFICE_COMMAND (WM_USER + 0x901)
  5189. #define PLUGUI_CMD_SHUTDOWN 0 // wParam value
  5190. #define PLUGUI_CMD_QUERY 1 // wParam value
  5191. #define OFFICE_VERSION_9 9 // standardized value to return for Office 9 apps
  5192. typedef struct _PLUGUI_INFO
  5193. {
  5194. unsigned uMajorVersion : 8; // Used to indicate App's major version number
  5195. unsigned uOleServer : 1; // BOOL, TRUE if this is an OLE process
  5196. unsigned uUnused : 23; // not used
  5197. } PLUGUI_INFO;
  5198. typedef union _PLUGUI_QUERY
  5199. {
  5200. UINT uQueryVal;
  5201. PLUGUI_INFO PlugUIInfo;
  5202. } PLUGUI_QUERY;
  5203. //===========================================================================
  5204. // Image dragging API (definitely private)
  5205. //===========================================================================
  5206. // DOC'ed for DOJ Compliance
  5207. ;end_internal
  5208. // stuff for doing auto scrolling
  5209. #define NUM_POINTS 3
  5210. typedef struct { // asd
  5211. int iNextSample;
  5212. DWORD dwLastScroll;
  5213. BOOL bFull;
  5214. POINT pts[NUM_POINTS];
  5215. DWORD dwTimes[NUM_POINTS];
  5216. } AUTO_SCROLL_DATA;
  5217. ;begin_internal
  5218. //Contains the drag context header.
  5219. // Must be pack1 since it's persisted into a stream that travels between ;internal
  5220. // processes. ;internal
  5221. typedef struct {
  5222. BOOL fImage;
  5223. BOOL fLayered;
  5224. POINT ptOffset;
  5225. } DragContextHeader;
  5226. #define DAD_InitScrollData(pad) (pad)->bFull = FALSE, (pad)->iNextSample = 0, (pad)->dwLastScroll = 0
  5227. // DOC'ed for DOJ Compliance
  5228. ;end_internal
  5229. SHSTDAPI_(BOOL) DAD_SetDragImage(HIMAGELIST him, POINT * pptOffset);
  5230. ;begin_internal
  5231. SHSTDAPI_(BOOL) DAD_DragEnter(HWND hwndTarget);
  5232. // DOC'ed for DOJ Compliance
  5233. ;end_internal
  5234. SHSTDAPI_(BOOL) DAD_DragEnterEx(HWND hwndTarget, const POINT ptStart);
  5235. SHSTDAPI_(BOOL) DAD_DragEnterEx2(HWND hwndTarget, const POINT ptStart, IDataObject *pdtObject);
  5236. SHSTDAPI_(BOOL) DAD_ShowDragImage(BOOL fShow);
  5237. SHSTDAPI_(BOOL) DAD_DragMove(POINT pt);
  5238. SHSTDAPI_(BOOL) DAD_DragLeave(void);
  5239. SHSTDAPI_(BOOL) DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *pad, const POINT *pptNow);
  5240. SHSTDAPI_(BOOL) DAD_SetDragImageFromListView(HWND hwndLV, POINT ptOffset); ;internal
  5241. SHSTDAPI_(void) DAD_InvalidateCursors(void); ;internal
  5242. ;begin_internal
  5243. //----------------------------------------------------------------------------
  5244. // CABINETSTATE holds the global configuration for the Explorer and its cohorts.
  5245. //
  5246. // Originally the cLength was an 'int', it is now two words, allowing us to
  5247. // specify a version number.
  5248. //----------------------------------------------------------------------------
  5249. // DOC'ed for DOJ Compliance
  5250. ;end_internal
  5251. typedef struct {
  5252. WORD cLength;
  5253. WORD nVersion;
  5254. BOOL fFullPathTitle : 1;
  5255. BOOL fSaveLocalView : 1;
  5256. BOOL fNotShell : 1;
  5257. BOOL fSimpleDefault : 1;
  5258. BOOL fDontShowDescBar : 1;
  5259. BOOL fNewWindowMode : 1;
  5260. BOOL fShowCompColor : 1; // NT: Show compressed volumes in a different colour
  5261. BOOL fDontPrettyNames : 1; // NT: Do 8.3 name conversion, or not!
  5262. BOOL fAdminsCreateCommonGroups : 1; // NT: Administrators create comon groups
  5263. UINT fUnusedFlags : 7;
  5264. UINT fMenuEnumFilter;
  5265. } CABINETSTATE, * LPCABINETSTATE;
  5266. #define CABINETSTATE_VERSION 2
  5267. // APIs for reading and writing the cabinet state.
  5268. SHSTDAPI_(BOOL) ReadCabinetState( LPCABINETSTATE lpState, int iSize );
  5269. SHSTDAPI_(BOOL) WriteCabinetState( LPCABINETSTATE lpState );
  5270. ;begin_internal
  5271. // RUN FILE RETURN values from notify message
  5272. #define RFR_NOTHANDLED 0
  5273. #define RFR_SUCCESS 1
  5274. #define RFR_FAILURE 2
  5275. #define PathGetExtensionORD 158
  5276. SHSTDAPI_(LPTSTR) PathGetExtension(LPCTSTR pszPath, LPTSTR pszExtension, int cchExt);
  5277. // DOC'ed for DOJ Compliance
  5278. ;end_internal
  5279. SHSTDAPI_(BOOL) PathMakeUniqueName(LPWSTR pszUniqueName, UINT cchMax, LPCWSTR pszTemplate, LPCWSTR pszLongPlate, LPCWSTR pszDir);
  5280. ;begin_internal
  5281. SHSTDAPI_(BOOL) PathGetShortName(LPCTSTR pszLongName, LPTSTR pszShortName, UINT cbShortName);
  5282. SHSTDAPI_(BOOL) PathGetLongName(LPCTSTR pszShortName, LPTSTR pszLongName, UINT cbLongName);
  5283. SHSTDAPI_(BOOL) PathDirectoryExists(LPCTSTR pszDir);
  5284. // DOC'ed for DOJ Compliance
  5285. ;end_internal
  5286. SHSTDAPI_(void) PathQualify(LPWSTR psz);
  5287. ;begin_internal
  5288. SHSTDAPI_(LPTSTR) PathGetNextComponent(LPCTSTR pszPath, LPTSTR pszComponent);
  5289. // DOC'ed for DOJ Compliance
  5290. ;end_internal
  5291. SHSTDAPI_(BOOL) PathIsExe(LPCWSTR pszPath);
  5292. ;begin_internal
  5293. SHSTDAPI_(BOOL) PathIsEqualOrSubFolder(LPCTSTR pszFolder, LPCTSTR pszSubFolder);
  5294. // DOC'ed for DOJ Compliance
  5295. ;end_internal
  5296. SHSTDAPI_(BOOL) PathIsSlow%(LPCTSTR% pszFile, DWORD dwAttr);
  5297. ;begin_internal
  5298. SHSTDAPI_(BOOL) PathIsTemporary%(LPCTSTR% pszPath);
  5299. // DOC'ed for DOJ Compliance
  5300. ;end_internal
  5301. //
  5302. // Return codes from PathCleanupSpec. Negative return values are
  5303. // unrecoverable errors
  5304. //
  5305. #define PCS_FATAL 0x80000000
  5306. #define PCS_REPLACEDCHAR 0x00000001
  5307. #define PCS_REMOVEDCHAR 0x00000002
  5308. #define PCS_TRUNCATED 0x00000004
  5309. #define PCS_PATHTOOLONG 0x00000008 // Always combined with FATAL
  5310. SHSTDAPI_(int) PathCleanupSpec(LPCWSTR pszDir, LPWSTR pszSpec);
  5311. ;begin_internal
  5312. SHSTDAPI_(int) PathCleanupSpecEx(LPCTSTR pszDir, LPTSTR pszSpec);
  5313. // DOC'ed for DOJ Compliance
  5314. ;end_internal
  5315. SHSTDAPI_(int) PathResolve(LPWSTR pszPath, LPCWSTR dirs[], UINT fFlags);
  5316. ;begin_internal
  5317. SHSTDAPI_(BOOL) ParseField(LPCTSTR szData, int n, LPTSTR szBuf, int iBufLen);
  5318. // Needed for RunFileDlg
  5319. #define RFD_NOBROWSE 0x00000001
  5320. #define RFD_NODEFFILE 0x00000002
  5321. #define RFD_USEFULLPATHDIR 0x00000004
  5322. #define RFD_NOSHOWOPEN 0x00000008
  5323. #define RFD_WOW_APP 0x00000010
  5324. #define RFD_NOSEPMEMORY_BOX 0x00000020
  5325. SHSTDAPI_(int) RunFileDlg(HWND hwnd, HICON hIcon, LPCTSTR pszWorkingDir, LPCTSTR pszTitle,
  5326. LPCTSTR pszPrompt, DWORD dwFlags);
  5327. // DOC'ed for DOJ Compliance
  5328. ;end_internal
  5329. SHSTDAPI_(BOOL) GetFileNameFromBrowse(HWND hwnd, LPWSTR pszFilePath, UINT cbFilePath,
  5330. LPCWSTR pszWorkingDir, LPCWSTR pszDefExt, LPCWSTR pszFilters, LPCWSTR pszTitle);
  5331. SHSTDAPI_(int) DriveType(int iDrive);
  5332. ;begin_internal
  5333. SHSTDAPI_(int) RealDriveTypeFlags(int iDrive, BOOL fOKToHitNet);
  5334. // DOC'ed for DOJ compliance
  5335. ;end_internal
  5336. SHSTDAPI_(int) RealDriveType(int iDrive, BOOL fOKToHitNet);
  5337. ;begin_internal
  5338. SHSTDAPI_(void) InvalidateDriveType(int iDrive);
  5339. // DOC'ed for DOJ Compliance
  5340. ;end_internal
  5341. SHSTDAPI_(int) IsNetDrive(int iDrive);
  5342. ;begin_internal
  5343. //
  5344. // Constants used for dwNumFmtFlags argument in Int64ToString and LargeIntegerToString.
  5345. //
  5346. #define NUMFMT_IDIGITS 0x00000001
  5347. #define NUMFMT_ILZERO 0x00000002
  5348. #define NUMFMT_SGROUPING 0x00000004
  5349. #define NUMFMT_SDECIMAL 0x00000008
  5350. #define NUMFMT_STHOUSAND 0x00000010
  5351. #define NUMFMT_INEGNUMBER 0x00000020
  5352. #define NUMFMT_ALL 0xFFFFFFFF
  5353. SHSTDAPI_(int) LargeIntegerToString(LARGE_INTEGER *pN, LPTSTR szOutStr, UINT nSize, BOOL bFormat, NUMBERFMT *pFmt, DWORD dwNumFmtFlags);
  5354. SHSTDAPI_(int) Int64ToString(_int64 n, LPTSTR szOutStr, UINT nSize, BOOL bFormat, NUMBERFMT *pFmt, DWORD dwNumFmtFlags);
  5355. //-------- drive type identification --------------
  5356. // iDrive drive index (0=A, 1=B, ...)
  5357. //
  5358. #define DRIVE_CDROM 5 // extended DriveType() types
  5359. #define DRIVE_RAMDRIVE 6
  5360. #define DRIVE_TYPE 0x000F // type masek
  5361. #define DRIVE_SLOW 0x0010 // drive is on a slow link
  5362. #define DRIVE_LFN 0x0020 // drive supports LFNs
  5363. #define DRIVE_AUTORUN 0x0040 // drive has AutoRun.inf in root.
  5364. #define DRIVE_AUDIOCD 0x0080 // drive is a AudioCD
  5365. #define DRIVE_AUTOOPEN 0x0100 // should *always* auto open on insert
  5366. #define DRIVE_NETUNAVAIL 0x0200 // Network drive that is not available
  5367. #define DRIVE_SHELLOPEN 0x0400 // should auto open on insert, if shell has focus
  5368. #define DRIVE_SECURITY 0x0800 // Supports ACLs
  5369. #define DRIVE_COMPRESSED 0x1000 // Root of volume is compressed
  5370. #define DRIVE_ISCOMPRESSIBLE 0x2000 // Drive supports compression (not nescesarrily compressed)
  5371. #define DRIVE_DVD 0x4000 // drive is a DVD
  5372. #define DriveTypeFlags(iDrive) DriveType('A' + (iDrive))
  5373. #define DriveIsSlow(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_SLOW)
  5374. #define DriveIsLFN(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_LFN)
  5375. #define DriveIsAutoRun(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_AUTORUN)
  5376. #define DriveIsAutoOpen(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_AUTOOPEN)
  5377. #define DriveIsShellOpen(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_SHELLOPEN)
  5378. #define DriveIsAudioCD(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_AUDIOCD)
  5379. #define DriveIsNetUnAvail(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_NETUNAVAIL)
  5380. #define DriveIsSecure(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_SECURITY)
  5381. #define DriveIsCompressed(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_COMPRESSED)
  5382. #define DriveIsCompressible(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_ISCOMPRESSIBLE)
  5383. #define DriveIsDVD(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_DVD)
  5384. #define IsCDRomDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_CDROM)
  5385. #define IsRamDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_RAMDRIVE)
  5386. #define IsRemovableDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_REMOVABLE)
  5387. #define IsRemoteDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_REMOTE)
  5388. //
  5389. // For SHCreateDefClassObject
  5390. //
  5391. typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown *pUnkOuter, REFIID riid, void **ppvObject);
  5392. SHSTDAPI SHCreateDefClassObject(REFIID riid, void **ppv, LPFNCREATEINSTANCE lpfn, UINT *pcRefDll, REFIID riidInstance);
  5393. // DOC'ed for DOJ compliance
  5394. ;end_internal
  5395. // Flags for Shell_MergeMenus
  5396. #define MM_ADDSEPARATOR 0x00000001L
  5397. #define MM_SUBMENUSHAVEIDS 0x00000002L
  5398. #define MM_DONTREMOVESEPS 0x00000004L
  5399. SHSTDAPI_(UINT) Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
  5400. ;begin_internal
  5401. typedef HANDLE HNRES; // for SHGetNetResource
  5402. SHSTDAPI_(UINT) SHGetNetResource(HNRES hnres, UINT iItem, LPNETRESOURCE pnres, UINT cbMax);
  5403. ;end_internal
  5404. /*
  5405. * The SHObjectProperties API provides an easy way to invoke
  5406. * the Properties context menu command on shell objects.
  5407. *
  5408. * PARAMETERS
  5409. *
  5410. * hwnd The window handle of the window which will own the dialog
  5411. * dwType A SHOP_ value as defined below
  5412. * lpObject Name of the object, see SHOP_ values below
  5413. * lpPage The name of the property sheet page to open to or NULL.
  5414. *
  5415. * RETURN
  5416. *
  5417. * TRUE if the Properties command was invoked
  5418. */
  5419. SHSTDAPI_(BOOL) SHObjectProperties(HWND hwnd, DWORD dwType, LPCWSTR lpObject, LPCWSTR lpPage);
  5420. #define SHOP_PRINTERNAME 0x00000001 // lpObject points to a printer friendly name
  5421. #define SHOP_FILEPATH 0x00000002 // lpObject points to a fully qualified path+file name
  5422. #define SHOP_VOLUMEGUID 0x00000004 // lpObject points to a Volume GUID
  5423. ;begin_internal
  5424. #define SHOP_TYPEMASK 0x00000007
  5425. #define SHOP_MODAL 0x80000000
  5426. ;end_internal
  5427. /*
  5428. * The SHFormatDrive API provides access to the Shell
  5429. * format dialog. This allows apps which want to format disks
  5430. * to bring up the same dialog that the Shell does to do it.
  5431. *
  5432. * This dialog is not sub-classable. You cannot put custom
  5433. * controls in it. If you want this ability, you will have
  5434. * to write your own front end for the DMaint_FormatDrive
  5435. * engine.
  5436. *
  5437. * NOTE that the user can format as many diskettes in the specified
  5438. * drive, or as many times, as he/she wishes to. There is no way to
  5439. * force any specififc number of disks to format. If you want this
  5440. * ability, you will have to write your own front end for the
  5441. * DMaint_FormatDrive engine.
  5442. *
  5443. * NOTE also that the format will not start till the user pushes the
  5444. * start button in the dialog. There is no way to do auto start. If
  5445. * you want this ability, you will have to write your own front end
  5446. * for the DMaint_FormatDrive engine.
  5447. *
  5448. * PARAMETERS
  5449. *
  5450. * hwnd = The window handle of the window which will own the dialog
  5451. * NOTE that unlike SHCheckDrive, hwnd == NULL does not cause
  5452. * this dialog to come up as a "top level application" window.
  5453. * This parameter should always be non-null, this dialog is
  5454. * only designed to be the child of another window, not a
  5455. * stand-alone application.
  5456. * drive = The 0 based (A: == 0) drive number of the drive to format
  5457. * fmtID = The ID of the physical format to format the disk with
  5458. * NOTE: The special value SHFMT_ID_DEFAULT means "use the
  5459. * default format specified by the DMaint_FormatDrive
  5460. * engine". If you want to FORCE a particular format
  5461. * ID "up front" you will have to call
  5462. * DMaint_GetFormatOptions yourself before calling
  5463. * this to obtain the valid list of phys format IDs
  5464. * (contents of the PhysFmtIDList array in the
  5465. * FMTINFOSTRUCT).
  5466. * options = There is currently only two option bits defined
  5467. *
  5468. * SHFMT_OPT_FULL
  5469. * SHFMT_OPT_SYSONLY
  5470. *
  5471. * The normal defualt in the Shell format dialog is
  5472. * "Quick Format", setting this option bit indicates that
  5473. * the caller wants to start with FULL format selected
  5474. * (this is useful for folks detecting "unformatted" disks
  5475. * and wanting to bring up the format dialog).
  5476. *
  5477. * The SHFMT_OPT_SYSONLY initializes the dialog to
  5478. * default to just sys the disk.
  5479. *
  5480. * All other bits are reserved for future expansion and
  5481. * must be 0.
  5482. *
  5483. * Please note that this is a bit field and not a value
  5484. * and treat it accordingly.
  5485. *
  5486. * RETURN
  5487. * The return is either one of the SHFMT_* values, or if the
  5488. * returned DWORD value is not == to one of these values, then
  5489. * the return is the physical format ID of the last succesful
  5490. * format. The LOWORD of this value can be passed on subsequent
  5491. * calls as the fmtID parameter to "format the same type you did
  5492. * last time".
  5493. *
  5494. */
  5495. SHSTDAPI_(DWORD) SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options);
  5496. ;begin_internal
  5497. SHSTDAPI_(DWORD) SHChkDskDrive(HWND hwnd, UINT drive);
  5498. // DOC'ed for DOJ compliance
  5499. ;end_internal
  5500. //
  5501. // Special value of fmtID which means "use the default format"
  5502. //
  5503. #define SHFMT_ID_DEFAULT 0xFFFF
  5504. //
  5505. // Option bits for options parameter
  5506. //
  5507. #define SHFMT_OPT_FULL 0x0001
  5508. #define SHFMT_OPT_SYSONLY 0x0002
  5509. //
  5510. // Special return values. PLEASE NOTE that these are DWORD values.
  5511. //
  5512. #define SHFMT_ERROR 0xFFFFFFFFL // Error on last format, drive may be formatable
  5513. #define SHFMT_CANCEL 0xFFFFFFFEL // Last format was canceled
  5514. #define SHFMT_NOFORMAT 0xFFFFFFFDL // Drive is not formatable
  5515. ;begin_internal
  5516. //====== SEMI-PRIVATE API ===============================
  5517. // DOC'ed for DOJ compliance
  5518. ;end_internal
  5519. #ifndef HPSXA_DEFINED
  5520. #define HPSXA_DEFINED
  5521. DECLARE_HANDLE( HPSXA );
  5522. #endif
  5523. WINSHELLAPI HPSXA SHCreatePropSheetExtArray( HKEY hKey, LPCWSTR pszSubKey, UINT max_iface );
  5524. WINSHELLAPI void SHDestroyPropSheetExtArray( HPSXA hpsxa );
  5525. WINSHELLAPI UINT SHAddFromPropSheetExtArray( HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam );
  5526. WINSHELLAPI UINT SHReplaceFromPropSheetExtArray( HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam );
  5527. ;begin_internal
  5528. WINSHELLAPI HPSXA SHCreatePropSheetExtArrayEx( HKEY hKey, LPCTSTR pszSubKey, UINT max_iface, IDataObject * pdo );
  5529. //====== SEMI-PRIVATE API ORDINALS ===============================
  5530. // This is the list of semi-private ordinals we semi-publish.
  5531. #define SHGetNetResourceORD 69
  5532. #define SHObjectPropertiesORD 178
  5533. #define SHAddFromPropSheetExtArrayORD 167
  5534. #define SHCreatePropSheetExtArrayORD 168
  5535. #define SHDestroyPropSheetExtArrayORD 169
  5536. #define SHReplaceFromPropSheetExtArrayORD 170
  5537. #define SHCreateDefClassObjectORD 70
  5538. #define SHEXP_SHGETNETRESOURCE MAKEINTRESOURCE(SHGetNetResourceORD)
  5539. #define SHEXP_SHADDFROMPROPSHEETEXTARRAY MAKEINTRESOURCE(SHAddFromPropSheetExtArrayORD)
  5540. #define SHEXP_SHCREATEPROPSHEETEXTARRAY MAKEINTRESOURCE(SHCreatePropSheetExtArrayORD)
  5541. #define SHEXP_SHDESTROYPROPSHEETEXTARRAY MAKEINTRESOURCE(SHDestroyPropSheetExtArrayORD)
  5542. #define SHEXP_SHREPLACEFROMPROPSHEETEXTARRAY MAKEINTRESOURCE(SHReplaceFromPropSheetExtArrayORD)
  5543. #define SHEXP_SHCREATEDEFCLASSOBJECT MAKEINTRESOURCE(SHCreateDefClassObjectORD)
  5544. // This avoids duplicate definition problems in the net\config project
  5545. // which defines *some* of its own PIDL utility functions, but depends on
  5546. // us for others (ILClone())
  5547. // DOC'ed for DOJ Compliance
  5548. ;end_internal
  5549. SHSTDAPI_(LPITEMIDLIST) ILClone(LPCITEMIDLIST pidl);
  5550. ;begin_internal
  5551. #ifndef AVOID_NET_CONFIG_DUPLICATES
  5552. //===========================================================================
  5553. // ITEMIDLIST
  5554. //===========================================================================
  5555. // flags for ILGetDisplayNameEx
  5556. #define ILGDN_FULLNAME 0
  5557. #define ILGDN_ITEMONLY 1
  5558. #define ILGDN_INFOLDER 2
  5559. // DOC'ed for DOJ Compliance
  5560. ;end_internal
  5561. SHSTDAPI_(LPITEMIDLIST) ILGetNext(LPCITEMIDLIST pidl);
  5562. SHSTDAPI_(UINT) ILGetSize(LPCITEMIDLIST pidl);
  5563. SHSTDAPI_(LPITEMIDLIST) ILFindLastID(LPCITEMIDLIST pidl);
  5564. SHSTDAPI_(BOOL) ILRemoveLastID(LPITEMIDLIST pidl);
  5565. ;begin_internal
  5566. #define ILIsEmpty(pidl) ((pidl) == NULL || (pidl)->mkid.cb==0)
  5567. SHSTDAPI_(LPITEMIDLIST) ILCreate(void);
  5568. // DOC'ed for DOJ Compliance
  5569. ;end_internal
  5570. SHSTDAPI_(LPITEMIDLIST) ILAppendID(LPITEMIDLIST pidl, LPCSHITEMID pmkid, BOOL fAppend);
  5571. SHSTDAPI_(void) ILFree(LPITEMIDLIST pidl);
  5572. ;begin_internal
  5573. SHSTDAPI_(void) ILGlobalFree(LPITEMIDLIST pidl);
  5574. SHSTDAPI_(BOOL) ILGetDisplayName(LPCITEMIDLIST pidl, LPTSTR pszName);
  5575. SHSTDAPI_(BOOL) ILGetDisplayNameEx(IShellFolder *psfRoot, LPCITEMIDLIST pidl, LPTSTR pszName, int fType);
  5576. // DOC'ed for DOJ Compliance
  5577. ;end_internal
  5578. SHSTDAPI_(LPITEMIDLIST) ILCloneFirst(LPCITEMIDLIST pidl);
  5579. ;begin_internal
  5580. SHSTDAPI_(LPITEMIDLIST) ILGlobalClone(LPCITEMIDLIST pidl);
  5581. // DOC'ed for DOJ Compliance
  5582. ;end_internal
  5583. SHSTDAPI_(BOOL) ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  5584. SHSTDAPI_(BOOL) ILIsParent(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, BOOL fImmediate);
  5585. SHSTDAPI_(LPITEMIDLIST) ILFindChild(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild);
  5586. SHSTDAPI_(LPITEMIDLIST) ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  5587. SHSTDAPI ILLoadFromStream(IStream *pstm, LPITEMIDLIST *pidl);
  5588. SHSTDAPI ILSaveToStream(IStream *pstm, LPCITEMIDLIST pidl);
  5589. ;begin_internal
  5590. SHSTDAPI ILLoadFromFile(HFILE hfile, LPITEMIDLIST *pidl);
  5591. SHSTDAPI ILSaveToFile(HFILE hfile, LPCITEMIDLIST pidl);
  5592. // DOC'ed for DOJ Compliance
  5593. ;end_internal
  5594. #if (_WIN32_IE >= 0x0400)
  5595. SHSTDAPI_(LPITEMIDLIST) ILCreateFromPathA(LPCSTR pszPath);
  5596. SHSTDAPI_(LPITEMIDLIST) ILCreateFromPathW(LPCWSTR pszPath);
  5597. #ifdef NO_WRAPPERS_FOR_ILCREATEFROMPATH
  5598. SHSTDAPI_(LPITEMIDLIST) ILCreateFromPath(LPCTSTR pszPath);
  5599. #else
  5600. #ifdef UNICODE
  5601. #define ILCreateFromPath ILCreateFromPathW
  5602. #else
  5603. #define ILCreateFromPath ILCreateFromPathA
  5604. #endif // !UNICODE
  5605. #endif
  5606. #endif
  5607. SHSTDAPI SHILCreateFromPath(LPCWSTR szPath, LPITEMIDLIST *ppidl, DWORD *rgfInOut);
  5608. ;begin_internal
  5609. // helper macros
  5610. #define ILCreateFromID(pmkid) ILAppendID(NULL, pmkid, TRUE)
  5611. #endif // AVOID_NET_CONFIG_DUPLICATES
  5612. // WARNING: this interface is not supported on the current platform, just downlevel
  5613. ;end_internal
  5614. #undef INTERFACE
  5615. #define INTERFACE IDefViewFrame
  5616. DECLARE_INTERFACE_(IDefViewFrame, IUnknown)
  5617. {
  5618. // *** IUnknown methods ***
  5619. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  5620. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  5621. STDMETHOD_(ULONG,Release) (THIS) PURE;
  5622. // *** IDefViewFrame methods ***
  5623. STDMETHOD(GetWindowLV) (THIS_ HWND * phwnd) PURE;
  5624. STDMETHOD(ReleaseWindowLV) (THIS) PURE;
  5625. STDMETHOD(GetShellFolder)(THIS_ IShellFolder **ppsf) PURE;
  5626. };
  5627. ;begin_internal
  5628. #undef INTERFACE
  5629. #define INTERFACE IWebViewOCWinMan
  5630. DECLARE_INTERFACE_(IWebViewOCWinMan, IUnknown)
  5631. {
  5632. // *** IUnknown methods ***
  5633. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  5634. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  5635. STDMETHOD_(ULONG,Release) (THIS) PURE;
  5636. // *** IWebViewOCWinMan methods ***
  5637. STDMETHOD(SwapWindow) (THIS_ HWND hwndLV, IWebViewOCWinMan **pocWinMan) PURE;
  5638. };
  5639. // DOC'ed for DOJ compliance
  5640. ;end_internal
  5641. //===========================================================================
  5642. // Shell restrictions. (Parameter for SHRestricted)
  5643. typedef enum RESTRICTIONS
  5644. {
  5645. ;begin_internal
  5646. // Classic Win95 policy bits. Do NOT add any more bits in
  5647. // this range. See the ranges below to add new policies.
  5648. // | |
  5649. // v v
  5650. ;end_internal
  5651. REST_NONE = 0x00000000,
  5652. REST_NORUN = 0x00000001,
  5653. REST_NOCLOSE = 0x00000002,
  5654. REST_NOSAVESET = 0x00000004,
  5655. REST_NOFILEMENU = 0x00000008,
  5656. REST_NOSETFOLDERS = 0x00000010,
  5657. REST_NOSETTASKBAR = 0x00000020,
  5658. REST_NODESKTOP = 0x00000040,
  5659. REST_NOFIND = 0x00000080,
  5660. REST_NODRIVES = 0x00000100,
  5661. REST_NODRIVEAUTORUN = 0x00000200,
  5662. REST_NODRIVETYPEAUTORUN = 0x00000400,
  5663. REST_NONETHOOD = 0x00000800,
  5664. REST_STARTBANNER = 0x00001000,
  5665. REST_RESTRICTRUN = 0x00002000,
  5666. REST_NOPRINTERTABS = 0x00004000,
  5667. REST_NOPRINTERDELETE = 0x00008000,
  5668. REST_NOPRINTERADD = 0x00010000,
  5669. REST_NOSTARTMENUSUBFOLDERS = 0x00020000,
  5670. REST_MYDOCSONNET = 0x00040000,
  5671. REST_NOEXITTODOS = 0x00080000,
  5672. REST_ENFORCESHELLEXTSECURITY = 0x00100000,
  5673. REST_LINKRESOLVEIGNORELINKINFO = 0x00200000,
  5674. REST_NOCOMMONGROUPS = 0x00400000,
  5675. REST_SEPARATEDESKTOPPROCESS = 0x00800000,
  5676. REST_NOWEB = 0x01000000,
  5677. REST_NOTRAYCONTEXTMENU = 0x02000000,
  5678. REST_NOVIEWCONTEXTMENU = 0x04000000,
  5679. REST_NONETCONNECTDISCONNECT = 0x08000000,
  5680. REST_STARTMENULOGOFF = 0x10000000,
  5681. REST_NOSETTINGSASSIST = 0x20000000,
  5682. ;begin_internal
  5683. // Values starting at 4000001 are treated as raw INTs. New
  5684. // *shell-specific* policies (NOT browser policies) should
  5685. // be added in this range. Use SHRestricted() with these bits.
  5686. // | |
  5687. // v v
  5688. ;end_internal
  5689. REST_NOINTERNETICON = 0x40000001,
  5690. REST_NORECENTDOCSHISTORY = 0x40000002,
  5691. REST_NORECENTDOCSMENU = 0x40000003,
  5692. REST_NOACTIVEDESKTOP = 0x40000004,
  5693. REST_NOACTIVEDESKTOPCHANGES = 0x40000005,
  5694. REST_NOFAVORITESMENU = 0x40000006,
  5695. REST_CLEARRECENTDOCSONEXIT = 0x40000007,
  5696. REST_CLASSICSHELL = 0x40000008,
  5697. REST_NOCUSTOMIZEWEBVIEW = 0x40000009,
  5698. REST_NOHTMLWALLPAPER = 0x40000010,
  5699. REST_NOCHANGINGWALLPAPER = 0x40000011,
  5700. REST_NODESKCOMP = 0x40000012,
  5701. REST_NOADDDESKCOMP = 0x40000013,
  5702. REST_NODELDESKCOMP = 0x40000014,
  5703. REST_NOCLOSEDESKCOMP = 0x40000015,
  5704. REST_NOCLOSE_DRAGDROPBAND = 0x40000016, // Disable Close and Drag & Drop on ALL Bands
  5705. REST_NOMOVINGBAND = 0x40000017, // Disable Moving ALL Bands
  5706. REST_NOEDITDESKCOMP = 0x40000018,
  5707. REST_NORESOLVESEARCH = 0x40000019,
  5708. REST_NORESOLVETRACK = 0x4000001A,
  5709. REST_FORCECOPYACLWITHFILE = 0X4000001B,
  5710. REST_NOLOGO3CHANNELNOTIFY = 0x4000001C,
  5711. REST_NOFORGETSOFTWAREUPDATE = 0x4000001D,
  5712. REST_NOSETACTIVEDESKTOP = 0x4000001E, // No Active desktop on Settings Menu
  5713. REST_NOUPDATEWINDOWS = 0x4000001F, // No Windows Update on Settings Menu
  5714. REST_NOCHANGESTARMENU = 0x40000020, // No Context menu or Drag and Drop on Start menu
  5715. REST_NOFOLDEROPTIONS = 0x40000021, // No Folder Options on Settings Menu
  5716. REST_HASFINDCOMPUTERS = 0x40000022, // Show Start/Search/Computers
  5717. REST_INTELLIMENUS = 0x40000023,
  5718. REST_RUNDLGMEMCHECKBOX = 0x40000024,
  5719. REST_ARP_ShowPostSetup = 0x40000025, // ARP: Show Post-Setup page
  5720. REST_NOCSC = 0x40000026, // Disable the ClientSide caching on SM
  5721. REST_NOCONTROLPANEL = 0x40000027, // Remove the Control Panel only from SM|Settings
  5722. REST_ENUMWORKGROUP = 0x40000028, // Enumerate workgroup in root of nethood
  5723. REST_ARP_NOARP = 0x40000029, // ARP: Don't Allow ARP to come up at all
  5724. REST_ARP_NOREMOVEPAGE = 0x4000002A, // ARP: Don't allow Remove page
  5725. REST_ARP_NOADDPAGE = 0x4000002B, // ARP: Don't allow Add page
  5726. REST_ARP_NOWINSETUPPAGE = 0x4000002C, // ARP: Don't allow opt components page
  5727. REST_GREYMSIADS = 0x4000002D, // SM: Allow the greying of Darwin Ads in SM
  5728. REST_NOCHANGEMAPPEDDRIVELABEL = 0x4000002E, // Don't enable the UI which allows users to rename mapped drive labels
  5729. REST_NOCHANGEMAPPEDDRIVECOMMENT = 0x4000002F, // Don't enable the UI which allows users to change mapped drive comments
  5730. REST_MaxRecentDocs = 0x40000030,
  5731. REST_NONETWORKCONNECTIONS = 0x40000031, // No Start Menu | Settings |Network Connections
  5732. REST_FORCESTARTMENULOGOFF = 0x40000032, // Force logoff on the Start Menu
  5733. REST_NOWEBVIEW = 0x40000033, // Disable Web View
  5734. REST_NOCUSTOMIZETHISFOLDER = 0x40000034, // Disable Customize This Folder
  5735. REST_NOENCRYPTION = 0x40000035, // Don't allow file encryption
  5736. // Do NOT use me 0x40000036,
  5737. REST_DONTSHOWSUPERHIDDEN = 0x40000037, // don't show super hidden files
  5738. REST_NOSHELLSEARCHBUTTON = 0x40000038,
  5739. REST_NOHARDWARETAB = 0x40000039, // No Hardware tab on Drives or in control panel
  5740. REST_NORUNASINSTALLPROMPT = 0x4000003A, // Don't bring up "Run As" prompt for install programs
  5741. REST_PROMPTRUNASINSTALLNETPATH = 0x4000003B, // Force the "Run As" prompt for install programs on unc/network shares
  5742. REST_NOMANAGEMYCOMPUTERVERB = 0x4000003C, // No Manage verb on My Computer
  5743. REST_NORECENTDOCSNETHOOD = 0x4000003D, // dont add the recent docs shares to nethood
  5744. REST_DISALLOWRUN = 0x4000003E, // don't allow certain apps to be run
  5745. REST_NOWELCOMESCREEN = 0x4000003F, // don't allow the welcome screen to be displayed.
  5746. REST_RESTRICTCPL = 0x40000040, // only allow certain cpls to be run
  5747. REST_DISALLOWCPL = 0x40000041, // don't allow certain cpls to be run
  5748. REST_NOSMBALLOONTIP = 0x40000042, // No Start Menu Balloon Tip
  5749. REST_NOSMHELP = 0x40000043, // No Help on the Start Menu
  5750. REST_NOWINKEYS = 0x40000044, // No Windows-X Hot keys
  5751. REST_NOENCRYPTONMOVE = 0x40000045, // Don't automatically try to encrypt files that are moved to encryped directories
  5752. REST_NOLOCALMACHINERUN = 0x40000046, // ignore HKLM\sw\ms\win\cv\Run and all of it's sub keys
  5753. REST_NOCURRENTUSERRUN = 0x40000047, // ignore HKCU\sw\ms\win\cv\Run and all of it's sub keys
  5754. REST_NOLOCALMACHINERUNONCE = 0x40000048, // ignore HKLM\sw\ms\win\cv\RunOnce and all of it's sub keys
  5755. REST_NOCURRENTUSERRUNONCE = 0x40000049, // ignore HKCU\sw\ms\win\cv\RunOnce and all of it's sub keys
  5756. REST_FORCEACTIVEDESKTOPON = 0x4000004A, // Force ActiveDesktop to be turned ON all the time.
  5757. REST_NOCOMPUTERSNEARME = 0x4000004B, // removes the "Computers near me" link
  5758. REST_NOVIEWONDRIVE = 0x4000004C, // disallows CreateViewObject() on specified drives (CFSFolder only)
  5759. REST_NONETCRAWL = 0x4000004D, // disables the crawling of the WNet namespace.
  5760. REST_NOSHAREDDOCUMENTS = 0x4000004E, // don't auto share the Shared Documents/create link
  5761. REST_NOSMMYDOCS = 0x4000004F, // Don't show the My Documents item on the Start Menu.
  5762. REST_NOSMMYPICS = 0x40000050, // Don't show the My Pictures item on the Start Menu
  5763. REST_ALLOWBITBUCKDRIVES = 0x40000051, // Bit mask indicating which which drives have bit bucket support
  5764. REST_NONLEGACYSHELLMODE = 0x40000052, // new consumer shell modes
  5765. REST_NOCONTROLPANELBARRICADE = 0x40000053, // The webview barricade in Control Panel
  5766. REST_NOSTARTPAGE = 0x40000054, // Whistler Start Page on desktop.
  5767. REST_NOAUTOTRAYNOTIFY = 0x40000055, // Whistler auto-tray notify feature
  5768. REST_NOTASKGROUPING = 0x40000056, // Whistler taskbar button grouping feature
  5769. REST_NOCDBURNING = 0x40000057, // whistler cd burning feature
  5770. REST_MYCOMPNOPROP = 0x40000058, // disables Properties on My Computer's context menu
  5771. REST_MYDOCSNOPROP = 0x40000059, // disables Properties on My Documents' context menu
  5772. REST_NOSTARTPANEL = 0x4000005A, // Windows start panel (New start menu) for Whistler.
  5773. REST_NODISPLAYAPPEARANCEPAGE = 0x4000005B, // disable Themes and Appearance tabs in the Display Control Panel.
  5774. REST_NOTHEMESTAB = 0x4000005C, // disable the Themes tab in the Display Control Panel.
  5775. REST_NOVISUALSTYLECHOICE = 0x4000005D, // disable the visual style drop down in the Appearance tab of the Display Control Panel.
  5776. REST_NOSIZECHOICE = 0x4000005E, // disable the size drop down in the Appearance tab of the Display Control Panel.
  5777. REST_NOCOLORCHOICE = 0x4000005F, // disable the color drop down in the Appearance tab of the Display Control Panel.
  5778. REST_SETVISUALSTYLE = 0x40000060, // Load the specified file as the visual style.
  5779. REST_STARTRUNNOHOMEPATH = 0x40000061, // dont use the %HOMEPATH% env var for the Start-Run dialog
  5780. REST_NOUSERNAMEINSTARTPANEL = 0x40000062, // don't show the username is the startpanel.
  5781. REST_NOMYCOMPUTERICON = 0x40000063, // don't show my computer anywhere, hide its contents
  5782. REST_NOSMNETWORKPLACES = 0x40000064, // don't show network places in startpanel.
  5783. REST_NOSMPINNEDLIST = 0x40000065, // don't show the pinned list in startpanel.
  5784. REST_NOSMMYMUSIC = 0x40000066, // don't show MyMusic folder in startpanel
  5785. REST_NOSMEJECTPC = 0x40000067, // don't show "Undoc PC" command in startmenu
  5786. REST_NOSMMOREPROGRAMS = 0x40000068, // don't show "More Programs" button in StartPanel.
  5787. REST_NOSMMFUPROGRAMS = 0x40000069, // don't show the MFU programs list in StartPanel.
  5788. REST_NOTRAYITEMSDISPLAY = 0x4000006A, // disables the display of the system tray
  5789. REST_NOTOOLBARSONTASKBAR = 0x4000006B, // disables toolbar display on the taskbar
  5790. ;begin_internal
  5791. //--- UNUSED -- USE THIS SPACE --- 0x4000006C to 0x4000006E
  5792. ;end_internal
  5793. REST_NOSMCONFIGUREPROGRAMS = 0x4000006F, // No Configure Programs on Settings Menu
  5794. REST_HIDECLOCK = 0x40000070, // don't show the clock
  5795. REST_NOLOWDISKSPACECHECKS = 0x40000071, // disable the low disk space checking
  5796. REST_NOENTIRENETWORK = 0x40000072, // removes the "Entire Network" link (i.e. from "My Network Places")
  5797. REST_NODESKTOPCLEANUP = 0x40000073, // disable the desktop cleanup wizard
  5798. REST_BITBUCKNUKEONDELETE = 0x40000074, // disables recycling of files
  5799. REST_BITBUCKCONFIRMDELETE = 0x40000075, // always show the delete confirmation dialog when deleting files
  5800. REST_BITBUCKNOPROP = 0x40000076, // disables Properties on Recycle Bin's context menu
  5801. REST_NODISPBACKGROUND = 0x40000077, // disables the Desktop tab in the Display CPL
  5802. REST_NODISPSCREENSAVEPG = 0x40000078, // disables the Screen Saver tab in the Display CPL
  5803. REST_NODISPSETTINGSPG = 0x40000079, // disables the Settings tab in the Display CPL
  5804. REST_NODISPSCREENSAVEPREVIEW = 0x4000007A, // disables the screen saver on the Screen Saver tab in the Display CPL
  5805. REST_NODISPLAYCPL = 0x4000007B, // disables the Display CPL
  5806. REST_HIDERUNASVERB = 0x4000007C, // hides the "Run As..." context menu item
  5807. REST_NOTHUMBNAILCACHE = 0x4000007D, // disables use of the thumbnail cache
  5808. REST_NOSTRCMPLOGICAL = 0x4000007E, // dont use StrCmpLogical() instead use default CompareString()
  5809. REST_ALLOWUNHASHEDWEBVIEW = 0x40000082, // allow the user to be promted to accept web view templates that don't already have an md5 hash in the registry
  5810. REST_ALLOWLEGACYWEBVIEW = 0x40000083, // allow legacy webview template to be shown.
  5811. REST_REVERTWEBVIEWSECURITY = 0x40000084, // disable added webview security measures (revert to w2k functionality).
  5812. REST_INHERITCONSOLEHANDLES = 0x40000086, // ShellExec() will check for the current process and target process being console processes to inherit handles
  5813. REST_NODISCONNECT = 0x41000001, // No Disconnect option in Start menu
  5814. REST_NOSECURITY = 0x41000002, // No Security option in start menu
  5815. REST_NOFILEASSOCIATE = 0x41000003, // Do not allow user to change file association
  5816. } RESTRICTIONS;
  5817. ;begin_internal
  5818. // Browser restrictions (parameter for SHRestricted2)
  5819. //
  5820. // The browser restrictions are divided into two ranges, "explorer restrictions" and
  5821. // "infodelivery restrictions". Explorer restrictions are kept under "Software\\Microsoft\\
  5822. // Windows\\CurrentVersion\\Policies\\Explorer," while infodelivery restrictions are kept
  5823. // under "Software\\Policies\\Microsoft\\Internet Explorer\\Infodelivery\\Restrictions."
  5824. //
  5825. // **NOTE**: SHRestricted2 assumes each range is continuous.
  5826. typedef enum {
  5827. // explorer restrictions
  5828. REST_BROWSER_NONE = 0x00000000, // REST_EXPLORER_FIRST
  5829. REST_NOTOOLBARCUSTOMIZE = 0x00000001,
  5830. REST_NOBANDCUSTOMIZE = 0x00000002,
  5831. REST_SMALLICONS = 0x00000003,
  5832. REST_LOCKICONSIZE = 0x00000004,
  5833. REST_SPECIFYDEFAULTBUTTONS = 0x00000005,
  5834. REST_BTN_BACK = 0x00000006,
  5835. REST_BTN_FORWARD = 0x00000007,
  5836. REST_BTN_STOPDOWNLOAD = 0x00000008,
  5837. REST_BTN_REFRESH = 0x00000009,
  5838. REST_BTN_HOME = 0x0000000A,
  5839. REST_BTN_SEARCH = 0x0000000B,
  5840. REST_BTN_HISTORY = 0x0000000C,
  5841. REST_BTN_FAVORITES = 0x0000000D,
  5842. REST_BTN_ALLFOLDERS = 0x0000000E,
  5843. REST_BTN_THEATER = 0x0000000F,
  5844. REST_BTN_TOOLS = 0x00000010,
  5845. REST_BTN_MAIL = 0x00000011,
  5846. REST_BTN_FONTS = 0x00000012,
  5847. REST_BTN_PRINT = 0x00000013,
  5848. REST_BTN_EDIT = 0x00000014,
  5849. REST_BTN_DISCUSSIONS = 0x00000015,
  5850. REST_BTN_CUT = 0x00000016,
  5851. REST_BTN_COPY = 0x00000017,
  5852. REST_BTN_PASTE = 0x00000018,
  5853. REST_BTN_ENCODING = 0x00000019,
  5854. REST_NoUserAssist = 0x0000001A,
  5855. REST_NoWindowsUpdate = 0x0000001B,
  5856. REST_NoExpandedNewMenu = 0x0000001C,
  5857. REST_NOFILEURL = 0x0000001D,
  5858. REST_BTN_PRINTPREVIEW = 0X0000001E,
  5859. REST_BTN_MEDIABAR = 0x0000001F, // REST_EXPLORER_LAST
  5860. // infodelivery restrictions
  5861. REST_NoChannelUI = 0x50000001, // REST_INFO_FIRST
  5862. REST_NoAddingChannels = 0x50000002,
  5863. REST_NoEditingChannels = 0x50000003,
  5864. REST_NoRemovingChannels = 0x50000004,
  5865. REST_NoAddingSubscriptions = 0x50000005,
  5866. REST_NoEditingSubscriptions = 0x50000006,
  5867. REST_NoRemovingSubscriptions = 0x50000007,
  5868. REST_NoChannelLogging = 0x50000008,
  5869. REST_NoManualUpdates = 0x50000009,
  5870. REST_NoScheduledUpdates = 0x5000000A,
  5871. REST_NoUnattendedDialing = 0x5000000B,
  5872. REST_NoChannelContent = 0x5000000C,
  5873. REST_NoSubscriptionContent = 0x5000000D,
  5874. REST_NoEditingScheduleGroups = 0x5000000E,
  5875. REST_MaxChannelSize = 0x5000000F,
  5876. REST_MaxSubscriptionSize = 0x50000010,
  5877. REST_MaxChannelCount = 0x50000011,
  5878. REST_MaxSubscriptionCount = 0x50000012,
  5879. REST_MinUpdateInterval = 0x50000013,
  5880. REST_UpdateExcludeBegin = 0x50000014,
  5881. REST_UpdateExcludeEnd = 0x50000015,
  5882. REST_UpdateInNewProcess = 0x50000016,
  5883. REST_MaxWebcrawlLevels = 0x50000017,
  5884. REST_MaxChannelLevels = 0x50000018,
  5885. REST_NoSubscriptionPasswords = 0x50000019,
  5886. REST_NoBrowserSaveWebComplete = 0x5000001A,
  5887. REST_NoSearchCustomization = 0x5000001B,
  5888. REST_NoSplash = 0x5000001C, // REST_INFO_LAST
  5889. // restrictions ported from SP2
  5890. REST_NoFileOpen = 0x60000001, // REST_BROWSER_FIRST
  5891. REST_NoFileNew = 0x60000002,
  5892. REST_NoBrowserSaveAs = 0x60000003,
  5893. REST_NoBrowserOptions = 0x60000004,
  5894. REST_NoFavorites = 0x60000005,
  5895. REST_NoSelectDownloadDir = 0x60000006,
  5896. REST_NoBrowserContextMenu = 0x60000007,
  5897. REST_NoBrowserClose = 0x60000008,
  5898. REST_NoOpeninNewWnd = 0x60000009,
  5899. REST_NoTheaterMode = 0x6000000A,
  5900. REST_NoFindFiles = 0x6000000B,
  5901. REST_NoViewSource = 0x6000000C,
  5902. REST_GoMenu = 0x6000000D,
  5903. REST_NoToolbarOptions = 0x6000000E,
  5904. REST_NoHelpItem_TipOfTheDay = 0x6000000F,
  5905. REST_NoHelpItem_NetscapeHelp = 0x60000010,
  5906. REST_NoHelpItem_Tutorial = 0x60000011,
  5907. REST_NoHelpItem_SendFeedback = 0x60000012,
  5908. REST_AlwaysPromptWhenDownload = 0x60000013,
  5909. REST_NoNavButtons = 0x60000014,
  5910. REST_NoHelpMenu = 0x60000015,
  5911. REST_NoBrowserBars = 0x60000016,
  5912. REST_NoToolBar = 0x60000017,
  5913. REST_NoAddressBar = 0x60000018,
  5914. REST_NoLinksBar = 0x60000019,
  5915. REST_NoPrinting = 0x60000020,
  5916. REST_No_LaunchMediaBar = 0x60000021,
  5917. REST_No_MediaBarOnlineContent = 0x60000022, // REST_BROWSER_LAST
  5918. } BROWSER_RESTRICTIONS;
  5919. #define REST_EXPLORER_FIRST REST_BROWSER_NONE
  5920. #define REST_EXPLORER_LAST REST_BTN_MEDIABAR
  5921. #define REST_INFO_FIRST REST_NoChannelUI
  5922. #define REST_INFO_LAST REST_NoSplash
  5923. #define REST_BROWSER_FIRST REST_NoFileOpen
  5924. #define REST_BROWSER_LAST REST_No_MediaBarOnlineContent
  5925. // codes for REST_BTN policies
  5926. #define RESTOPT_BTN_STATE_DEFAULT 0 // must be zero, else break browseui\itbar.cpp assumption
  5927. #define RESTOPT_BTN_STATE_VISIBLE 1
  5928. #define RESTOPT_BTN_STATE_HIDDEN 2
  5929. // REST_INTELLIMENUS
  5930. #define RESTOPT_INTELLIMENUS_USER 0
  5931. #define RESTOPT_INTELLIMENUS_DISABLED 1 // Match Restriction assumption: 1 == Off
  5932. #define RESTOPT_INTELLIMENUS_ENABLED 2
  5933. // FTP Exports
  5934. STDAPI IsIEDefautlFTPClient(void);
  5935. STDAPI MakeIEDefautlFTPClient(void);
  5936. STDAPI RestoreFTPClient(void);
  5937. SHSTDAPI_(void) SHSettingsChanged(WPARAM wParam, LPARAM lParam);
  5938. SHSTDAPI_(BOOL) SHIsBadInterfacePtr(LPCVOID pv, UINT cbVtbl);
  5939. // DOC'ed for DOJ Compliance
  5940. ;end_internal
  5941. SHSTDAPI_(IStream *) OpenRegStream(HKEY hkey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD grfMode);
  5942. ;begin_internal
  5943. SHSTDAPI_(void) SHHandleDiskFull(HWND hwnd, int idDrive);
  5944. // DOC'ed for DOJ compliance
  5945. ;end_internal
  5946. SHSTDAPI_(BOOL) SHFindFiles(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlSaveFile);
  5947. ;begin_internal
  5948. SHSTDAPI_(BOOL) SHFindComputer(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlSaveFile);
  5949. // DOC'ed for DOJ Compliance
  5950. ;end_internal
  5951. SHSTDAPI_(void) PathGetShortPath(LPWSTR pszLongPath);
  5952. SHSTDAPI_(BOOL) PathYetAnotherMakeUniqueName(LPWSTR pszUniqueName, LPCWSTR pszPath, LPCWSTR pszShort, LPCWSTR pszFileSpec);
  5953. ;begin_internal
  5954. SHSTDAPI_(BOOL) Win32CreateDirectory(LPCTSTR pszPath, SECURITY_ATTRIBUTES *psa);
  5955. SHSTDAPI_(BOOL) Win32RemoveDirectory(LPCTSTR pszPath);
  5956. // DOC'ed for DOJ Compliance
  5957. ;end_internal
  5958. SHSTDAPI_(BOOL) Win32DeleteFile(LPCWSTR pszPath);
  5959. ;begin_internal
  5960. SHSTDAPI_(void) SHUpdateRecycleBinIcon();
  5961. // DOC'ed for DOJ Compliance
  5962. ;end_internal
  5963. //
  5964. // Path processing function
  5965. //
  5966. #define PPCF_ADDQUOTES 0x00000001 // return a quoted name if required
  5967. #define PPCF_ADDARGUMENTS 0x00000003 // appends arguments (and wraps in quotes if required)
  5968. #define PPCF_NODIRECTORIES 0x00000010 // don't match to directories
  5969. #define PPCF_NORELATIVEOBJECTQUALIFY 0x00000020 // don't return fully qualified relative objects
  5970. #define PPCF_FORCEQUALIFY 0x00000040 // qualify even non-relative names
  5971. #define PPCF_LONGESTPOSSIBLE 0x00000080 // always find the longest possible name
  5972. SHSTDAPI_(LONG) PathProcessCommand(LPCWSTR lpSrc, LPWSTR lpDest, int iMax, DWORD dwFlags);
  5973. ;begin_internal
  5974. SHSTDAPI_(LPITEMIDLIST) SHLogILFromFSIL(LPCITEMIDLIST pidlFS);
  5975. SHSTDAPI_(BOOL) StrRetToStrN(LPTSTR szOut, UINT uszOut, STRRET *pStrRet, LPCITEMIDLIST pidl);
  5976. SHSTDAPI_(DWORD) SHWaitForFileToOpen(LPCITEMIDLIST pidl, UINT uOptions, DWORD dwtimeout);
  5977. SHSTDAPI_(void) SetAppStartingCursor(HWND hwnd, BOOL fSet);
  5978. // DOC'ed for DOJ compliance
  5979. ;end_internal
  5980. SHSTDAPI_(DWORD) SHRestricted(RESTRICTIONS rest);
  5981. ;begin_internal
  5982. SHSTDAPI_(void *) SHGetHandlerEntry(LPCTSTR szHandler, LPCSTR szProcName, HINSTANCE *lpModule);
  5983. // This is sent to a browser windows letting them know that we have
  5984. // opened a folder, i.e. the folder open operation is done.
  5985. // Call RegisterWindowMessage to get the ID
  5986. #define SH_FILEOPENED TEXT("ShellFileOpened")
  5987. // DOC'ed for DOJ compliance
  5988. ;end_internal
  5989. SHSTDAPI_(BOOL) SignalFileOpen(LPCITEMIDLIST pidl);
  5990. SHSTDAPI_(LPITEMIDLIST) SHSimpleIDListFromPath(LPCWSTR pszPath);
  5991. ;begin_internal
  5992. SHSTDAPI SHCreatePropertyBag(REFIID riid, void **ppv);
  5993. SHSTDAPI_(DWORD) SHNetConnectionDialog(HWND hwnd, LPTSTR pszRemoteName, DWORD dwType);
  5994. // DOC'ed for DOJ Compliance
  5995. ;end_internal
  5996. SHSTDAPI SHLoadOLE(LPARAM lParam);
  5997. SHSTDAPI SHStartNetConnectionDialog%(HWND hwnd, LPCTSTR% pszRemoteName, DWORD dwType);
  5998. SHSTDAPI SHDefExtractIcon%(LPCTSTR% pszIconFile, int iIndex, UINT uFlags,
  5999. HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
  6000. ;begin_internal
  6001. SHSTDAPI_(int) SHLookupIconIndex%(LPCTSTR% pszFile, int iIconIndex, UINT uFlags);
  6002. SHSTDAPI_(UINT) SHExtractIcons%(LPCTSTR% pszFileName, int nIconIndex, int cxIcon, int cyIcon,
  6003. HICON *phicon, UINT *piconid, UINT nIcons, UINT flags);
  6004. SHSTDAPI SHGetAssociations(LPCITEMIDLIST pidl, void **ppvQueryAssociations);
  6005. #define SHLookupIconIndexAORD 7
  6006. #define SHLookupIconIndexWORD 8
  6007. #ifdef UNICODE
  6008. #define SHLookupIconIndexORD SHLookupIconIndexWORD
  6009. #else
  6010. #define SHDefExtractIcon SHDefExtractIconA
  6011. #endif
  6012. // BUGBUG (scotth): temporary. move to shdocvw.
  6013. // OpenAsInfo flags
  6014. #define OAIF_ALLOW_REGISTRATION 0x00000001 // enable the "always use this file" checkbox (NOTE if you dont pass this, it will be disabled)
  6015. #define OAIF_REGISTER_EXT 0x00000002 // do the registration after the user hits "ok"
  6016. #define OAIF_EXEC 0x00000004 // execute file after registering
  6017. #define OAIF_FORCE_REGISTRATION 0x00000008 // force the "always use this file" checkbox to be checked (normally, you wont use the OAIF_ALLOW_REGISTRATION wen you pass this)
  6018. #define OAIF_ALL (OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC | OAIF_FORCE_REGISTRATION) // ;internal
  6019. #include <pshpack8.h>
  6020. typedef struct _openasinfo
  6021. {
  6022. LPCTSTR pcszFile; // [in] file name
  6023. LPCTSTR pcszClass; // [in] file class description. NULL means
  6024. // use pcszFile's extension
  6025. DWORD dwInFlags; // [in] input flags from OAIF_*
  6026. TCHAR szApp[MAX_PATH]; // [out] application selected
  6027. } OPENASINFO, * POPENASINFO;
  6028. #include <poppack.h> /* Return to byte packing */
  6029. SHSTDAPI OpenAsDialog(HWND hwnd, POPENASINFO poainfo);
  6030. //
  6031. // Interface pointer validation
  6032. //
  6033. #define IsBadInterfacePtr(pitf, ITF) SHIsBadInterfacePtr(pitf, sizeof(ITF##Vtbl))
  6034. //===========================================================================
  6035. // Another block of private API
  6036. //===========================================================================
  6037. // indexes into the shell image lists (Shell_GetImageList) for default images
  6038. // If you add to this list, you also need to update II_LASTSYSICON!
  6039. #define II_DOCNOASSOC 0 // document (blank page) (not associated)
  6040. #define II_DOCUMENT 1 // document (with stuff on the page)
  6041. #define II_APPLICATION 2 // application (exe, com, bat)
  6042. #define II_FOLDER 3 // folder (plain)
  6043. #define II_FOLDEROPEN 4 // folder (open)
  6044. #define II_DRIVE525 5
  6045. #define II_DRIVE35 6
  6046. #define II_DRIVEREMOVE 7
  6047. #define II_DRIVEFIXED 8
  6048. #define II_DRIVENET 9
  6049. #define II_DRIVENETDISABLED 10
  6050. #define II_DRIVECD 11
  6051. #define II_DRIVERAM 12
  6052. #define II_WORLD 13
  6053. #define II_NETWORK 14
  6054. #define II_SERVER 15
  6055. #define II_PRINTER 16
  6056. #define II_MYNETWORK 17
  6057. #define II_GROUP 18
  6058. // Startmenu images.
  6059. #define II_STPROGS 19
  6060. #define II_STDOCS 20
  6061. #define II_STSETNGS 21
  6062. #define II_STFIND 22
  6063. #define II_STHELP 23
  6064. #define II_STRUN 24
  6065. #define II_STSUSPEND 25
  6066. #define II_STEJECT 26
  6067. #define II_STSHUTD 27
  6068. #define II_SHARE 28
  6069. #define II_LINK 29
  6070. #define II_SLOWFILE 30
  6071. #define II_RECYCLER 31
  6072. #define II_RECYCLERFULL 32
  6073. #define II_RNA 33
  6074. #define II_DESKTOP 34
  6075. // More startmenu image.
  6076. #define II_STCPANEL 35
  6077. #define II_STSPROGS 36
  6078. #define II_STPRNTRS 37
  6079. #define II_STFONTS 38
  6080. #define II_STTASKBR 39
  6081. #define II_CDAUDIO 40
  6082. #define II_TREE 41
  6083. #define II_STCPROGS 42
  6084. #define II_STFAVORITES 43
  6085. #define II_STLOGOFF 44
  6086. #define II_STFLDRPROP 45
  6087. #define II_WINUPDATE 46
  6088. #define II_MU_STSECURITY 47
  6089. #define II_MU_STDISCONN 48
  6090. #ifdef WINNT // hydra specific id
  6091. #define II_LASTSYSICON II_MU_STDISCONN
  6092. #else
  6093. // Last system image list icon index - used by icon cache manager
  6094. #define II_LASTSYSICON II_WINUPDATE
  6095. #endif
  6096. // Overlay indexes
  6097. #define II_OVERLAYFIRST II_SHARE
  6098. #define II_OVERLAYLAST II_SLOWFILE
  6099. #define II_NDSCONTAINER 72
  6100. #define II_SERVERSHARE 73
  6101. SHSTDAPI_(BOOL) FileIconInit( BOOL fRestoreCache );
  6102. // DOC'ed for DOJ compliance
  6103. ;end_internal
  6104. SHSTDAPI_(BOOL) Shell_GetImageLists(HIMAGELIST *phiml, HIMAGELIST *phimlSmall);
  6105. ;begin_internal
  6106. SHSTDAPI_(void) Shell_SysColorChange(void);
  6107. // DOC'ed for DOJ compliance
  6108. ;end_internal
  6109. SHSTDAPI_(int) Shell_GetCachedImageIndex(LPCWSTR pszIconPath, int iIconIndex, UINT uIconFlags);
  6110. ;begin_internal
  6111. //
  6112. // OLE string
  6113. //
  6114. SHSTDAPI_(int) OleStrToStrN(LPTSTR, int, LPCOLESTR, int);
  6115. SHSTDAPI_(int) StrToOleStrN(LPOLESTR, int, LPCTSTR, int);
  6116. SHSTDAPI_(int) OleStrToStr(LPTSTR, LPCOLESTR);
  6117. SHSTDAPI_(int) StrToOleStr(LPOLESTR, LPCTSTR);
  6118. #define LIPF_ENABLE 0x00000001 // create the object (vs release the object)
  6119. #define LIPF_HOLDREF 0x00000002 // hold ref on object after creation (vs release immediately)
  6120. typedef struct
  6121. {
  6122. CLSID clsid;
  6123. DWORD dwFlags;
  6124. } LOADINPROCDATA, *PLOADINPROCDATA;
  6125. // Tray CopyData Messages
  6126. #define TCDM_APPBAR 0x00000000
  6127. #define TCDM_NOTIFY 0x00000001
  6128. #define TCDM_LOADINPROC 0x00000002
  6129. //
  6130. // Private QueryContextMenuFlag passed from Bands
  6131. //
  6132. #define CMF_BANDCMD 0x00020000 // Install Band Context menu commands
  6133. //
  6134. // Functions to help the cabinets sync to each other
  6135. // uOptions parameter to SHWaitForFileOpen
  6136. //
  6137. #define WFFO_WAITTIME 10000L
  6138. #define WFFO_ADD 0x0001
  6139. #define WFFO_REMOVE 0x0002
  6140. #define WFFO_WAIT 0x0004
  6141. #define WFFO_SIGNAL 0x0008
  6142. //
  6143. // NOTES: IShellService is used when we share a service component
  6144. // (which implements a certain interface) among multiple clients
  6145. // (such as IE 3.0 and Explorer). The client always CoCreateInstance
  6146. // it and call SetOwner(this). When the client is going away
  6147. // (typically when the window is closed), it calls SetOwner(NULL)
  6148. // to let the service object releases the reference to the owner
  6149. // object.
  6150. //
  6151. #undef INTERFACE
  6152. #define INTERFACE IShellService
  6153. DECLARE_INTERFACE_(IShellService, IUnknown)
  6154. {
  6155. // *** IUnknown methods ***
  6156. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6157. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6158. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6159. // *** IShellService specific methods ***
  6160. STDMETHOD(SetOwner)(THIS_ struct IUnknown* punkOwner) PURE;
  6161. };
  6162. //
  6163. // NOTES: IHistSFPrivate is used when manipulating a history IShellFolder object
  6164. // It includes methods for pointing the shell folder at the correct virtual
  6165. // directory. QIing for IHistSFPrivate also guarantees the pidl format can
  6166. // safely be delved into to access the INTERNET_CACHE_ENTRY_INFO structure
  6167. //
  6168. #undef INTERFACE
  6169. #define INTERFACE IHistSFPrivate
  6170. DECLARE_INTERFACE_(IHistSFPrivate, IUnknown)
  6171. {
  6172. // *** IUnknown methods ***
  6173. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6174. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6175. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6176. // *** IHistPrivate specific methods ***
  6177. STDMETHOD(SetCachePrefix)(THIS_ LPCWSTR pszCachePrefix) PURE;
  6178. STDMETHOD(SetDomain)(THIS_ LPCWSTR pszDomain) PURE;
  6179. STDMETHOD(WriteHistory)(THIS_ LPCWSTR pszPrefixedUrl, FILETIME ftExpires, FILETIME ftModified, LPITEMIDLIST * ppidlSelect) PURE;
  6180. STDMETHOD(ClearHistory) (THIS) PURE;
  6181. };
  6182. //
  6183. // NOTES: IShellFolderViewType lets a shell folder support different "views" on
  6184. // its contents (meaning different hierarchical layouts of its data) with
  6185. // the default "view" being the one the shell folder displays normally.
  6186. // This enumerator returns pidls that are special hidden folders at the
  6187. // top level of the shell folder (which are not otherwise enumerated).
  6188. #undef INTERFACE
  6189. #define INTERFACE IShellFolderViewType
  6190. DECLARE_INTERFACE_(IShellFolderViewType, IUnknown)
  6191. {
  6192. // *** IUnknown methods ***
  6193. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6194. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6195. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6196. // *** IShellFolderViewType Methods ***
  6197. // NOTE: "Views" are seen by the user as hidden folders off the
  6198. // root (represented by pidls). Whenever appropriate, the
  6199. // default view (coming off the root folder) is represented
  6200. // as the NULL *or* empty pidl.
  6201. // EnumViews:
  6202. // Return an enumerator which will give out one pidl for every extended view.
  6203. STDMETHOD(EnumViews)(THIS_ ULONG grfFlags, IEnumIDList **ppenum) PURE;
  6204. // GetDefaultViewName:
  6205. // Return the name of the default view. The names of the other views
  6206. // can be retrieved by calling GetDisplayNameOf.
  6207. STDMETHOD(GetDefaultViewName)(THIS_ DWORD uFlags, LPWSTR *ppwszName) PURE;
  6208. STDMETHOD(GetViewTypeProperties)(THIS_ LPCITEMIDLIST pidl, DWORD *pdwFlags) PURE;
  6209. // TranslateViewPidl:
  6210. // Attempt to take a pidl represented in one heirarchical representation of
  6211. // the shell folder, and find it in a different representation.
  6212. // pidl should be relative to the root folder.
  6213. // Remember to ILFree ppidlOut
  6214. STDMETHOD(TranslateViewPidl)(THIS_ LPCITEMIDLIST pidl, LPCITEMIDLIST pidlView, LPITEMIDLIST *ppidlOut) PURE;
  6215. };
  6216. #define SFVTFLAG_NOTIFY_CREATE 0x00000001
  6217. #define SFVTFLAG_NOTIFY_RESORT 0x00000002
  6218. //
  6219. // NOTES: IShellFolderSearchableCallback allows the searcher to provide
  6220. // callback routines that moniter the search process
  6221. //
  6222. #undef INTERFACE
  6223. #define INTERFACE IShellFolderSearchableCallback
  6224. DECLARE_INTERFACE_(IShellFolderSearchableCallback, IUnknown)
  6225. {
  6226. // *** IUnknown methods ***
  6227. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6228. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6229. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6230. // *** IShellFolderSearchableCallback Methods ***
  6231. // NOTE: Caller may pass NULL for pVar or pdwFlags as a legal value
  6232. STDMETHOD(RunBegin)(THIS_ DWORD dwReserved) PURE;
  6233. STDMETHOD(RunEnd)(THIS_ DWORD dwReserved) PURE;
  6234. };
  6235. //
  6236. // NOTES: IShellFolderSearchable allows a shell extension to provide a searchable
  6237. // namespace.
  6238. #undef INTERFACE
  6239. #define INTERFACE IShellFolderSearchable
  6240. DECLARE_INTERFACE_(IShellFolderSearchable, IUnknown)
  6241. {
  6242. // *** IUnknown methods ***
  6243. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6244. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6245. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6246. // *** IShellFolderSearchable methods ***
  6247. // FindString -
  6248. // The returned shell folder's enumerator will have any
  6249. // search hits for the given search string.
  6250. // As no flags are currently defined, we suggest you pass
  6251. // NULL as lpdword
  6252. // punkOnAsyncSearch will be QI'd for IShellFolderSearchableCallback
  6253. STDMETHOD(FindString)(THIS_ LPCWSTR pwszTarget, DWORD *pdwFlags,
  6254. IUnknown *punkOnAsyncSearch, LPITEMIDLIST *ppidlOut) PURE;
  6255. // CancelAsyncSearch -
  6256. // Begins the process of cancelling any pending
  6257. // asynchronous search from this pidl.
  6258. // When the search is actually cancelled, RunEnd will be called
  6259. // Returns: S_OK => cancelling, S_FALSE => not running
  6260. STDMETHOD(CancelAsyncSearch) (THIS_ LPCITEMIDLIST pidlSearch, DWORD *pdwFlags) PURE;
  6261. // InvalidateSearch -
  6262. // Makes this pidl no longer a valid portion of the shell folder
  6263. // also does some cleanup of any databases used in the search and
  6264. // will cause the eventual release of the IRunHook callback
  6265. // May cause async search to be cancelled
  6266. STDMETHOD(InvalidateSearch) (THIS_ LPCITEMIDLIST pidlSearch, DWORD *pdwFlags) PURE;
  6267. };
  6268. //
  6269. // NOTES: IBandSiteHelper is used to let explorer's BandSite implementation,
  6270. // which aggregates shdocvw's BandSite, provide callback hooks for shdocvw
  6271. // to call.
  6272. //
  6273. #undef INTERFACE
  6274. #define INTERFACE IBandSiteHelper
  6275. DECLARE_INTERFACE_(IBandSiteHelper, IUnknown)
  6276. {
  6277. // *** IUnknown methods ***
  6278. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6279. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6280. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6281. // *** IBandSiteHelper specific methods ***
  6282. STDMETHOD(LoadFromStreamBS)(THIS_ struct IStream* pstm, REFIID riid, void **ppv) PURE;
  6283. STDMETHOD(SaveToStreamBS)(THIS_ struct IUnknown* punk, struct IStream* pstm) PURE;
  6284. };
  6285. // This private interface is added such that some of the support features that is in
  6286. // SHDocvw's Internet explorer frame automation code, that is not part of publicly
  6287. // defined interfaces can be used in the Explorer code...
  6288. //
  6289. // Note: FindCIE4ConnectionPoint was a hack for IE4. New code should use
  6290. // shlwapi helper functions like IConnectionPoint_Invoke instead.
  6291. //
  6292. #ifdef __cplusplus
  6293. class CIE4ConnectionPoint;
  6294. #else
  6295. typedef struct CIE4ConnectionPoint CIE4ConnectionPoint;
  6296. #endif
  6297. #undef INTERFACE
  6298. #define INTERFACE IExpDispSupport
  6299. DECLARE_INTERFACE_(IExpDispSupport, IUnknown)
  6300. {
  6301. // *** IUnknown methods ***
  6302. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6303. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6304. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6305. // *** IExpDispSupport specific methods ***
  6306. STDMETHOD(FindCIE4ConnectionPoint)(THIS_ REFIID riid, CIE4ConnectionPoint **ppccp) PURE;
  6307. STDMETHOD(OnTranslateAccelerator)(THIS_ MSG *pMsg, DWORD grfModifiers) PURE;
  6308. STDMETHOD(OnInvoke)(THIS_ DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams,
  6309. VARIANT *pVarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr) PURE;
  6310. };
  6311. //
  6312. // This interface is related to the above. It contains functions
  6313. // that would only be implemented on the WebBrowserOC version if IExpDispSupport.
  6314. //
  6315. #undef INTERFACE
  6316. #define INTERFACE IExpDispSupportOC
  6317. DECLARE_INTERFACE_(IExpDispSupportOC, IUnknown)
  6318. {
  6319. // *** IUnknown methods ***
  6320. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6321. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6322. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6323. // *** IExpDispSupportOC specific methods ***
  6324. STDMETHOD(OnOnControlInfoChanged)(THIS) PURE;
  6325. STDMETHOD(GetDoVerbMSG)(THIS_ MSG *pMsg) PURE;
  6326. };
  6327. //===========================================================================
  6328. // IConnectionPointCB interface
  6329. #undef INTERFACE
  6330. #define INTERFACE IConnectionPointCB
  6331. DECLARE_INTERFACE_(IConnectionPointCB, IUnknown)
  6332. {
  6333. // *** IUnknown methods ***
  6334. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6335. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6336. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6337. // *** IConnectionPointCB Methods ***
  6338. STDMETHOD(OnAdvise) (THIS_ REFIID iid, DWORD cSinks, ULONG_PTR dwCookie) PURE;
  6339. STDMETHOD(OnUnadvise) (THIS_ REFIID iid, DWORD cSinks, ULONG_PTR dwCookie) PURE;
  6340. };
  6341. //===========================================================================
  6342. // IDelegateDropTargetCB interface
  6343. //
  6344. // This interface is used by CDelegateDropTarget implementation in shdocvw
  6345. // to generate an IDropTarget implementation that delegates to different
  6346. // IDropTarget implementations depending on the point currently over. The
  6347. // implementor of IDelegateDropTargetCB can handle feedback, scrolling,
  6348. // hit testing, and returning interfaces for ids returned from hit testing.
  6349. //
  6350. // GetWindows returns the hwnd to lock and the hwnd to scroll (not necesarily
  6351. // the same window, as you often want to lock the parent of the window
  6352. // you want to scroll)
  6353. //
  6354. // HitTest should return an id of the object over as well as
  6355. // uptate UI (highlights, etc). if ppt is NULL
  6356. // that means remove any UI as the drag is terminating.
  6357. // this should be able to handle hittesting on points not
  6358. // even inside hwndScroll.
  6359. //
  6360. // GetObject returns an interface for an id returned from HitTest
  6361. //
  6362. // OnDrop gives the CB a chance to take action on the drop.
  6363. // returning S_FALSE from this function prevents
  6364. // CDelegateDropTarget from calling pdt->Drop(...).
  6365. //
  6366. #undef INTERFACE
  6367. #define INTERFACE IDelegateDropTargetCB
  6368. DECLARE_INTERFACE_(IDelegateDropTargetCB, IUnknown)
  6369. {
  6370. // *** IUnknown methods ***
  6371. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6372. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6373. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6374. // *** IDelegateDropTargetCB Methods ***
  6375. STDMETHOD(GetWindows) (THIS_ HWND * phwndLock, HWND * phwndScroll) PURE;
  6376. STDMETHOD(HitTest) (THIS_ LPPOINT ppt, DWORD * pdwId) PURE;
  6377. STDMETHOD(GetObject) (THIS_ DWORD dwId, REFIID riid, void **ppv) PURE;
  6378. STDMETHOD(OnDrop) (THIS_ IDropTarget *pdt, IDataObject *pdtobj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) PURE;
  6379. };
  6380. #ifdef __COMMCTRL_DA_DEFINED__ // we need HDPAs for this interface
  6381. //
  6382. // IOrderList - for ordering info in favorites/channels
  6383. //
  6384. // Typical usage is: GetOrderList, AllocOrderItem, insert into correct
  6385. // position, SetOrderList, and then FreeOrderList.
  6386. //
  6387. typedef struct
  6388. {
  6389. LPITEMIDLIST pidl; // IDlist for this item
  6390. int nOrder; // Ordinal indicating user preference
  6391. DWORD lParam; // store custom order info.
  6392. } ORDERITEM, * PORDERITEM;
  6393. // Values for SortOrderList
  6394. #define OI_SORTBYNAME 0
  6395. #define OI_SORTBYORDINAL 1
  6396. #define OI_MERGEBYNAME 2
  6397. #undef INTERFACE
  6398. #define INTERFACE IOrderList
  6399. DECLARE_INTERFACE_(IOrderList, IUnknown)
  6400. {
  6401. // *** IUnknown methods ***
  6402. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6403. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6404. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6405. // *** IOrderList Methods ***
  6406. STDMETHOD(GetOrderList)(THIS_ HDPA * phdpa) PURE;
  6407. STDMETHOD(SetOrderList)(THIS_ HDPA hdpa, IShellFolder *psf) PURE;
  6408. STDMETHOD(FreeOrderList)(THIS_ HDPA hdpa) PURE;
  6409. STDMETHOD(SortOrderList)(THIS_ HDPA hdpa, DWORD dw) PURE;
  6410. STDMETHOD(AllocOrderItem)(THIS_ PORDERITEM * ppoi, LPCITEMIDLIST pidl) PURE;
  6411. STDMETHOD(FreeOrderItem)(THIS_ PORDERITEM poi) PURE;
  6412. };
  6413. #undef INTERFACE
  6414. #define INTERFACE IOrderList2
  6415. DECLARE_INTERFACE_(IOrderList2, IOrderList)
  6416. {
  6417. // *** IUnknown methods ***
  6418. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  6419. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6420. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6421. // *** IOrderList Methods ***
  6422. STDMETHOD(GetOrderList)(THIS_ HDPA * phdpa) PURE; // BUGBUG (lamadio): This assumes Favorites Menu
  6423. STDMETHOD(SetOrderList)(THIS_ HDPA hdpa, IShellFolder *psf) PURE; // BUGBUG (lamadio): This assumes Favorites Menu
  6424. STDMETHOD(FreeOrderList)(THIS_ HDPA hdpa) PURE;
  6425. STDMETHOD(SortOrderList)(THIS_ HDPA hdpa, DWORD dw) PURE;
  6426. STDMETHOD(AllocOrderItem)(THIS_ PORDERITEM * ppoi, LPCITEMIDLIST pidl) PURE;
  6427. STDMETHOD(FreeOrderItem)(THIS_ PORDERITEM poi) PURE;
  6428. // *** IOrderList2
  6429. STDMETHOD(LoadFromStream)(THIS_ IStream* pstm, HDPA* phdpa, IShellFolder* psf) PURE;
  6430. STDMETHOD(SaveToStream)(THIS_ IStream* pstm, HDPA hdpa) PURE;
  6431. };
  6432. #endif
  6433. //===========================================================================
  6434. // IShellHTMLWindowSupport private COmWindow interface. This should never be exposed.
  6435. typedef struct IHTMLElement IHTMLElement;
  6436. #undef INTERFACE
  6437. #define INTERFACE IShellHTMLWindowSupport
  6438. DECLARE_INTERFACE_(IShellHTMLWindowSupport, IUnknown)
  6439. {
  6440. // *** IUnknown methods ***
  6441. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6442. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6443. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6444. STDMETHOD(ViewReleaseIntelliForms)(THIS) PURE;
  6445. STDMETHOD(ViewReleased)(THIS) PURE;
  6446. STDMETHOD(ViewActivated)(THIS) PURE;
  6447. STDMETHOD(ReadyStateChangedTo)(THIS_ long, IShellView* ) PURE;
  6448. STDMETHOD(CanNavigate)(THIS) PURE;
  6449. STDMETHOD(ActiveElementChanged)(THIS_ IHTMLElement * pHTMLElement) PURE;
  6450. };
  6451. //===========================================================================
  6452. // IShellHTMLWindowSupport2 private COmWindow interface. This should never be exposed.
  6453. #undef INTERFACE
  6454. #define INTERFACE IShellHTMLWindowSupport2
  6455. DECLARE_INTERFACE_(IShellHTMLWindowSupport2, IShellHTMLWindowSupport)
  6456. {
  6457. STDMETHOD(IsGalleryMeta)(THIS_ BOOL bFlag) PURE;
  6458. };
  6459. //===========================================================================
  6460. // IBandProxy private COmWindow interface. This should never be exposed.
  6461. #undef INTERFACE
  6462. #define INTERFACE IBandProxy
  6463. DECLARE_INTERFACE_(IBandProxy, IUnknown)
  6464. {
  6465. // *** IUnknown methods ***
  6466. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6467. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6468. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6469. // *** IBandProxy Methods ***
  6470. STDMETHOD(SetSite) (THIS_ IUnknown* punkSite) PURE;
  6471. STDMETHOD(CreateNewWindow) (THIS_ IUnknown** ppunk) PURE;
  6472. STDMETHOD(GetBrowserWindow) (THIS_ IUnknown** ppunk) PURE;
  6473. STDMETHOD(IsConnected) (THIS) PURE;
  6474. STDMETHOD(NavigateToPIDL) (THIS_ LPCITEMIDLIST pidl) PURE;
  6475. STDMETHOD(NavigateToURL) (THIS_ LPCWSTR wzUrl, VARIANT * Flags) PURE;
  6476. };
  6477. //===========================================================================
  6478. //
  6479. // Make it sure that we include ole2x.h and shlobj.h
  6480. //
  6481. #if defined(__IOleInPlaceSite_FWD_DEFINED__) && defined(FCIDM_SHVIEWFIRST)
  6482. #ifdef HLINK_H
  6483. #include <pshpack8.h>
  6484. typedef struct {
  6485. HWND _hwnd;
  6486. ITravelLog *_ptl;
  6487. IHlinkFrame *_phlf;
  6488. IWebBrowser2 *_pautoWB2; // use this to reference _pauto's IWebBrowser2 functions
  6489. IExpDispSupport *_pautoEDS; // use this to reference _pauto's IExpDispSupport functions
  6490. IShellService *_pautoSS; // use this to reference _pauto's IShellService functions
  6491. int _eSecureLockIcon;
  6492. DWORD _fCreatingViewWindow :1;
  6493. UINT _uActivateState; // this is the state we should use when we go active..
  6494. // this is here so that derived classes can set us for UI or non-UI active
  6495. // The following pidl is used in CBaseBrowser2::GetViewStateStream because
  6496. // at that time, neither _pidlCur nor _pidlPending are initialized.
  6497. LPCITEMIDLIST _pidlNewShellView;
  6498. IOleCommandTarget* _pctView;
  6499. LPITEMIDLIST _pidlCur;
  6500. IShellView *_psv;
  6501. IShellFolder *_psf; // IShellFolder for _psv (used in CVOCBrowser)
  6502. HWND _hwndView;
  6503. LPWSTR _pszTitleCur;
  6504. LPITEMIDLIST _pidlPending;
  6505. IShellView *_psvPending;
  6506. IShellFolder *_psfPending;
  6507. HWND _hwndViewPending;
  6508. LPWSTR _pszTitlePending;
  6509. BOOL _fIsViewMSHTML;
  6510. BOOL _fPrivacyImpacted;
  6511. } BASEBROWSERDATA, *LPBASEBROWSERDATA;
  6512. typedef const BASEBROWSERDATA *LPCBASEBROWSERDATA;
  6513. #include <poppack.h>
  6514. #else
  6515. // so (unref'ed) ifaces will compile (?)
  6516. typedef LPVOID BASEBROWSERDATA;
  6517. typedef LPCVOID *LPBASEBROWSERDATA; // BUGBUG LPVOID?
  6518. typedef LPCVOID *LPCBASEBROWSERDATA;
  6519. #endif // hlink_h
  6520. typedef struct _travellog * PTRAVELLOG;
  6521. #undef INTERFACE
  6522. #define INTERFACE IBrowserService
  6523. DECLARE_INTERFACE_(IBrowserService, IUnknown)
  6524. {
  6525. // *** IUnknown methods ***
  6526. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6527. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6528. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6529. // *** IBrowserService specific methods ***
  6530. STDMETHOD(GetParentSite)(THIS_ struct IOleInPlaceSite** ppipsite) PURE;
  6531. STDMETHOD(SetTitle)(THIS_ IShellView* psv, LPCWSTR pszName) PURE;
  6532. STDMETHOD(GetTitle)(THIS_ IShellView* psv, LPWSTR pszName, DWORD cchName) PURE;
  6533. STDMETHOD(GetOleObject)(THIS_ struct IOleObject** ppobjv) PURE;
  6534. // think about this one.. I'm not sure we want to expose this -- Chee
  6535. // BUGBUG:: Yep soon we should have interface instead.
  6536. // My impression is that we won't document this whole interface???
  6537. STDMETHOD(GetTravelLog)(THIS_ ITravelLog** pptl) PURE;
  6538. STDMETHOD(ShowControlWindow)(THIS_ UINT id, BOOL fShow) PURE;
  6539. STDMETHOD(IsControlWindowShown)(THIS_ UINT id, BOOL *pfShown) PURE;
  6540. STDMETHOD(IEGetDisplayName)(THIS_ LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) PURE;
  6541. STDMETHOD(IEParseDisplayName)(THIS_ UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST * ppidlOut) PURE;
  6542. STDMETHOD(DisplayParseError)(THIS_ HRESULT hres, LPCWSTR pwszPath) PURE;
  6543. STDMETHOD(NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF) PURE;
  6544. STDMETHOD (SetNavigateState)(THIS_ BNSTATE bnstate) PURE;
  6545. STDMETHOD (GetNavigateState) (THIS_ BNSTATE *pbnstate) PURE;
  6546. STDMETHOD (NotifyRedirect) (THIS_ struct IShellView* psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) PURE;
  6547. STDMETHOD (UpdateWindowList) (THIS) PURE;
  6548. STDMETHOD (UpdateBackForwardState) (THIS) PURE;
  6549. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags, DWORD dwFlagMask) PURE;
  6550. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  6551. // Tells if it can navigate now or not.
  6552. STDMETHOD (CanNavigateNow) (THIS) PURE;
  6553. STDMETHOD (GetPidl) (THIS_ LPITEMIDLIST *ppidl) PURE;
  6554. STDMETHOD (SetReferrer) (THIS_ LPITEMIDLIST pidl) PURE;
  6555. STDMETHOD_(DWORD, GetBrowserIndex)(THIS) PURE;
  6556. STDMETHOD (GetBrowserByIndex)(THIS_ DWORD dwID, IUnknown **ppunk) PURE;
  6557. STDMETHOD (GetHistoryObject)(THIS_ IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) PURE;
  6558. STDMETHOD (SetHistoryObject)(THIS_ IOleObject *pole, BOOL fIsLocalAnchor) PURE;
  6559. STDMETHOD (CacheOLEServer)(THIS_ IOleObject *pole) PURE;
  6560. STDMETHOD (GetSetCodePage)(THIS_ VARIANT* pvarIn, VARIANT* pvarOut) PURE;
  6561. STDMETHOD (OnHttpEquiv)(THIS_ IShellView* psv, BOOL fDone, VARIANT* pvarargIn, VARIANT* pvarargOut) PURE;
  6562. STDMETHOD (GetPalette)( THIS_ HPALETTE * hpal ) PURE;
  6563. STDMETHOD (RegisterWindow)(THIS_ BOOL fUnregister, int swc) PURE;
  6564. // Warning! Do not add any new methods to this interface
  6565. // because IE4 shell32.dll uses it, so changing the interface
  6566. // breaks IE4 interop.
  6567. };
  6568. #define BSF_REGISTERASDROPTARGET 0x00000001
  6569. #define BSF_THEATERMODE 0x00000002
  6570. #define BSF_NOLOCALFILEWARNING 0x00000010
  6571. #define BSF_UISETBYAUTOMATION 0x00000100
  6572. #define BSF_RESIZABLE 0x00000200
  6573. #define BSF_CANMAXIMIZE 0x00000400
  6574. #define BSF_TOPBROWSER 0x00000800
  6575. #define BSF_NAVNOHISTORY 0x00001000
  6576. #define BSF_HTMLNAVCANCELED 0x00002000
  6577. #define BSF_DONTSHOWNAVCANCELPAGE 0x00004000
  6578. #define BSF_SETNAVIGATABLECODEPAGE 0x00008000
  6579. #define BSF_DELEGATEDNAVIGATION 0x00010000
  6580. #define TRAVELLOG_LOCALANCHOR 0x00000001
  6581. #define TRAVELLOG_FORCEUPDATE 0x00000002
  6582. #include <pshpack8.h>
  6583. typedef struct SToolbarItem {
  6584. IDockingWindow * ptbar;
  6585. BORDERWIDTHS rcBorderTool;
  6586. LPWSTR pwszItem;
  6587. BOOL fShow;
  6588. HMONITOR hMon;
  6589. } TOOLBARITEM, *LPTOOLBARITEM;
  6590. #define ITB_VIEW ((UINT)-1) // view
  6591. #include <poppack.h> /* Assume byte packing throughout */
  6592. struct tagFolderSetData;
  6593. // TEMPORARY. this is so that we don't have to keep writing dummy subs in basesb as we're
  6594. // building basesb2
  6595. DECLARE_INTERFACE_(IBrowserService2, IBrowserService)
  6596. {
  6597. // *** IUnknown methods ***
  6598. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6599. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6600. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6601. // *** IBrowserService specific methods ***
  6602. // TODO: break into 3 sections (outer, inner, and both/inherit)
  6603. STDMETHOD(GetParentSite)(THIS_ struct IOleInPlaceSite** ppipsite) PURE;
  6604. STDMETHOD(SetTitle)(THIS_ IShellView* psv, LPCWSTR pszName) PURE;
  6605. STDMETHOD(GetTitle)(THIS_ IShellView* psv, LPWSTR pszName, DWORD cchName) PURE;
  6606. STDMETHOD(GetOleObject)(THIS_ struct IOleObject** ppobjv) PURE;
  6607. // think about this one.. I'm not sure we want to expose this -- Chee
  6608. // BUGBUG:: Yep soon we should have interface instead.
  6609. // My impression is that we won't document this whole interface???
  6610. STDMETHOD(GetTravelLog)(THIS_ ITravelLog** pptl) PURE;
  6611. STDMETHOD(ShowControlWindow)(THIS_ UINT id, BOOL fShow) PURE;
  6612. STDMETHOD(IsControlWindowShown)(THIS_ UINT id, BOOL *pfShown) PURE;
  6613. STDMETHOD(IEGetDisplayName)(THIS_ LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) PURE;
  6614. STDMETHOD(IEParseDisplayName)(THIS_ UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST * ppidlOut) PURE;
  6615. STDMETHOD(DisplayParseError)(THIS_ HRESULT hres, LPCWSTR pwszPath) PURE;
  6616. STDMETHOD(NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF) PURE;
  6617. STDMETHOD (SetNavigateState)(THIS_ BNSTATE bnstate) PURE;
  6618. STDMETHOD (GetNavigateState) (THIS_ BNSTATE *pbnstate) PURE;
  6619. STDMETHOD (NotifyRedirect) (THIS_ struct IShellView* psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) PURE;
  6620. STDMETHOD (UpdateWindowList) (THIS) PURE;
  6621. STDMETHOD (UpdateBackForwardState) (THIS) PURE;
  6622. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags, DWORD dwFlagMask) PURE;
  6623. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  6624. // Tells if it can navigate now or not.
  6625. STDMETHOD (CanNavigateNow) (THIS) PURE;
  6626. STDMETHOD (GetPidl) (THIS_ LPITEMIDLIST *ppidl) PURE;
  6627. STDMETHOD (SetReferrer) (THIS_ LPITEMIDLIST pidl) PURE;
  6628. STDMETHOD_(DWORD, GetBrowserIndex)(THIS) PURE;
  6629. STDMETHOD (GetBrowserByIndex)(THIS_ DWORD dwID, IUnknown **ppunk) PURE;
  6630. STDMETHOD (GetHistoryObject)(THIS_ IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) PURE;
  6631. STDMETHOD (SetHistoryObject)(THIS_ IOleObject *pole, BOOL fIsLocalAnchor) PURE;
  6632. STDMETHOD (CacheOLEServer)(THIS_ IOleObject *pole) PURE;
  6633. STDMETHOD (GetSetCodePage)(THIS_ VARIANT* pvarIn, VARIANT* pvarOut) PURE;
  6634. STDMETHOD (OnHttpEquiv)(THIS_ IShellView* psv, BOOL fDone, VARIANT* pvarargIn, VARIANT* pvarargOut) PURE;
  6635. STDMETHOD (GetPalette)( THIS_ HPALETTE * hpal ) PURE;
  6636. STDMETHOD (RegisterWindow)(THIS_ BOOL fUnregister, int swc) PURE;
  6637. // Stuff added for shbrowse->shbrows2 split
  6638. // These remove "friend" functions and classes
  6639. //
  6640. STDMETHOD_(LRESULT, WndProcBS)(THIS_ HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  6641. STDMETHOD (SetAsDefFolderSettings)(THIS) PURE;
  6642. STDMETHOD (GetViewRect)(THIS_ RECT * prc) PURE;
  6643. STDMETHOD (OnSize)(THIS_ WPARAM wParam) PURE;
  6644. STDMETHOD (OnCreate)(THIS_ LPCREATESTRUCT pcs) PURE;
  6645. STDMETHOD_(LRESULT, OnCommand)(THIS_ WPARAM wParam, LPARAM lParam) PURE;
  6646. STDMETHOD (OnDestroy)(THIS ) PURE;
  6647. STDMETHOD_(LRESULT, OnNotify)(THIS_ NMHDR * pnm) PURE;
  6648. STDMETHOD (OnSetFocus)(THIS ) PURE;
  6649. STDMETHOD (OnFrameWindowActivateBS)(THIS_ BOOL fActive) PURE;
  6650. STDMETHOD (ReleaseShellView)(THIS ) PURE;
  6651. STDMETHOD (ActivatePendingView)(THIS ) PURE;
  6652. STDMETHOD (CreateViewWindow)(THIS_ IShellView* psvNew, IShellView* psvOld, LPRECT prcView, HWND* phwnd) PURE;
  6653. STDMETHOD (CreateBrowserPropSheetExt)(THIS_ REFIID riid, void **ppv) PURE;
  6654. // these could be base browser only interfaces
  6655. // they are not overridden by anyone, and perhaps only there for the aggregators to get info from the
  6656. // aggregatee. NOTE: where basesb calls these,
  6657. // it does NOT go through _pbsOuter
  6658. STDMETHOD (GetViewWindow)(THIS_ HWND * phwndView) PURE;
  6659. STDMETHOD (GetBaseBrowserData)(THIS_ LPCBASEBROWSERDATA * pbbd) PURE;
  6660. STDMETHOD_(LPBASEBROWSERDATA, PutBaseBrowserData)(THIS) PURE;
  6661. STDMETHOD (InitializeTravelLog)(THIS_ ITravelLog* ptl, DWORD dw) PURE;
  6662. STDMETHOD (SetTopBrowser)(THIS) PURE;
  6663. STDMETHOD (Offline)(THIS_ int iCmd) PURE;
  6664. STDMETHOD (AllowViewResize)(THIS_ BOOL f) PURE;
  6665. STDMETHOD (SetActivateState)(THIS_ UINT u) PURE;
  6666. STDMETHOD (UpdateSecureLockIcon)(THIS_ int eSecureLock) PURE;
  6667. STDMETHOD (InitializeDownloadManager)(THIS) PURE;
  6668. STDMETHOD (InitializeTransitionSite)(THIS) PURE;
  6669. STDMETHOD (_Initialize)(THIS_ HWND hwnd, IUnknown *pauto) PURE;
  6670. // BEGIN REVIEW: review names and need of each.
  6671. //
  6672. // this first set could be basebrowser only members. no one overrides
  6673. // NOTE: where basesb calls these, it does NOT go throug _pbsOuter
  6674. STDMETHOD (_CancelPendingNavigationAsync)(THIS) PURE;
  6675. STDMETHOD (_CancelPendingView)(THIS) PURE;
  6676. STDMETHOD (_MaySaveChanges)(THIS) PURE;
  6677. STDMETHOD (_PauseOrResumeView)(THIS_ BOOL fPaused) PURE;
  6678. STDMETHOD (_DisableModeless)(THIS) PURE;
  6679. // rethink these... are all of these necessary?
  6680. STDMETHOD (_NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags)PURE;
  6681. STDMETHOD (_TryShell2Rename)(THIS_ IShellView* psv, LPCITEMIDLIST pidlNew)PURE;
  6682. STDMETHOD (_SwitchActivationNow)(THIS )PURE;
  6683. // this set is overridden and called thru _pbsOuter (and SUPER:_pbsInner)
  6684. STDMETHOD (_ExecChildren)(THIS_ IUnknown *punkBar, BOOL fBroadcast,
  6685. const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt,
  6686. VARIANTARG *pvarargIn, VARIANTARG *pvarargOut)PURE;
  6687. STDMETHOD (_SendChildren)(THIS_ HWND hwndBar, BOOL fBroadcast,
  6688. UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  6689. //END REVIEW:
  6690. // querying from the outer.
  6691. STDMETHOD (GetFolderSetData)(THIS_ struct tagFolderSetData* pfsd) PURE;
  6692. // Toolbar stuff is here temporarily. Eventually it will move out
  6693. // of basesb into commonsb, so I'm keeping the underscore "_"
  6694. // Except those noted below, none of these are overridden by
  6695. // outer guys, so no calls are made through _pbsOuter
  6696. STDMETHOD (_OnFocusChange)(THIS_ UINT itb) PURE;
  6697. STDMETHOD (v_ShowHideChildWindows)(THIS_ BOOL fChildOnly) PURE; // NOTE: overridden and called thru _pbsOuter
  6698. STDMETHOD_(UINT,_get_itbLastFocus)(THIS) PURE;
  6699. STDMETHOD (_put_itbLastFocus)(THIS_ UINT itbLastFocus) PURE;
  6700. STDMETHOD (_UIActivateView)(THIS_ UINT uState) PURE;
  6701. // Check the following functions
  6702. STDMETHOD (_GetViewBorderRect)(THIS_ RECT* prc) PURE;
  6703. STDMETHOD (_UpdateViewRectSize)(THIS) PURE;
  6704. STDMETHOD (_ResizeNextBorder)(THIS_ UINT itb) PURE;
  6705. STDMETHOD (_ResizeView)(THIS) PURE;
  6706. STDMETHOD (_GetEffectiveClientArea)(THIS_ LPRECT lprectBorder, HMONITOR hmon) PURE;
  6707. // Desktop needs to override this from commonsb
  6708. STDMETHOD_(IStream*,v_GetViewStream)(THIS_ LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName) PURE;
  6709. // Desktop needs access to these commonsb functions, they are not overridden:
  6710. STDMETHOD_(LRESULT,ForwardViewMsg)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  6711. STDMETHOD (SetAcceleratorMenu)(THIS_ HACCEL hacc) PURE;
  6712. STDMETHOD_(int,_GetToolbarCount)(THIS) PURE;
  6713. STDMETHOD_(LPTOOLBARITEM,_GetToolbarItem)(THIS_ int itb) PURE;
  6714. STDMETHOD (_SaveToolbars)(THIS_ IStream* pstm) PURE;
  6715. STDMETHOD (_LoadToolbars)(THIS_ IStream* pstm) PURE;
  6716. STDMETHOD (_CloseAndReleaseToolbars)(THIS_ BOOL fClose) PURE;
  6717. STDMETHOD (v_MayGetNextToolbarFocus)(THIS_ LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM * pptbi, HWND * phwnd) PURE;
  6718. STDMETHOD (_ResizeNextBorderHelper)(THIS_ UINT itb, BOOL bUseHmonitor) PURE;
  6719. STDMETHOD_(UINT,_FindTBar)(THIS_ IUnknown* punkSrc) PURE;
  6720. STDMETHOD (_SetFocus)(THIS_ LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg) PURE;
  6721. STDMETHOD (v_MayTranslateAccelerator)(THIS_ MSG* pmsg) PURE;
  6722. STDMETHOD (_GetBorderDWHelper)(THIS_ IUnknown* punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor) PURE;
  6723. // Shell browser needs to override this from basesb.
  6724. STDMETHOD (v_CheckZoneCrossing)(THIS_ LPCITEMIDLIST pidl) PURE;
  6725. };
  6726. DECLARE_INTERFACE_(IBrowserService3, IBrowserService2)
  6727. {
  6728. // *** IUnknown methods ***
  6729. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6730. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6731. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6732. // *** IBrowserService specific methods ***
  6733. // TODO: break into 3 sections (outer, inner, and both/inherit)
  6734. STDMETHOD(GetParentSite)(THIS_ struct IOleInPlaceSite** ppipsite) PURE;
  6735. STDMETHOD(SetTitle)(THIS_ IShellView* psv, LPCWSTR pszName) PURE;
  6736. STDMETHOD(GetTitle)(THIS_ IShellView* psv, LPWSTR pszName, DWORD cchName) PURE;
  6737. STDMETHOD(GetOleObject)(THIS_ struct IOleObject** ppobjv) PURE;
  6738. // think about this one.. I'm not sure we want to expose this -- Chee
  6739. // BUGBUG:: Yep soon we should have interface instead.
  6740. // My impression is that we won't document this whole interface???
  6741. STDMETHOD(GetTravelLog)(THIS_ ITravelLog** pptl) PURE;
  6742. STDMETHOD(ShowControlWindow)(THIS_ UINT id, BOOL fShow) PURE;
  6743. STDMETHOD(IsControlWindowShown)(THIS_ UINT id, BOOL *pfShown) PURE;
  6744. STDMETHOD(IEGetDisplayName)(THIS_ LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) PURE;
  6745. STDMETHOD(IEParseDisplayName)(THIS_ UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST * ppidlOut) PURE;
  6746. STDMETHOD(DisplayParseError)(THIS_ HRESULT hres, LPCWSTR pwszPath) PURE;
  6747. STDMETHOD(NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF) PURE;
  6748. STDMETHOD (SetNavigateState)(THIS_ BNSTATE bnstate) PURE;
  6749. STDMETHOD (GetNavigateState) (THIS_ BNSTATE *pbnstate) PURE;
  6750. STDMETHOD (NotifyRedirect) (THIS_ struct IShellView* psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) PURE;
  6751. STDMETHOD (UpdateWindowList) (THIS) PURE;
  6752. STDMETHOD (UpdateBackForwardState) (THIS) PURE;
  6753. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags, DWORD dwFlagMask) PURE;
  6754. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  6755. // Tells if it can navigate now or not.
  6756. STDMETHOD (CanNavigateNow) (THIS) PURE;
  6757. STDMETHOD (GetPidl) (THIS_ LPITEMIDLIST *ppidl) PURE;
  6758. STDMETHOD (SetReferrer) (THIS_ LPITEMIDLIST pidl) PURE;
  6759. STDMETHOD_(DWORD, GetBrowserIndex)(THIS) PURE;
  6760. STDMETHOD (GetBrowserByIndex)(THIS_ DWORD dwID, IUnknown **ppunk) PURE;
  6761. STDMETHOD (GetHistoryObject)(THIS_ IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) PURE;
  6762. STDMETHOD (SetHistoryObject)(THIS_ IOleObject *pole, BOOL fIsLocalAnchor) PURE;
  6763. STDMETHOD (CacheOLEServer)(THIS_ IOleObject *pole) PURE;
  6764. STDMETHOD (GetSetCodePage)(THIS_ VARIANT* pvarIn, VARIANT* pvarOut) PURE;
  6765. STDMETHOD (OnHttpEquiv)(THIS_ IShellView* psv, BOOL fDone, VARIANT* pvarargIn, VARIANT* pvarargOut) PURE;
  6766. STDMETHOD (GetPalette)( THIS_ HPALETTE * hpal ) PURE;
  6767. STDMETHOD (RegisterWindow)(THIS_ BOOL fUnregister, int swc) PURE;
  6768. // Stuff added for shbrowse->shbrows2 split
  6769. // These remove "friend" functions and classes
  6770. //
  6771. STDMETHOD_(LRESULT, WndProcBS)(THIS_ HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  6772. STDMETHOD (SetAsDefFolderSettings)(THIS) PURE;
  6773. STDMETHOD (GetViewRect)(THIS_ RECT * prc) PURE;
  6774. STDMETHOD (OnSize)(THIS_ WPARAM wParam) PURE;
  6775. STDMETHOD (OnCreate)(THIS_ LPCREATESTRUCT pcs) PURE;
  6776. STDMETHOD_(LRESULT, OnCommand)(THIS_ WPARAM wParam, LPARAM lParam) PURE;
  6777. STDMETHOD (OnDestroy)(THIS ) PURE;
  6778. STDMETHOD_(LRESULT, OnNotify)(THIS_ NMHDR * pnm) PURE;
  6779. STDMETHOD (OnSetFocus)(THIS ) PURE;
  6780. STDMETHOD (OnFrameWindowActivateBS)(THIS_ BOOL fActive) PURE;
  6781. STDMETHOD (ReleaseShellView)(THIS ) PURE;
  6782. STDMETHOD (ActivatePendingView)(THIS ) PURE;
  6783. STDMETHOD (CreateViewWindow)(THIS_ IShellView* psvNew, IShellView* psvOld, LPRECT prcView, HWND* phwnd) PURE;
  6784. STDMETHOD (CreateBrowserPropSheetExt)(THIS_ REFIID riid, void **ppv) PURE;
  6785. // these could be base browser only interfaces
  6786. // they are not overridden by anyone, and perhaps only there for the aggregators to get info from the
  6787. // aggregatee. NOTE: where basesb calls these,
  6788. // it does NOT go through _pbsOuter
  6789. STDMETHOD (GetViewWindow)(THIS_ HWND * phwndView) PURE;
  6790. STDMETHOD (GetBaseBrowserData)(THIS_ LPCBASEBROWSERDATA * pbbd) PURE;
  6791. STDMETHOD_(LPBASEBROWSERDATA, PutBaseBrowserData)(THIS) PURE;
  6792. STDMETHOD (InitializeTravelLog)(THIS_ ITravelLog* ptl, DWORD dw) PURE;
  6793. STDMETHOD (SetTopBrowser)(THIS) PURE;
  6794. STDMETHOD (Offline)(THIS_ int iCmd) PURE;
  6795. STDMETHOD (AllowViewResize)(THIS_ BOOL f) PURE;
  6796. STDMETHOD (SetActivateState)(THIS_ UINT u) PURE;
  6797. STDMETHOD (UpdateSecureLockIcon)(THIS_ int eSecureLock) PURE;
  6798. STDMETHOD (InitializeDownloadManager)(THIS) PURE;
  6799. STDMETHOD (InitializeTransitionSite)(THIS) PURE;
  6800. STDMETHOD (_Initialize)(THIS_ HWND hwnd, IUnknown *pauto) PURE;
  6801. // BEGIN REVIEW: review names and need of each.
  6802. //
  6803. // this first set could be basebrowser only members. no one overrides
  6804. // NOTE: where basesb calls these, it does NOT go throug _pbsOuter
  6805. STDMETHOD (_CancelPendingNavigationAsync)(THIS) PURE;
  6806. STDMETHOD (_CancelPendingView)(THIS) PURE;
  6807. STDMETHOD (_MaySaveChanges)(THIS) PURE;
  6808. STDMETHOD (_PauseOrResumeView)(THIS_ BOOL fPaused) PURE;
  6809. STDMETHOD (_DisableModeless)(THIS) PURE;
  6810. // rethink these... are all of these necessary?
  6811. STDMETHOD (_NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags)PURE;
  6812. STDMETHOD (_TryShell2Rename)(THIS_ IShellView* psv, LPCITEMIDLIST pidlNew)PURE;
  6813. STDMETHOD (_SwitchActivationNow)(THIS )PURE;
  6814. // this set is overridden and called thru _pbsOuter (and SUPER:_pbsInner)
  6815. STDMETHOD (_ExecChildren)(THIS_ IUnknown *punkBar, BOOL fBroadcast,
  6816. const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt,
  6817. VARIANTARG *pvarargIn, VARIANTARG *pvarargOut)PURE;
  6818. STDMETHOD (_SendChildren)(THIS_ HWND hwndBar, BOOL fBroadcast,
  6819. UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  6820. //END REVIEW:
  6821. // querying from the outer.
  6822. STDMETHOD (GetFolderSetData)(THIS_ struct tagFolderSetData* pfsd) PURE;
  6823. // Toolbar stuff is here temporarily. Eventually it will move out
  6824. // of basesb into commonsb, so I'm keeping the underscore "_"
  6825. // Except those noted below, none of these are overridden by
  6826. // outer guys, so no calls are made through _pbsOuter
  6827. STDMETHOD (_OnFocusChange)(THIS_ UINT itb) PURE;
  6828. STDMETHOD (v_ShowHideChildWindows)(THIS_ BOOL fChildOnly) PURE; // NOTE: overridden and called thru _pbsOuter
  6829. STDMETHOD_(UINT,_get_itbLastFocus)(THIS) PURE;
  6830. STDMETHOD (_put_itbLastFocus)(THIS_ UINT itbLastFocus) PURE;
  6831. STDMETHOD (_UIActivateView)(THIS_ UINT uState) PURE;
  6832. // Check the following functions
  6833. STDMETHOD (_GetViewBorderRect)(THIS_ RECT* prc) PURE;
  6834. STDMETHOD (_UpdateViewRectSize)(THIS) PURE;
  6835. STDMETHOD (_ResizeNextBorder)(THIS_ UINT itb) PURE;
  6836. STDMETHOD (_ResizeView)(THIS) PURE;
  6837. STDMETHOD (_GetEffectiveClientArea)(THIS_ LPRECT lprectBorder, HMONITOR hmon) PURE;
  6838. // Desktop needs to override this from commonsb
  6839. STDMETHOD_(IStream*,v_GetViewStream)(THIS_ LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName) PURE;
  6840. // Desktop needs access to these commonsb functions, they are not overridden:
  6841. STDMETHOD_(LRESULT,ForwardViewMsg)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  6842. STDMETHOD (SetAcceleratorMenu)(THIS_ HACCEL hacc) PURE;
  6843. STDMETHOD_(int,_GetToolbarCount)(THIS) PURE;
  6844. STDMETHOD_(LPTOOLBARITEM,_GetToolbarItem)(THIS_ int itb) PURE;
  6845. STDMETHOD (_SaveToolbars)(THIS_ IStream* pstm) PURE;
  6846. STDMETHOD (_LoadToolbars)(THIS_ IStream* pstm) PURE;
  6847. STDMETHOD (_CloseAndReleaseToolbars)(THIS_ BOOL fClose) PURE;
  6848. STDMETHOD (v_MayGetNextToolbarFocus)(THIS_ LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM * pptbi, HWND * phwnd) PURE;
  6849. STDMETHOD (_ResizeNextBorderHelper)(THIS_ UINT itb, BOOL bUseHmonitor) PURE;
  6850. STDMETHOD_(UINT,_FindTBar)(THIS_ IUnknown* punkSrc) PURE;
  6851. STDMETHOD (_SetFocus)(THIS_ LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg) PURE;
  6852. STDMETHOD (v_MayTranslateAccelerator)(THIS_ MSG* pmsg) PURE;
  6853. STDMETHOD (_GetBorderDWHelper)(THIS_ IUnknown* punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor) PURE;
  6854. // Shell browser needs to override this from basesb.
  6855. STDMETHOD (v_CheckZoneCrossing)(THIS_ LPCITEMIDLIST pidl) PURE;
  6856. // IBrowserService3
  6857. STDMETHOD (_PositionViewWindow)(THIS_ HWND hwnd, LPRECT prc) PURE; // this was virtual in basesb/shbrowse, but missed this interface!
  6858. };
  6859. typedef enum
  6860. {
  6861. NAVDATA_DONTUPDATETRAVELLOG = 0x00000001,
  6862. NAVDATA_FRAMEWINDOW = 0x00000002,
  6863. NAVDATA_FRAMECREATION = 0x00000004,
  6864. NAVDATA_RESTARTLOAD = 0x00000008,
  6865. } ENUMNAVDATA;
  6866. typedef struct IHTMLWindow2 IHTMLWindow2;
  6867. #undef INTERFACE
  6868. #define INTERFACE ITridentService
  6869. DECLARE_INTERFACE_(ITridentService, IUnknown)
  6870. {
  6871. // *** IUnknown methods ***
  6872. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6873. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6874. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6875. // *** ITridentService specific methods ***
  6876. STDMETHOD(FireBeforeNavigate2)(THIS_
  6877. IDispatch * pDispatch,
  6878. LPCTSTR lpszUrl,
  6879. DWORD dwFlags,
  6880. LPCTSTR lpszFrameName,
  6881. LPBYTE pPostData,
  6882. DWORD cbPostData,
  6883. LPCTSTR lpszHeaders,
  6884. BOOL fPlayNavSound,
  6885. BOOL * pfCancel) PURE;
  6886. STDMETHOD(FireNavigateComplete2)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  6887. DWORD dwFlags) PURE;
  6888. STDMETHOD(FireDownloadBegin)(THIS) PURE;
  6889. STDMETHOD(FireDownloadComplete)(THIS) PURE;
  6890. STDMETHOD(FireDocumentComplete)(THIS_
  6891. IHTMLWindow2 * pHTMLWindow,
  6892. DWORD dwFlags) PURE;
  6893. STDMETHOD(UpdateDesktopComponent)(THIS_ IHTMLWindow2 * pHTMLWindow) PURE;
  6894. STDMETHOD(GetPendingUrl)(THIS_ BSTR * pbstrPendingUrl) PURE;
  6895. STDMETHOD(ActiveElementChanged)(THIS_ IHTMLElement * pHTMLElement) PURE;
  6896. STDMETHOD(GetUrlSearchComponent)(THIS_ BSTR * pbstrSearch) PURE;
  6897. STDMETHOD(IsErrorUrl)(THIS_ LPCTSTR lpszUrl, BOOL *pfIsError) PURE;
  6898. };
  6899. #undef INTERFACE
  6900. #define INTERFACE ITridentService2
  6901. DECLARE_INTERFACE_(ITridentService2, ITridentService)
  6902. {
  6903. // *** ITridentService2 methods ***
  6904. STDMETHOD(AttachMyPics)(THIS_ void *pDoc2, void **ppMyPics) PURE;
  6905. STDMETHOD_(BOOL,ReleaseMyPics)(THIS_ void *pMyPics) PURE;
  6906. STDMETHOD(IsGalleryMeta)(THIS_ BOOL bFlag, void *pMyPics) PURE;
  6907. STDMETHOD(EmailPicture)(THIS_ BSTR bstrURL) PURE;
  6908. STDMETHOD(FireNavigateError)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  6909. BSTR bstrURL,
  6910. BSTR bstrTargetFrameName,
  6911. DWORD dwStatusCode,
  6912. BOOL * pfCancel) PURE;
  6913. STDMETHOD(FirePrintTemplateEvent)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  6914. DISPID dispidPrintEvent) PURE;
  6915. STDMETHOD(FireUpdatePageStatus)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  6916. DWORD nPage,
  6917. BOOL fDone) PURE;
  6918. STDMETHOD(FirePrivacyImpactedStateChange)(THIS_ BOOL bPrivacyImpacted) PURE;
  6919. STDMETHOD(InitAutoImageResize)(THIS) PURE;
  6920. STDMETHOD(UnInitAutoImageResize)(THIS) PURE;
  6921. };
  6922. #undef INTERFACE
  6923. #define INTERFACE IWebBrowserPriv
  6924. DECLARE_INTERFACE_(IWebBrowserPriv, IUnknown)
  6925. {
  6926. // *** IUnknown methods ***
  6927. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6928. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6929. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6930. // *** IWebBrowserPriv specific methods ***
  6931. STDMETHOD(NavigateWithBindCtx)(THIS_ VARIANT *pvarUrl,
  6932. VARIANT *pvarFlags,
  6933. VARIANT *pvarTargetFrameName,
  6934. VARIANT *pvarPostData,
  6935. VARIANT *pvarHeaders,
  6936. IBindCtx * pBindCtx,
  6937. BSTR bstrLocation) PURE;
  6938. STDMETHOD(OnClose)(THIS) PURE;
  6939. };
  6940. // these MUST be listed in the same order a c_szPropNames in deskbar.cpp
  6941. typedef enum {
  6942. PROPDATA_SIDE = 0,
  6943. PROPDATA_MODE,
  6944. PROPDATA_LEFT,
  6945. PROPDATA_TOP,
  6946. PROPDATA_RIGHT,
  6947. PROPDATA_BOTTOM,
  6948. PROPDATA_DELETEABLE,
  6949. PROPDATA_X,
  6950. PROPDATA_Y,
  6951. PROPDATA_CX,
  6952. PROPDATA_CY,
  6953. PROPDATA_COUNT
  6954. } ENUMPROPDATA ;
  6955. // PROPDATA_MODE values:
  6956. // (aka. WBM_* -- webbar modes (_eMode))
  6957. #define WBM_BOTTOMMOST ((UINT) 0x0) // bottommost
  6958. #define WBM_TOPMOST ((UINT) 0x1) // topmost
  6959. #define WBM_FLOATING ((UINT) 0x2) // floating
  6960. #define WBM_NIL ((UINT) 0x7) // nil
  6961. #undef INTERFACE
  6962. #define INTERFACE IDockingBarPropertyBagInit
  6963. DECLARE_INTERFACE_(IDockingBarPropertyBagInit, IUnknown)
  6964. {
  6965. // *** IUnknown methods ***
  6966. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  6967. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  6968. STDMETHOD_(ULONG,Release)(THIS) PURE;
  6969. // *** IDockingBarPropertyBag ***
  6970. STDMETHOD(SetDataDWORD)(THIS_ ENUMPROPDATA e, DWORD dwData) PURE;
  6971. } ;
  6972. #if (_WIN32_IE) >= 0x0400
  6973. //===========================================================================
  6974. // IAddressList private COmWindow interface. This should never be exposed.
  6975. #undef INTERFACE
  6976. #define INTERFACE IAddressList
  6977. DECLARE_INTERFACE_(IAddressList, IWinEventHandler)
  6978. {
  6979. // *** IUnknown methods ***
  6980. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  6981. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  6982. STDMETHOD_(ULONG,Release) (THIS) PURE;
  6983. // *** IWinEventHandler Methods ***
  6984. STDMETHOD(OnWinEvent) (THIS_ HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* plres) PURE;
  6985. STDMETHOD(IsWindowOwner) (THIS_ HWND hwnd) PURE;
  6986. // *** IAddressList Methods ***
  6987. STDMETHOD(Connect) (THIS_ BOOL fConnect, HWND hwnd, IBrowserService* pbs, IBandProxy* pbp, IAutoComplete * pac) PURE;
  6988. STDMETHOD(NavigationComplete) (THIS_ void *pvCShellUrl) PURE;
  6989. STDMETHOD(Refresh) (THIS_ DWORD dwType) PURE;
  6990. STDMETHOD(Load) (THIS) PURE;
  6991. STDMETHOD(Save) (THIS) PURE;
  6992. STDMETHOD(SetToListIndex) (THIS_ int nIndex, void *pvShelLUrl) PURE;
  6993. STDMETHOD(FileSysChangeAL) (THIS_ DWORD dw, LPCITEMIDLIST *ppidl) PURE;
  6994. };
  6995. #endif
  6996. // DOC'ed for DOJ compliance
  6997. ;end_internal
  6998. //
  6999. // IDocViewSite
  7000. //
  7001. #undef INTERFACE
  7002. #define INTERFACE IDocViewSite
  7003. DECLARE_INTERFACE_(IDocViewSite, IUnknown)
  7004. {
  7005. // *** IUnknown methods ***
  7006. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  7007. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  7008. STDMETHOD_(ULONG,Release)(THIS) PURE;
  7009. // *** IDocViewSite methods ***
  7010. STDMETHOD(OnSetTitle) (THIS_ VARIANTARG *pvTitle) PURE;
  7011. } ;
  7012. ;begin_internal
  7013. #endif
  7014. //===========================================================================
  7015. // IDwnCodePage: This is a private interface to pass codepage info.
  7016. #undef INTERFACE
  7017. #define INTERFACE IDwnCodePage
  7018. DECLARE_INTERFACE_(IDwnCodePage, IUnknown)
  7019. {
  7020. // *** IUnknown methods ***
  7021. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7022. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7023. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7024. // *** IDwnCodePage Methods ***
  7025. STDMETHOD_(UINT,GetCodePage) (THIS) PURE;
  7026. STDMETHOD(SetCodePage) (THIS_ UINT uiCP) PURE;
  7027. };
  7028. SHSTDAPI SHDllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv);
  7029. //===========================================================================
  7030. //----------------------------------------------------------------------------
  7031. #define IsLFNDriveORD 119
  7032. SHSTDAPI_(int) SHOutOfMemoryMessageBox(HWND hwndOwner, LPTSTR pszTitle, UINT fuStyle);
  7033. SHSTDAPI_(BOOL) SHWinHelp(HWND hwndMain, LPCTSTR pszHelp, UINT usCommand, ULONG_PTR ulData);
  7034. SHSTDAPI_(BOOL) RLBuildListOfPaths(void);
  7035. #ifdef WINNT
  7036. SHSTDAPI_(BOOL) RegenerateUserEnvironment(void **pPrevEnv, BOOL bSetCurrentEnv);
  7037. #endif
  7038. #define SHValidateUNCORD 173
  7039. // DOC'ed for DOJ compliance
  7040. ;end_internal
  7041. #define VALIDATEUNC_NOUI 0x0002 // don't bring up UI
  7042. #define VALIDATEUNC_CONNECT 0x0001 // connect a drive letter
  7043. #define VALIDATEUNC_PRINT 0x0004 // validate as print share instead of disk share
  7044. #define VALIDATEUNC_VALID 0x0007 // valid flags
  7045. SHSTDAPI_(BOOL) SHValidateUNC(HWND hwndOwner, LPWSTR pszFile, UINT fConnect);
  7046. ;begin_internal
  7047. //----------------------------------------------------------------------------
  7048. #define OleStrToStrNORD 78
  7049. #define SHCloneSpecialIDListORD 89
  7050. #define SHDllGetClassObjectORD 128
  7051. #define SHLogILFromFSILORD 95
  7052. #define SHMapPIDLToSystemImageListIndexORD 77
  7053. #define SHShellFolderView_MessageORD 73
  7054. #define Shell_GetImageListsORD 71
  7055. #define SHGetSpecialFolderPathORD 175
  7056. #define StrToOleStrNORD 79
  7057. #define ILCloneORD 18
  7058. #define ILCloneFirstORD 19
  7059. #define ILCombineORD 25
  7060. #define ILCreateFromPathORD 157
  7061. #define ILFindChildORD 24
  7062. #define ILFreeORD 155
  7063. #define ILGetNextORD 153
  7064. #define ILGetSizeORD 152
  7065. #define ILIsEqualORD 21
  7066. #define ILRemoveLastIDORD 17
  7067. #define PathAddBackslashORD 32
  7068. #define PathCombineORD 37
  7069. #define PathIsExeORD 43
  7070. #define PathMatchSpecORD 46
  7071. #define SHGetSetSettingsORD 68
  7072. #define SHILCreateFromPathORD 28
  7073. #define SHFreeORD 195
  7074. #define CheckWinIniForAssocsORD 711
  7075. // DOC'ed for DOJ Compliance
  7076. ;end_internal
  7077. #define OPENPROPS_NONE 0x0000
  7078. #define OPENPROPS_INHIBITPIF 0x8000
  7079. #define GETPROPS_NONE 0x0000
  7080. #define SETPROPS_NONE 0x0000
  7081. #define CLOSEPROPS_NONE 0x0000
  7082. #define CLOSEPROPS_DISCARD 0x0001
  7083. #define PIFNAMESIZE 30
  7084. #define PIFSTARTLOCSIZE 63
  7085. #define PIFDEFPATHSIZE 64
  7086. #define PIFPARAMSSIZE 64
  7087. #define PIFSHPROGSIZE 64
  7088. #define PIFSHDATASIZE 64
  7089. #define PIFDEFFILESIZE 80
  7090. #define PIFMAXFILEPATH 260
  7091. typedef struct PROPPRG { /* prg */
  7092. WORD flPrg; // see PRG_ flags
  7093. WORD flPrgInit; // see PRGINIT_ flags
  7094. CHAR achTitle[PIFNAMESIZE]; // name[30]
  7095. CHAR achCmdLine[PIFSTARTLOCSIZE+PIFPARAMSSIZE+1];// startfile[63] + params[64]
  7096. CHAR achWorkDir[PIFDEFPATHSIZE]; // defpath[64]
  7097. WORD wHotKey; // PfHotKeyScan thru PfHotKeyVal
  7098. CHAR achIconFile[PIFDEFFILESIZE]; // name of file containing icon
  7099. WORD wIconIndex; // index of icon within file
  7100. DWORD dwEnhModeFlags; // reserved enh-mode flags
  7101. DWORD dwRealModeFlags; // real-mode flags (see RMOPT_*)
  7102. CHAR achOtherFile[PIFDEFFILESIZE]; // name of "other" file in directory
  7103. CHAR achPIFFile[PIFMAXFILEPATH]; // name of PIF file
  7104. } PROPPRG;
  7105. typedef UNALIGNED PROPPRG *PPROPPRG;
  7106. typedef UNALIGNED PROPPRG FAR *LPPROPPRG;
  7107. typedef const UNALIGNED PROPPRG FAR *LPCPROPPRG;
  7108. SHSTDAPI_(HANDLE) PifMgr_OpenProperties(LPCWSTR pszApp, LPCWSTR pszPIF, UINT hInf, UINT flOpt);
  7109. SHSTDAPI_(int) PifMgr_GetProperties(HANDLE hProps, LPCSTR pszGroup, void *lpProps, int cbProps, UINT flOpt);
  7110. SHSTDAPI_(int) PifMgr_SetProperties(HANDLE hProps, LPCSTR pszGroup, const VOID *lpProps, int cbProps, UINT flOpt);
  7111. SHSTDAPI_(HANDLE) PifMgr_CloseProperties(HANDLE hProps, UINT flOpt);
  7112. SHSTDAPI_(void) SHSetInstanceExplorer(IUnknown *punk);
  7113. ;begin_internal
  7114. #ifndef WINNT
  7115. // Always usr TerminateThreadEx.
  7116. BOOL APIENTRY TerminateThreadEx(HANDLE hThread, DWORD dwExitCode, BOOL bCleanupFlag);
  7117. #define TerminateThread(hThread, dwExitCode) TerminateThreadEx(hThread, dwExitCode, TRUE)
  7118. #endif
  7119. // DOC'ed for DOJ Compliance
  7120. ;end_internal
  7121. SHSTDAPI_(BOOL) IsUserAnAdmin(void);
  7122. ;begin_internal
  7123. SHSTDAPI SHCreateSessionKey(REGSAM sam, HKEY *phkOut);
  7124. // Sortof Gross but if we pass this flag in with STGM_CREATE we will fail if file already exists
  7125. // with ERROR_ALREADY_EXISTS
  7126. #define CSOF_FAILIFTHERE 0x80000000L
  7127. //===========================================================================
  7128. // Structure for covert communication
  7129. // between shdocvw's CShellBrowser::Exec()
  7130. // and shell32's DefView WM_COMMAND handler
  7131. // NOTE: this structure is revealed in the KB
  7132. // (articles Q252610 and Q216954). So even though
  7133. // it's in a private section, treat it as public.
  7134. struct _DFVCMDDATA
  7135. {
  7136. HWND hwnd; // Browser hwnd
  7137. VARIANTARG *pva; // Args passed to Exec()
  7138. DWORD nCmdIDTranslated; // Replacement OLECMDID_* value
  7139. };
  7140. typedef struct _DFVCMDDATA DFVCMDDATA;
  7141. typedef struct _DFVCMDDATA *LPDFVCMDDATA;
  7142. typedef const struct _DFVCMDDATA *LPCDFVCMDDATA;
  7143. SHSTDAPI_(DWORD) SHGetProcessDword(DWORD idProcess, LONG iIndex);
  7144. SHSTDAPI_(BOOL) SHSetShellWindowEx(HWND hwnd, HWND hwndChild);
  7145. #define CCH_MENUMAX 80 // DOC: max size of a menu string
  7146. // WinEventHandler message ranges
  7147. #define MBHM_FIRST (0x00000001) // MenuBandHandler
  7148. #define MBHM_LAST (0x000000ff)
  7149. #define MSFM_FIRST (0x00000100) // MenuShellFolder
  7150. #define MSFM_LAST (0x000001ff)
  7151. #define FSFM_FIRST (0x00000200) // FileShellFolder
  7152. #define FSFM_LAST (0x000002ff)
  7153. //-------------------------------------------------------------------------
  7154. //
  7155. // SID_SMenuBandHandler
  7156. //
  7157. // The menuband calls QueryService(SID_SMenuBandHandler, IID_IWinEventHandler)
  7158. // on its shellfolder. If the shellfolder supports this service, the
  7159. // menuband will call the event handler on certain menu events. These
  7160. // events and messages are as follows:
  7161. //
  7162. // MBHM_INITMENUPOPUP sent when a drop-down menu or submenu is
  7163. // about to become active.
  7164. //
  7165. //
  7166. // File-system ShellFolder events:
  7167. //
  7168. // FSFM_COMMAND sent when a file-system item is executed
  7169. //
  7170. //-------------------------------------------------------------------------
  7171. typedef struct tagMBINITMENUPOPUP
  7172. {
  7173. DWORD dwMask; // MBIMP_*
  7174. IShellFolder * psf;
  7175. LPCITEMIDLIST pidl;
  7176. HMENU hmenu;
  7177. int iPos;
  7178. } MBINITMENUPOPUP;
  7179. #define MBIMP_HMENU 0x00000001 // hmenu and iPos are set
  7180. // Messages sent to the WinEventHandler wParam lParam *plRet
  7181. // ------ ------ ---
  7182. #define MBHM_INITMENUPOPUP (MBHM_FIRST+0) // 0 MBINITMENUPOPUP *
  7183. // Messages sent to the WinEventHandler wParam lParam *plRet
  7184. // ------ ------ ------
  7185. #define FSFM_COMMAND (FSFM_FIRST+0) // cmd ID pidl
  7186. //-------------------------------------------------------------------------
  7187. //
  7188. // IAugmentedShellFolder interface
  7189. //
  7190. // This provides methods to add multiple Shell Folder objects to a
  7191. // single augmented object (CLSID_AugmentedShellFolder), which will
  7192. // enumerate them as if they were in a single namespace.
  7193. //
  7194. //
  7195. // [Member functions]
  7196. //
  7197. // IAugmentedShellFolder::AddNameSpace(rguidObject, psf, pidl)
  7198. // Add the object represented by the IShellFolder interface to
  7199. // the augmented list. The rguidObject is used to identify the
  7200. // given object. It may be NULL. The optional pidl refers to
  7201. // the location of the psf.
  7202. //
  7203. // IAugmentedShellFolder::GetNameSpaceID(pidl, rguidOut)
  7204. // This method returns the rguidObject associated with the given
  7205. // pidl. This is how a caller can identify which namespace the
  7206. // pidl resides, given the list of IShellFolder objects that were
  7207. // added to this augmented object.
  7208. //
  7209. // IAugmentedShellFolder::QueryNameSpace(dwNameSpaceID, pguidOut, ppsf)
  7210. // Returns the shellfolder and guid associated with the given ID.
  7211. //
  7212. // IAugmentedShellFolder::EnumNameSpace(uNameSpace, pdwNameSpaceID)
  7213. // Enumerates the namespace shellfolders. If uNameSpace is -1,
  7214. // pdwNameSpaceID is ignored and this method returns the count of
  7215. // shellfolders in the augmented namespace. Call this method with
  7216. // uNameSpace starting at 0 to begin enumerating. Returns S_OK and
  7217. // and namespace ID in *pdwNameSpaceID.
  7218. //
  7219. //-------------------------------------------------------------------------
  7220. // IAugmentedShellFolder::AddNameSpace flags
  7221. enum
  7222. {
  7223. ASFF_DEFAULT = 0x00000000, // There are no applicable Flags
  7224. ASFF_SORTDOWN = 0x00000001, // Sort the items in this ISF to the bottom.
  7225. ASFF_MERGESAMEGUID = 0x00000002, // Merge only namespaces with the same pguidObjects
  7226. ASFF_COMMON = 0x00000004, // this is a "Common" or "All Users" folder
  7227. // the following should all be collapsed to one ASFF_DEFNAMESPACE
  7228. ASFF_DEFNAMESPACE_BINDSTG = 0x00000100, // The namespace is the default handler for BindToStorage() for merged child items.
  7229. ASFF_DEFNAMESPACE_COMPARE = 0x00000200, // The namespace is the default handler for CompareIDs() for merged child items.
  7230. ASFF_DEFNAMESPACE_VIEWOBJ = 0x00000400, // The namespace is the default handler for CreateViewObject() for merged child items.
  7231. ASFF_DEFNAMESPACE_ATTRIB = 0x00001800, // The namespace is the default handler for GetAttributesOf() for merged child items.
  7232. ASFF_DEFNAMESPACE_DISPLAYNAME = 0x00001000, // The namespace is the default handler for GetDisplayNameOf(), SetNameOf() and ParseDisplayName() for merged child items.
  7233. ASFF_DEFNAMESPACE_UIOBJ = 0x00002000, // The namespace is the default handler for GetUIObjectOf() for merged child items.
  7234. ASFF_DEFNAMESPACE_ITEMDATA = 0x00004000, // The namespace is the default handler for GetItemData() for merged child items.
  7235. ASFF_DEFNAMESPACE_ALL = 0x0000FF00 // The namespace is the primary handler for all IShellFolder operations on merged child items.
  7236. };
  7237. enum QUERYNAMESPACEINFO_MASK
  7238. {
  7239. ASFQNSI_FLAGS = 0x00000001,
  7240. ASFQNSI_FOLDER = 0x00000002,
  7241. ASFQNSI_GUID = 0x00000004,
  7242. ASFQNSI_PIDL = 0x00000008,
  7243. };
  7244. #include <pshpack8.h>
  7245. typedef struct QUERYNAMESPACEINFO
  7246. {
  7247. DWORD cbSize;
  7248. DWORD dwMask;
  7249. DWORD dwFlags; // ASFF_*
  7250. IShellFolder *psf;
  7251. GUID guidObject;
  7252. LPITEMIDLIST pidl;
  7253. } QUERYNAMESPACEINFO;
  7254. #include <poppack.h> /* Return to byte packing */
  7255. #undef INTERFACE
  7256. #define INTERFACE IAugmentedShellFolder
  7257. DECLARE_INTERFACE_(IAugmentedShellFolder, IShellFolder)
  7258. {
  7259. // *** IUnknown methods ***
  7260. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7261. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7262. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7263. // *** IShellFolder methods ***
  7264. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner,LPBC pbc, LPOLESTR pszDisplayName,
  7265. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  7266. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  7267. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7268. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7269. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  7270. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  7271. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl, ULONG * rgfInOut) PURE;
  7272. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  7273. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  7274. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  7275. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  7276. LPCOLESTR pszName, DWORD uFlags,
  7277. LPITEMIDLIST * ppidlOut) PURE;
  7278. // *** IAugmentedShellFolder methods ***
  7279. STDMETHOD(AddNameSpace) (THIS_ const GUID * pguidObject, IShellFolder * psf,
  7280. LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  7281. STDMETHOD(GetNameSpaceID) (THIS_ LPCITEMIDLIST pidl, GUID * pguidOut) PURE;
  7282. STDMETHOD(QueryNameSpace) (THIS_ DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf) PURE;
  7283. STDMETHOD(EnumNameSpace) (THIS_ DWORD uNameSpace, DWORD * pdwID) PURE;
  7284. };
  7285. #undef INTERFACE
  7286. #define INTERFACE IAugmentedShellFolder2
  7287. DECLARE_INTERFACE_(IAugmentedShellFolder2, IAugmentedShellFolder)
  7288. {
  7289. // *** IUnknown methods ***
  7290. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7291. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7292. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7293. // *** IShellFolder methods ***
  7294. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  7295. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  7296. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  7297. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7298. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7299. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  7300. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  7301. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  7302. ULONG * rgfInOut) PURE;
  7303. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  7304. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  7305. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  7306. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  7307. LPCOLESTR pszName, DWORD uFlags,
  7308. LPITEMIDLIST * ppidlOut) PURE;
  7309. // *** IAugmentedShellFolder methods ***
  7310. STDMETHOD(AddNameSpace) (THIS_ const GUID * pguidObject, IShellFolder * psf,
  7311. LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  7312. STDMETHOD(GetNameSpaceID) (THIS_ LPCITEMIDLIST pidl, GUID * pguidOut) PURE;
  7313. STDMETHOD(QueryNameSpace) (THIS_ DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf) PURE;
  7314. STDMETHOD(EnumNameSpace) (THIS_ DWORD uNameSpace, DWORD * pdwID) PURE;
  7315. // *** IAugmentedShellFolder2 methods ***
  7316. STDMETHOD(UnWrapIDList) (THIS_ LPCITEMIDLIST pidlWrap, LONG cPidls, IShellFolder ** apsf, LPITEMIDLIST * apidlFolder, LPITEMIDLIST * apidlItems, LONG * pcFetched ) PURE ;
  7317. };
  7318. #undef INTERFACE
  7319. #define INTERFACE IAugmentedShellFolder3
  7320. DECLARE_INTERFACE_(IAugmentedShellFolder3, IAugmentedShellFolder2)
  7321. {
  7322. // *** IUnknown methods ***
  7323. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7324. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7325. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7326. // *** IShellFolder methods ***
  7327. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  7328. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  7329. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  7330. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7331. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7332. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  7333. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  7334. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  7335. ULONG * rgfInOut) PURE;
  7336. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  7337. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  7338. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  7339. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  7340. LPCOLESTR pszName, DWORD uFlags,
  7341. LPITEMIDLIST * ppidlOut) PURE;
  7342. // *** IAugmentedShellFolder methods ***
  7343. STDMETHOD(AddNameSpace) (THIS_ const GUID * pguidObject, IShellFolder * psf,
  7344. LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  7345. STDMETHOD(GetNameSpaceID) (THIS_ LPCITEMIDLIST pidl, GUID * pguidOut) PURE;
  7346. STDMETHOD(QueryNameSpace) (THIS_ DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf) PURE;
  7347. STDMETHOD(EnumNameSpace) (THIS_ DWORD uNameSpace, DWORD * pdwID) PURE;
  7348. // *** IAugmentedShellFolder2 methods ***
  7349. STDMETHOD(UnWrapIDList) (THIS_ LPCITEMIDLIST pidlWrap, LONG cPidls, IShellFolder ** apsf, LPITEMIDLIST * apidlFolder, LPITEMIDLIST * apidlItems, LONG * pcFetched ) PURE ;
  7350. // *** IAugmentedShellFolder3 methods ***
  7351. STDMETHOD(QueryNameSpace2) (THIS_ DWORD dwID, QUERYNAMESPACEINFO *pqnsi) PURE;
  7352. };
  7353. //-------------------------------------------------------------------------
  7354. //
  7355. // IProxyShellFolder interface
  7356. //
  7357. // This provides methods to set a proxy object which can respond
  7358. // to GetUIObjectOf instead of or in addition to the hosted object
  7359. // the supports IShellFolder. All other methods are forwarded onto
  7360. // the hosted object. The CLSID_HostProxyShellFolder object implements
  7361. // this interface.
  7362. //
  7363. // The Win95 shell does not support aggregation, so this object
  7364. // must be extra careful that it follows the rules of COM.
  7365. //
  7366. // This interface is implemented by an object that wishes to provide
  7367. // more support for GetUIObjectOf on behalf of another object that
  7368. // implements an original IShellFolder.
  7369. //
  7370. // [Member functions]
  7371. //
  7372. // IProxyShellFolder::InitHostProxy(psf, pidl, punk, dwFlags)
  7373. // Set the object that implements IProxyShellFolder. Depending
  7374. // on dwFlags, this object will be called instead of or in addition
  7375. // to the host's method.
  7376. //
  7377. // SPF_PRIORITY - call the proxy's method instead of
  7378. // the host's method.
  7379. // SPF_SECONDARY - call the proxy's method only if the
  7380. // host's method doesn't support it.
  7381. // SPF_INHERIT - create a new object of this class and
  7382. // hand it back for BindToObject.
  7383. // SPF_FOLDERPRECEDENCE - have the proxy give folders priority
  7384. // over files in a call to CompareIDs.
  7385. // SPF_HAVECALLBACK - have the proxy call the owner's
  7386. // IOleCommandTarget on each enumerated
  7387. // object, for filtering.
  7388. //
  7389. // Also sets as the host the given object which fully implements
  7390. // IShellFolder. pidl refers to the shell folder.
  7391. //
  7392. // IProxyShellFolder::CloneProxyPSF(riid, ppv)
  7393. // Tells the object to clone itself. The host proxy will call this
  7394. // whenever IShellFolder::BindToObject is called.
  7395. //
  7396. // IProxyShellFolder::GetUIObjectOfPSF(hwndOwner, cidl, apidl, riid, prgfInOut, ppv)
  7397. // Called by CLSID_HostProxyShellFolder to allow the proxy object
  7398. // an opportunity to respond.
  7399. //
  7400. // IProxyShellFolder::CreateViewObjectPSF(hwndOwner, riid, ppv)
  7401. // Called by CLSID_HostProxyShellFolder to allow the proxy object
  7402. // an opportunity to respond.
  7403. //
  7404. //-------------------------------------------------------------------------
  7405. // SetProxyObject flags
  7406. #define SPF_PRIORITY 0x00000001 // This is mutually exclusive w/ SPF_SECONDARY
  7407. #define SPF_SECONDARY 0x00000002
  7408. #define SPF_INHERIT 0x00000004
  7409. #define SPF_FOLDERPRECEDENCE 0x00000008
  7410. #define SPF_HAVECALLBACK 0x00000010
  7411. //For filtering of Pidls
  7412. #define PHID_FilterOutPidl 0
  7413. #undef INTERFACE
  7414. #define INTERFACE IProxyShellFolder
  7415. DECLARE_INTERFACE_(IProxyShellFolder, IShellFolder)
  7416. {
  7417. // *** IUnknown methods ***
  7418. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7419. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7420. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7421. // *** IShellFolder methods ***
  7422. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  7423. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  7424. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  7425. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7426. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7427. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  7428. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  7429. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  7430. ULONG * rgfInOut) PURE;
  7431. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  7432. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  7433. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  7434. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  7435. LPCOLESTR pszName, DWORD uFlags,
  7436. LPITEMIDLIST * ppidlOut) PURE;
  7437. // *** IProxyShellFolder methods ***
  7438. STDMETHOD(InitHostProxy) (THIS_ IShellFolder * psf, LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  7439. STDMETHOD(CloneProxyPSF) (THIS_ REFIID riid, void **ppv) PURE;
  7440. STDMETHOD(GetUIObjectOfPSF) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  7441. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  7442. STDMETHOD(CreateViewObjectPSF) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  7443. };
  7444. //-------------------------------------------------------------------------
  7445. //
  7446. // BUGBUG (scotth): I don't think we're using this anymore.
  7447. //
  7448. // ISetWinHandler interface
  7449. //
  7450. // [Member functions]
  7451. //
  7452. // ISetWinHandler::SetWindow(hwndOwner)
  7453. // Specifies the window owner. This may be NULL.
  7454. //
  7455. // ISetWinHandler::SetWinHandler(punk)
  7456. // Gives a pointer to an object which supports IWinEventHandler. The
  7457. // hwnd will be the window handle set by the SetWindow method. The
  7458. // handler should return S_OK if the message is handled, otherwise S_FALSE.
  7459. //
  7460. //-------------------------------------------------------------------------
  7461. #undef INTERFACE
  7462. #define INTERFACE ISetWinHandler
  7463. DECLARE_INTERFACE_(ISetWinHandler, IUnknown)
  7464. {
  7465. // *** IUnknown methods ***
  7466. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7467. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7468. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7469. // *** ISetWinHandler methods ***
  7470. STDMETHOD(SetWindow) (THIS_ HWND hwndOwner) PURE;
  7471. STDMETHOD(SetWinHandler) (THIS_ IUnknown * punk) PURE;
  7472. };
  7473. //-------------------------------------------------------------------------
  7474. //
  7475. // IMenuShellFolder interface
  7476. //
  7477. // This wraps a static HMENU with an IShellFolder interface.
  7478. //
  7479. //
  7480. // [Member functions]
  7481. //
  7482. // IMenuShellFolder::SetMenu(hmenu)
  7483. // Specifies the hmenu to wrap. This may be NULL.
  7484. //
  7485. // BUGBUG (scotth): does this copy or not?
  7486. //
  7487. // IMenuShellFolder::GetMenu(phmenu)
  7488. // Returns the current menu in *phmenu. Returns S_FALSE if no menu is
  7489. // set (*phmenu will be NULL).
  7490. //
  7491. // IMenuShellFolder::SetWindow(hwndOwner)
  7492. // Specifies the window owner. This may be NULL.
  7493. //
  7494. //-------------------------------------------------------------------------
  7495. // Messages sent to the WinEventHandler wParam lParam *plRet
  7496. // ------ ------ ---
  7497. #define MSFM_COMMAND (MSFM_FIRST+0) // cmd ID 0
  7498. #define MSFM_ISDROPTARGET (MSFM_FIRST+1) // id 0 1 if yes
  7499. #undef INTERFACE
  7500. #define INTERFACE IMenuShellFolder
  7501. DECLARE_INTERFACE_(IMenuShellFolder, IShellFolder)
  7502. {
  7503. // *** IUnknown methods ***
  7504. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7505. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7506. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7507. // *** IShellFolder methods ***
  7508. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  7509. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  7510. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  7511. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7512. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  7513. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  7514. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  7515. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  7516. ULONG * rgfInOut) PURE;
  7517. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  7518. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  7519. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  7520. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  7521. LPCOLESTR pszName, DWORD uFlags,
  7522. LPITEMIDLIST * ppidlOut) PURE;
  7523. // *** IMenuShellFolder methods ***
  7524. STDMETHOD(SetMenu) (THIS_ HMENU hmenu) PURE;
  7525. STDMETHOD(GetMenu) (THIS_ HMENU * phmenu) PURE;
  7526. STDMETHOD(SetWindow) (THIS_ HWND hwndOwner) PURE;
  7527. STDMETHOD(GetWindow) (THIS_ HWND *phwndOwner) PURE;
  7528. STDMETHOD(GetIDPosition) (THIS_ LPCITEMIDLIST pidl, int * pnPos) PURE;
  7529. };
  7530. //-------------------------------------------------------------------------
  7531. //
  7532. // ITranslateShellChangeNotify interface
  7533. //
  7534. // This interface allows an object to translate the pidls that are
  7535. // passed to it.
  7536. //
  7537. // Note: IE4 had an interface of the same name but with a different IID,
  7538. // so there is no conflict.
  7539. //
  7540. // [Member functions]
  7541. //
  7542. // ITranslateShellChangeNotify::TranslateIDs(&lEvent, pidl1, pidl2, ppidlOut1, ppidlOut2)
  7543. // Return converted pidls given the event. it also can change the event if appropriate
  7544. //
  7545. //-------------------------------------------------------------------------
  7546. #undef INTERFACE
  7547. #define INTERFACE ITranslateShellChangeNotify
  7548. DECLARE_INTERFACE_(ITranslateShellChangeNotify, IUnknown)
  7549. {
  7550. // *** IUnknown methods ***
  7551. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7552. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7553. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7554. // *** ITranslateShellChangeNotify methods ***
  7555. STDMETHOD(TranslateIDs) (THIS_ LONG *plEvent , LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, LPITEMIDLIST * ppidlOut1, LPITEMIDLIST * ppidlOut2,
  7556. LONG *plEvent2, LPITEMIDLIST * ppidlOut1Event2, LPITEMIDLIST * ppidlOut2Event2) PURE;
  7557. STDMETHOD(IsChildID)(THIS_ LPCITEMIDLIST pidlKid, BOOL fImmediate) PURE;
  7558. STDMETHOD(IsEqualID)(THIS_ LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  7559. STDMETHOD(Register)(THIS_ HWND hwnd, UINT uMsg, long lEvents) PURE;
  7560. STDMETHOD(Unregister)(THIS) PURE;
  7561. };
  7562. ////////////////////////////////////////////////////
  7563. //
  7564. // IRegTreeOptions
  7565. //
  7566. typedef enum tagBUTTON_STATES
  7567. {
  7568. IDCHECKED,
  7569. IDUNCHECKED,
  7570. IDRADIOON,
  7571. IDRADIOOFF,
  7572. IDUNKNOWN
  7573. } BUTTON_STATES;
  7574. //
  7575. // Avoid conflicts in the windows\shell project
  7576. //
  7577. #ifndef NO_SHELL_TREE_TYPE
  7578. typedef enum tagTREE_TYPE
  7579. {
  7580. TREE_CHECKBOX,
  7581. TREE_RADIO,
  7582. TREE_GROUP,
  7583. TREE_UNKNOWN
  7584. } TREE_TYPE;
  7585. #endif // NO_SHELL_TREE_TYPE
  7586. typedef enum tagWALK_TREE_CMD
  7587. {
  7588. WALK_TREE_SAVE,
  7589. WALK_TREE_DELETE,
  7590. WALK_TREE_RESTORE,
  7591. WALK_TREE_REFRESH
  7592. } WALK_TREE_CMD;
  7593. enum REG_CMD
  7594. {
  7595. REG_SET,
  7596. REG_GET,
  7597. REG_GETDEFAULT
  7598. };
  7599. #undef INTERFACE
  7600. #define INTERFACE IRegTreeOptions
  7601. DECLARE_INTERFACE_(IRegTreeOptions, IUnknown)
  7602. {
  7603. // *** IUnknown methods ***
  7604. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7605. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7606. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7607. // *** IRegTreeOptions specific methods ***
  7608. STDMETHOD(InitTree)(THIS_ HWND hwndTree, HKEY hkeyRoot, LPCSTR pszRegKey, LPCSTR pszParam) PURE;
  7609. STDMETHOD(WalkTree)(THIS_ WALK_TREE_CMD cmd ) PURE;
  7610. STDMETHOD(ToggleItem)(THIS_ HTREEITEM hti ) PURE;
  7611. STDMETHOD(ShowHelp)(THIS_ HTREEITEM hti , DWORD dwFlags ) PURE;
  7612. };
  7613. //
  7614. // Interface: IShellHotKey
  7615. //
  7616. #undef INTERFACE
  7617. #define INTERFACE IShellHotKey
  7618. DECLARE_INTERFACE_(IShellHotKey, IUnknown)
  7619. {
  7620. // *** IUnknown methods ***
  7621. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7622. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7623. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7624. // *** IShellHotKey methods ***
  7625. STDMETHOD(RegisterHotKey)(THIS_ IShellFolder * psf, LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidl) PURE;
  7626. };
  7627. //
  7628. // Interface: ITrayPriv
  7629. //
  7630. // Purpose: Talks to the new Start Menu code in Shdocvw from explorer.exe
  7631. //
  7632. // For flags on ShowFolder see inc\IETHREAD.H
  7633. //
  7634. #undef INTERFACE
  7635. #define INTERFACE ITrayPriv
  7636. DECLARE_INTERFACE_(ITrayPriv, IOleWindow)
  7637. {
  7638. // *** IUnknown methods ***
  7639. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7640. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7641. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7642. // *** IOleWindow methods ***
  7643. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  7644. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  7645. // *** ITrayPriv methods ***
  7646. STDMETHOD(ExecItem)(THIS_ IShellFolder* psf, LPCITEMIDLIST pidl) PURE;
  7647. STDMETHOD(GetFindCM)(THIS_ HMENU hmenu, UINT idFirst, UINT idLast, IContextMenu** ppcmFind) PURE;
  7648. STDMETHOD(GetStaticStartMenu)(THIS_ HMENU* phmenu) PURE;
  7649. };
  7650. // ITrayPriv2 - new for Whistler
  7651. //
  7652. // Purpose: Allows Explorer Start Menu object to participate in customdraw.
  7653. //
  7654. #undef INTERFACE
  7655. #define INTERFACE ITrayPriv2
  7656. DECLARE_INTERFACE_(ITrayPriv2, ITrayPriv)
  7657. {
  7658. // *** IUnknown methods ***
  7659. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7660. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7661. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7662. // *** IOleWindow methods ***
  7663. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  7664. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  7665. // *** ITrayPriv methods ***
  7666. STDMETHOD(ExecItem)(THIS_ IShellFolder* psf, LPCITEMIDLIST pidl) PURE;
  7667. STDMETHOD(GetFindCM)(THIS_ HMENU hmenu, UINT idFirst, UINT idLast, IContextMenu** ppcmFind) PURE;
  7668. STDMETHOD(GetStaticStartMenu)(THIS_ HMENU* phmenu) PURE;
  7669. // *** ITrayPriv2 methods ***
  7670. STDMETHOD(ModifySMInfo)(THIS_ IN LPSMDATA psmd, IN OUT SMINFO *psminfo) PURE;
  7671. };
  7672. ;end_internal
  7673. #undef INTERFACE
  7674. #define INTERFACE IInitializeObject
  7675. DECLARE_INTERFACE_(IInitializeObject, IUnknown)
  7676. {
  7677. // *** IUnknown methods ***
  7678. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7679. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7680. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7681. // *** IInitializeObject methods
  7682. STDMETHOD(Initialize)(THIS) PURE;
  7683. };
  7684. enum
  7685. {
  7686. BMICON_LARGE = 0,
  7687. BMICON_SMALL
  7688. };
  7689. #undef INTERFACE
  7690. #define INTERFACE IBanneredBar
  7691. DECLARE_INTERFACE_(IBanneredBar, IUnknown)
  7692. {
  7693. // *** IUnknown methods ***
  7694. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7695. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7696. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7697. // *** IBanneredBar methods ***
  7698. STDMETHOD(SetIconSize)(THIS_ DWORD iIcon) PURE;
  7699. STDMETHOD(GetIconSize)(THIS_ DWORD* piIcon) PURE;
  7700. STDMETHOD(SetBitmap)(THIS_ HBITMAP hBitmap) PURE;
  7701. STDMETHOD(GetBitmap)(THIS_ HBITMAP* phBitmap) PURE;
  7702. };
  7703. ;begin_internal
  7704. //
  7705. // Interface: IFolderShortcutConvert
  7706. //
  7707. // Purpose: Converts between FolderShortcuts and links
  7708. //
  7709. #undef INTERFACE
  7710. #define INTERFACE IFolderShortcutConvert
  7711. DECLARE_INTERFACE_(IFolderShortcutConvert, IUnknown)
  7712. {
  7713. // *** IUnknown methods ***
  7714. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  7715. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  7716. STDMETHOD_(ULONG,Release)(THIS) PURE;
  7717. //*** IFolderShortcutConvert methods ***
  7718. STDMETHOD(ConvertToLink)(THIS_ LPCOLESTR pszFSPath, DWORD fFlags) PURE;
  7719. STDMETHOD(ConvertToFolderShortcut)(THIS_ LPCOLESTR pszLinkPath, DWORD fFlags) PURE;
  7720. };
  7721. //
  7722. // Interface: IShellFolderTask
  7723. //
  7724. // Purpose: Initializes a task that does something by enumerating a shellfolder
  7725. //
  7726. #undef INTERFACE
  7727. #define INTERFACE IShellFolderTask
  7728. DECLARE_INTERFACE_(IShellFolderTask, IUnknown)
  7729. {
  7730. // *** IUnknown methods ***
  7731. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  7732. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  7733. STDMETHOD_(ULONG,Release)(THIS) PURE;
  7734. // *** IShellFolderTask methods ***
  7735. STDMETHOD(InitTaskSFT)(THIS_ IShellFolder *psfParent, LPITEMIDLIST pidlFull,
  7736. LONG nMaxRecursionLevel, DWORD dwFlags, DWORD dwTaskPriority) PURE;
  7737. };
  7738. // Flags for InitTaskSFT
  7739. #define ITSFT_RECURSE 0x00000001 // recurse into subfolders
  7740. //
  7741. // Interface: IStartMenuTask
  7742. //
  7743. // Purpose: Initializes a task that does something for the start menu
  7744. //
  7745. #undef INTERFACE
  7746. #define INTERFACE IStartMenuTask
  7747. DECLARE_INTERFACE_(IStartMenuTask, IShellFolderTask)
  7748. {
  7749. // *** IUnknown methods ***
  7750. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  7751. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  7752. STDMETHOD_(ULONG,Release)(THIS) PURE;
  7753. // *** IShellFolderTask methods ***
  7754. STDMETHOD(InitTaskSFT)(THIS_ IShellFolder *psfParent, LPITEMIDLIST pidlFull,
  7755. LONG nMaxRecursionLevel, DWORD dwFlags, DWORD dwTaskPriority) PURE;
  7756. // *** IStartMenuTask methods ***
  7757. STDMETHOD(InitTaskSMT)(THIS_ IShellHotKey * photkey, int iThreadPriority) PURE;
  7758. };
  7759. //
  7760. // Interface: IContextMenuCB
  7761. //
  7762. // Purpose: A call defview context menu callback object
  7763. //
  7764. #undef INTERFACE
  7765. #define INTERFACE IContextMenuCB
  7766. DECLARE_INTERFACE_(IContextMenuCB, IUnknown)
  7767. {
  7768. // *** IUnknown methods ***
  7769. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7770. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7771. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7772. // *** IContextMenuCB methods ***
  7773. STDMETHOD(CallBack) (THIS_ IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg,
  7774. WPARAM wParam, LPARAM lParam) PURE;
  7775. };
  7776. //
  7777. // Possible underline settings for shell icons.
  7778. //
  7779. enum
  7780. {
  7781. ICON_YES,
  7782. ICON_NO,
  7783. ICON_HOVER,
  7784. ICON_IE // Use IE hyperlink settings
  7785. };
  7786. //-----------------------------------------------
  7787. // IOleCommand Target Command IDs
  7788. // CGID_BandHandler
  7789. // Get the order stream from parent.
  7790. #define BHCMDID_GetOrderStream 0x00000001
  7791. // CGID_Persist
  7792. // Set the storage key.
  7793. #define MCBID_SetKey 0x00000001
  7794. // CGID_MenuBandItem
  7795. #define MBICMDID_IsVisible 0x00000001
  7796. // CGID_MenuBand
  7797. #define MBANDCID_REFRESH 0x10000000
  7798. //
  7799. // Interface: IShellMallocSpy
  7800. //
  7801. // Purpose: Facilitate IMallocSpy in the shell
  7802. //
  7803. #undef INTERFACE
  7804. #define INTERFACE IShellMallocSpy
  7805. DECLARE_INTERFACE_(IShellMallocSpy, IUnknown)
  7806. {
  7807. // *** IUnknown methods ***
  7808. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7809. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7810. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7811. // *** IShellMallocSpy methods ***
  7812. STDMETHOD(RegisterSpy) (THIS) PURE;
  7813. STDMETHOD(RevokeSpy) (THIS) PURE;
  7814. STDMETHOD(SetTracking) (THIS_ BOOL bTrack) PURE;
  7815. STDMETHOD(AddToList) (THIS_ void *pv, SIZE_T cb) PURE;
  7816. STDMETHOD(RemoveFromList) (THIS_ void *pv) PURE;
  7817. };
  7818. #undef INTERFACE
  7819. #define INTERFACE ISearchProvider
  7820. DECLARE_INTERFACE_(ISearchProvider, IUnknown)
  7821. {
  7822. // *** IUnknown methods ***
  7823. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7824. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7825. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7826. // *** ISearchObject methods ***
  7827. STDMETHOD(GetSearchGUID)(THIS_ LPGUID lpGuid) PURE;
  7828. };
  7829. #undef INTERFACE
  7830. #define INTERFACE ISearchItems
  7831. DECLARE_INTERFACE_(ISearchItems, IUnknown)
  7832. {
  7833. // *** IUnknown methods ***
  7834. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7835. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7836. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7837. // *** ISearchItems methods ***
  7838. //used by CSearchBand
  7839. STDMETHOD(GetDefaultSearchUrl) (THIS_ LPWSTR pwzUrl, UINT cch) PURE;
  7840. };
  7841. #undef INTERFACE
  7842. #define INTERFACE ISearchBandTBHelper50
  7843. DECLARE_INTERFACE_(ISearchBandTBHelper50, IUnknown)
  7844. {
  7845. // *** IUnknown methods ***
  7846. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7847. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7848. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7849. // *** ISearchBandTBHelper50 methods ***
  7850. // implemented by CSearchBand
  7851. STDMETHOD(AddNextMenuItem) (THIS_ LPCWSTR pwszText, int idItem) PURE;
  7852. STDMETHOD(SetOCCallback) (THIS_ IOleCommandTarget *pOleCmdTarget) PURE;
  7853. STDMETHOD(ResetNextMenu) (THIS) PURE;
  7854. };
  7855. #undef INTERFACE
  7856. #define INTERFACE ISearchBandTBHelper
  7857. DECLARE_INTERFACE_(ISearchBandTBHelper, IUnknown)
  7858. {
  7859. // *** IUnknown methods ***
  7860. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7861. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7862. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7863. // *** ISearchBandTBHelper methods ***
  7864. // implemented by CSearchBand
  7865. STDMETHOD(AddNextMenuItem) (THIS_ LPCWSTR pwszText, int idItem) PURE;
  7866. STDMETHOD(SetOCCallback) (THIS_ IOleCommandTarget *pOleCmdTarget) PURE;
  7867. STDMETHOD(ResetNextMenu) (THIS) PURE;
  7868. STDMETHOD(NavigateToPidl) (THIS_ LPCITEMIDLIST pidl) PURE;
  7869. };
  7870. #undef INTERFACE
  7871. #define INTERFACE IEnumUrlSearch
  7872. #include <pshpack8.h>
  7873. typedef struct
  7874. {
  7875. GUID guid;
  7876. WCHAR wszName[80];
  7877. WCHAR wszUrl[2048];
  7878. } URLSEARCH, *LPURLSEARCH;
  7879. #include <poppack.h> /* Return to byte packing */
  7880. DECLARE_INTERFACE_(IEnumUrlSearch, IUnknown)
  7881. {
  7882. // *** IUnknown methods ***
  7883. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  7884. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7885. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7886. // *** IEnumUrlSearch methods ***
  7887. STDMETHOD(Next)(THIS_ ULONG celt, LPURLSEARCH rgelt, ULONG *pceltFetched) PURE;
  7888. STDMETHOD(Skip)(THIS_ ULONG celt) PURE;
  7889. STDMETHOD(Reset)(THIS) PURE;
  7890. STDMETHOD(Clone)(THIS_ IEnumUrlSearch **ppenum) PURE;
  7891. };
  7892. #undef INTERFACE
  7893. #define INTERFACE IFolderSearches
  7894. DECLARE_INTERFACE_(IFolderSearches, IUnknown)
  7895. {
  7896. // *** IUnknown methods ***
  7897. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  7898. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7899. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7900. // *** IFolderSearches methods ***
  7901. STDMETHOD(EnumSearches) (THIS_ IEnumUrlSearch **ppenum) PURE;
  7902. STDMETHOD(DefaultSearch) (THIS_ GUID *pguid) PURE;
  7903. };
  7904. #undef INTERFACE
  7905. #define INTERFACE IUserAssist
  7906. typedef struct
  7907. {
  7908. DWORD cbSize; // SIZEOF
  7909. DWORD dwMask; // INOUT requested/given (UEIM_*)
  7910. int cHit; // profile count
  7911. DWORD dwAttrs; // attributes (UEIA_*)
  7912. FILETIME ftExecute; // Last execute filetime
  7913. } UEMINFO, *LPUEMINFO;
  7914. #define UEIM_HIT 0x01
  7915. #define UEIM_FILETIME 0x02
  7916. DECLARE_INTERFACE_(IUserAssist, IUnknown)
  7917. {
  7918. // *** IUnknown methods ***
  7919. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7920. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7921. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7922. // *** IUserAssist methods ***
  7923. STDMETHOD(FireEvent)(THIS_ const GUID *pguidGrp, int eCmd, DWORD dwFlags, WPARAM wParam, LPARAM lParam) PURE;
  7924. STDMETHOD(QueryEvent)(THIS_ const GUID *pguidGrp, int eCmd, WPARAM wParam, LPARAM lParam, LPUEMINFO pui) PURE;
  7925. STDMETHOD(SetEvent)(THIS_ const GUID *pguidGrp, int eCmd, WPARAM wParam, LPARAM lParam, LPUEMINFO pui) PURE;
  7926. };
  7927. // This exists for the Internet Control Panel to be able to toggle who is the
  7928. // currently installed handler for FTP for the browser.
  7929. DECLARE_INTERFACE_(IFtpInstaller, IUnknown)
  7930. {
  7931. // *** IUnknown methods ***
  7932. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7933. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7934. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7935. // *** IFtpInstaller methods ***
  7936. STDMETHOD(IsIEDefautlFTPClient)(THIS) PURE;
  7937. STDMETHOD(RestoreFTPClient)(THIS) PURE;
  7938. STDMETHOD(MakeIEDefautlFTPClient)(THIS) PURE;
  7939. };
  7940. // DOC'ed for DOJ compliance
  7941. ;end_internal
  7942. SHSTDAPI_(LRESULT) SHShellFolderView_Message(HWND hwndMain, UINT uMsg, LPARAM lParam);
  7943. //
  7944. // Callback interface for the IShellFolderView
  7945. //
  7946. #undef INTERFACE
  7947. #define INTERFACE IShellFolderViewCB
  7948. DECLARE_INTERFACE_(IShellFolderViewCB, IUnknown)
  7949. {
  7950. // *** IUnknown methods ***
  7951. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  7952. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  7953. STDMETHOD_(ULONG,Release) (THIS) PURE;
  7954. // *** IShellFolderViewCB methods ***
  7955. STDMETHOD(MessageSFVCB)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  7956. };
  7957. ;begin_internal
  7958. #define CLR_MYINVALID 0x8fffffff // I need to use a special value since CLR_INVALID == CLR_NONE!!!!
  7959. #define ISVALIDCOLOR(a) ((a) != CLR_MYINVALID)
  7960. // The following are used as indexes into the crCustomColors array.
  7961. #define CRID_CUSTOMTEXTBACKGROUND 0
  7962. #define CRID_CUSTOMTEXT 1
  7963. #define CRID_COLORCOUNT 2
  7964. typedef struct _CUSTOMVIEWSDATA
  7965. {
  7966. DWORD cchSizeOfBlock; // size of lpDataBlock in WCHARs
  7967. LPWSTR lpDataBlock; // Pointer to the Strings data block, allocated by the task allocator (SHAlloc)
  7968. // The following are offsets (in WCHARs) to be added to lpDataBlock.
  7969. // If the offset is -1 => That data is not present for this view.
  7970. int acchOffExtViewUIstr[6]; // ID_EXTVIEWSTRCOUNT was 6, but is no longer used
  7971. COLORREF crCustomColors[CRID_COLORCOUNT];
  7972. // Once IE4 ships, we can extend this structure by adding new SFVF_ flags
  7973. // in the main structure that say "customviewsdata contains xxx info".
  7974. } CUSTOMVIEWSDATA;
  7975. //
  7976. // Interface for enumerating "external" views for the ShellFolderView
  7977. //
  7978. typedef struct _SFVVIEWSDATA
  7979. {
  7980. // idView specifies the view. Unless specified in pCustomData, look up
  7981. // HKLM\CLSID\Software\Microsoft\Windows\CurrentVersion\ExtShellFolderViews\idView
  7982. // to find the menu name, help text, tt text.
  7983. //
  7984. // the shell's IShellFolderView implementations get these as
  7985. // subkeys of the shellex\ExtShellFolderViews key under the folder's
  7986. // clsid type (or progid type, depending on the IShellFolderView impl).
  7987. //
  7988. // In desktop.ini, these are keys read from the [ExtShellFolderViews]
  7989. // section, in the form of "{idView}" or "{idView}={idExtShellView}"
  7990. //
  7991. GUID idView; // This is the GUID that specifies the View.
  7992. // idExtShellView specifies the IDefViewExtInit IShellView extension
  7993. // to use for this view.
  7994. //
  7995. // the shell's IShellFolderView implementations get this from
  7996. // the "ISV" value under the shellex\ExtShellFolderViews\{idView}
  7997. // key in the registry.
  7998. //
  7999. // In desktop.ini, this is read from the [ExtShellFolderViews]
  8000. // section, in the form of "{idView}={idExtShellView}"
  8001. //
  8002. GUID idExtShellView; // [optional] This is the GUID for the extended IShellView
  8003. // dwFlags - see the SFVF_ flags below.
  8004. //
  8005. // the shell's IShellFolderView implementations get this from
  8006. // the "Attributes" value under the shellex\ExtShellFolderViews\{idView}
  8007. // key in the registry.
  8008. //
  8009. // In desktop.ini, this is read from the [{idView}] section,
  8010. // from the "Attributes=" line.
  8011. //
  8012. DWORD dwFlags;
  8013. // lParam is passed to IShellView view extensions
  8014. //
  8015. // the shell's IShellFolderView implementations get this from
  8016. // the "lparam" value under the shellex\ExtShellFolderViews\{idView}
  8017. // key in the registry.
  8018. //
  8019. // In desktop.ini, this is read from the [{idView}] section,
  8020. // from the "LParam=" line.
  8021. //
  8022. DWORD lParam;
  8023. // wszMoniker is used to either bind to a docobject extended view,
  8024. // or as the data for an idExtShellView view.
  8025. //
  8026. // the shell's IShellFolderView implementations get this from
  8027. // the "PersistMoniker" value under the shellex\ExtShellFolderViews\{idView}
  8028. // key in the registry.
  8029. //
  8030. // In desktop.ini, this is read from the [{idView}] section,
  8031. // from the "PersistMoniker=" line.
  8032. //
  8033. WCHAR wszMoniker[MAX_PATH];
  8034. // pCustomData overrides/provides menu and other ui options
  8035. // for this view. If a WebViewFolderContents OC appears in the
  8036. // docobject extended view, it pays attention to color and
  8037. // background bitmaps.
  8038. //
  8039. // the shell's IShellFolderView implementations do not fill out this structure.
  8040. //
  8041. // In desktop.ini, this is read from the [{idView}] section,
  8042. // from the "IconArea_Image", "IconArea_TextBackground", and "IconArea_Text".
  8043. //
  8044. CUSTOMVIEWSDATA *pCustomData; //This is valid only if SFVF_CUSTOMIZEDVIEW is set.
  8045. } SFVVIEWSDATA;
  8046. //
  8047. // SFVF_CUSTOMIZEDVIEW - This flag is set only for those views whose
  8048. // data are picked up from the Desktop.ini.
  8049. //
  8050. #define SFVF_CUSTOMIZEDVIEW 0x80000000
  8051. //
  8052. // SFVF_TREATASNORMAL - This flag is set for those views that wish to
  8053. // be treated as normal views, this means they will show up in the file-open/SaveAs
  8054. // Dialogs.
  8055. //
  8056. #define SFVF_TREATASNORMAL 0x40000000
  8057. //
  8058. // SFVF_NOWEBVIEWFOLDERCONTENTS - This is used to detect those views that
  8059. // never host the WebViewFolderContents OC and so cannot toggle on and off,
  8060. // ie, they are exclusive views such as Thumbnail View.
  8061. //
  8062. #define SFVF_NOWEBVIEWFOLDERCONTENTS 0x20000000
  8063. #undef INTERFACE
  8064. #define INTERFACE IEnumSFVViews
  8065. DECLARE_INTERFACE_(IEnumSFVViews, IUnknown)
  8066. {
  8067. // *** IUnknown methods ***
  8068. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  8069. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  8070. STDMETHOD_(ULONG,Release) (THIS) PURE;
  8071. // *** IEnumSFVViews methods ***
  8072. STDMETHOD(Next) (THIS_ ULONG celt,
  8073. SFVVIEWSDATA **ppData,
  8074. ULONG *pceltFetched) PURE;
  8075. STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
  8076. STDMETHOD(Reset) (THIS) PURE;
  8077. STDMETHOD(Clone) (THIS_ IEnumSFVViews **ppenum) PURE;
  8078. };
  8079. #undef INTERFACE
  8080. #define INTERFACE IPersistString
  8081. DECLARE_INTERFACE_(IPersistString, IUnknown)
  8082. {
  8083. // *** IUnknown methods ***
  8084. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  8085. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  8086. STDMETHOD_(ULONG,Release) (THIS) PURE;
  8087. // *** IPersist methods ***
  8088. STDMETHOD(GetClassID) (THIS_ LPCLSID lpClassID) PURE;
  8089. // *** IPersistString methods ***
  8090. STDMETHOD(Initialize) (THIS_ LPCWSTR pwszInit) PURE;
  8091. };
  8092. #pragma warning (disable: 4200)
  8093. #pragma warning (disable: 4510)
  8094. #pragma warning (disable: 4512)
  8095. #pragma warning (disable: 4610)
  8096. // From sdkinc\platform.h
  8097. // We can't simply include that file because it breaks other projects
  8098. // that include platform.h.
  8099. // DOC'ed for DOJ compliance:
  8100. ;end_internal
  8101. ;begin_both
  8102. #include <pshpack8.h>
  8103. ;end_both
  8104. #undef UNSIZED_ARRAY2
  8105. #undef EMPTY_SIZE2
  8106. #define UNSIZED_ARRAY2
  8107. #define EMPTY_SIZE2 UNSIZED_ARRAY2
  8108. #define QCMINFO_PLACE_BEFORE 0
  8109. #define QCMINFO_PLACE_AFTER 1
  8110. typedef struct _QCMINFO_IDMAP_PLACEMENT
  8111. {
  8112. UINT id;
  8113. UINT fFlags;
  8114. } QCMINFO_IDMAP_PLACEMENT;
  8115. typedef struct _QCMINFO_IDMAP
  8116. {
  8117. UINT nMaxIds;
  8118. QCMINFO_IDMAP_PLACEMENT pIdList[1];
  8119. } QCMINFO_IDMAP;
  8120. typedef struct _QCMINFO
  8121. {
  8122. HMENU hmenu; // in
  8123. UINT indexMenu; // in
  8124. UINT idCmdFirst; // in/out
  8125. UINT idCmdLast; // in
  8126. QCMINFO_IDMAP const* pIdMap; // in / unused
  8127. } QCMINFO;
  8128. typedef QCMINFO * LPQCMINFO;
  8129. // TBINFO flags
  8130. #define TBIF_APPEND 0
  8131. #define TBIF_PREPEND 1
  8132. #define TBIF_REPLACE 2
  8133. #define TBIF_DEFAULT 0x00000000
  8134. #define TBIF_INTERNETBAR 0x00010000
  8135. #define TBIF_STANDARDTOOLBAR 0x00020000
  8136. #define TBIF_NOTOOLBAR 0x00030000
  8137. typedef struct _TBINFO
  8138. {
  8139. UINT cbuttons; // out
  8140. UINT uFlags; // out (one of TBIF_ flags)
  8141. } TBINFO;
  8142. ;begin_internal
  8143. typedef struct _SFVM_SELCHANGE_DATA
  8144. {
  8145. UINT uOldState;
  8146. UINT uNewState;
  8147. LPARAM lParamItem;
  8148. } SFVM_SELCHANGE_DATA;
  8149. typedef struct _COPYHOOKINFO
  8150. {
  8151. HWND hwnd;
  8152. DWORD wFunc;
  8153. DWORD wFlags;
  8154. LPCTSTR pszSrcFile;
  8155. DWORD dwSrcAttribs;
  8156. LPCTSTR pszDestFile;
  8157. DWORD dwDestAttribs;
  8158. } COPYHOOKINFO;
  8159. ;end_internal
  8160. typedef struct _DETAILSINFO
  8161. {
  8162. LPCITEMIDLIST pidl;
  8163. int fmt;
  8164. int cxChar;
  8165. STRRET str;
  8166. int iImage;
  8167. } DETAILSINFO;
  8168. typedef struct _SFVM_PROPPAGE_DATA
  8169. {
  8170. DWORD dwReserved;
  8171. LPFNADDPROPSHEETPAGE pfn;
  8172. LPARAM lParam;
  8173. } SFVM_PROPPAGE_DATA;
  8174. typedef struct _SFVM_HELPTOPIC_DATA
  8175. {
  8176. WCHAR wszHelpFile[MAX_PATH];
  8177. WCHAR wszHelpTopic[MAX_PATH];
  8178. } SFVM_HELPTOPIC_DATA;
  8179. ;begin_internal
  8180. typedef struct
  8181. {
  8182. DWORD bWantWebview; // in: caller should return template
  8183. DWORD dwOptions; // out: SFVMQVI_ flags
  8184. WCHAR szWebView[MAX_PATH]; // out: webview template path
  8185. } SFVM_VIEWINFO_DATA;
  8186. typedef struct
  8187. {
  8188. DWORD dwOptions; // out: SFVMQVI_ flags for the [in,wParam]uViewMode
  8189. } SFVM_VIEW_DATA;
  8190. // dwOptions control the state of corresponding [in,wParam]uViewMode:
  8191. #define SFVMQVI_NORMAL 0x0 // out: let defview decide what to do
  8192. #define SFVMQVI_INCLUDE 0x1 // out: force include
  8193. #define SFVMQVI_EXCLUDE 0x2 // out: force exclude
  8194. typedef struct
  8195. {
  8196. FOLDERVIEWMODE fvm; // out: view mode
  8197. BOOL fGroupView; // out: group view on/off
  8198. UINT uSortCol; // out: sort by scid
  8199. int iSortDirection; // out: ascending or descending sort
  8200. FOLDERFLAGS fFlags; // out: folder flags to set (supports FWF_AUTOARRANGE)
  8201. } SFVM_DEFERRED_VIEW_SETTINGS;
  8202. typedef struct
  8203. {
  8204. WCHAR szWebView[MAX_PATH]; // out: webview template path for [in,wParam]uViewMode
  8205. } SFVM_WEBVIEW_TEMPLATE_DATA;
  8206. typedef struct _SFVM_CUSTOMVIEWINFO_DATA
  8207. {
  8208. COLORREF crCustomColors[CRID_COLORCOUNT];
  8209. WCHAR szIconAreaImage[MAX_PATH]; // Note: the old struct used INTERNET_MAX_URL_LENGTH, but we only use local cases so this isn't needed
  8210. } SFVM_CUSTOMVIEWINFO_DATA;
  8211. typedef struct
  8212. {
  8213. DWORD dwLayout; // out: SFVMWLV_ for [in,wParam]uViewMode
  8214. IUnknown* punkPreview; // out: IUnknown of preview control, if SFVMWVL_PREVIEW specified
  8215. } SFVM_WEBVIEW_LAYOUT_DATA;
  8216. // dwLayout:
  8217. #define SFVMWVL_NORMAL 0 // standard Web View format
  8218. #define SFVMWVL_PREVIEW 1 // "preview" Web View format
  8219. #define SFVMWVL_DETAILS 2 // standard Web View format with details expanded by default
  8220. #define SFVMWVL_ITEMS 0x00000000 // HACK (added for Whistler, remove in BlackComb): item Web View format
  8221. #define SFVMWVL_FILES 0x00010000 // HACK (added for Whistler, remove in BlackComb): file Web View format
  8222. #define SFVMWVL_NOPRINT 0x00020000 // HACK (added for Whistler, remove in BlackComb): unconditionally hide "Print this file" folder task
  8223. #define SFVMWVL_NOPUBLISH 0x00040000 // HACK (added for Whistler, remove in BlackComb): unconditionally hide "Publish this file" folder task
  8224. #define SFVMWVL_ORDINAL_MASK 0x0000ffff // HACK (added for Whistler, remove in BlackComb): overload dwLayout for ordinals and flags
  8225. #define SFVMWVL_FLAGS_MASK 0xffff0000 // HACK (added for Whistler, remove in BlackComb): overload dwLayout for ordinals and flags
  8226. typedef struct
  8227. {
  8228. DWORD dwFlags;
  8229. IUIElement* pIntroText; // can be NULL for no explanatory text
  8230. IUIElement* pSpecialTaskHeader; // can be NULL for no special task section
  8231. IUIElement* pFolderTaskHeader; // if NULL, defview will provide a default folder task section
  8232. IEnumIDList* penumOtherPlaces; // if NULL, defview will provide a default Other Places list
  8233. } SFVM_WEBVIEW_CONTENT_DATA;
  8234. // dwFlags:
  8235. #define SFVMWVF_BARRICADE 0x00000001 // this is a barricaded folder
  8236. #define SFVMWVF_ENUMTASKS 0x00000002 // Folder uses non-standard tasks. Will enumerate.
  8237. #define SFVMWVF_NOMORETASKS 0x00000004 // No more tasks in enumeration.
  8238. #define SFVMWVF_SPECIALTASK 0x00000008 // Used in ENUMTASKSECTION_DATA.dwFlags.
  8239. #define SFVMWVF_CONTENTSCHANGE 0x00000010 // Refresh WV content when folder contents change.
  8240. typedef struct
  8241. {
  8242. IEnumUICommand* penumSpecialTasks; // can be NULL for no special task section
  8243. IEnumUICommand* penumFolderTasks; // if NULL, defview will provide a default folder task section
  8244. DWORD dwUpdateFlags; // bitmask of the extra special events that we should listen to
  8245. } SFVM_WEBVIEW_TASKSECTION_DATA;
  8246. // dwUpdateFlags:
  8247. #define SFVMWVTSDF_CONTENTSCHANGE 0x00000001
  8248. typedef struct
  8249. {
  8250. LPCWSTR pszThemeID; // [out] fill with a pointer a string who's lifetime is at least as long as your IShellFolderViewCB object.
  8251. } SFVM_WEBVIEW_THEME_DATA;
  8252. //
  8253. // To replace the standard webview tasks with a set enumerated by the view
  8254. // callback, the callback sets the SFVMWVF_ENUMTASKS flag in the dwFlags
  8255. // member of SFVM_WEBVIEWCONTENT_DATA. This causes the shell to send
  8256. // SFVM_ENUMWEBVIEWTASKS repeatedly in place of SFVM_GETWEBVIEWCONTENT and
  8257. // SFVM_GETWEBVIEWTASKS. Each time SFVM_ENUMWEBVIEWTASKS is sent,
  8258. // the view callback provides a header and task enumerator via a
  8259. // SFVM_WEBVIEW_ENUMTASKSECTION_DATA structure. The message is sent to the
  8260. // view repeatedly until the handler sets the SFVMWVF_NOMORETASKS flag
  8261. // in SFVM_WEBVIEW_ENUMTASKSECTION_DATA.dwFlags. The top-down display order
  8262. // of task sections is the same as the order in which they are provided by
  8263. // the view callback.
  8264. //
  8265. // The dwFlags member of SFVM_WEBVIEW_ENUMTASKSECTION_DATA supports
  8266. // the following values:
  8267. // SFVMWVF_SPECIALTASK - Use the 'special' task section style.
  8268. // If not set, use the 'normal' style.
  8269. // SFVMWVF_NOMORETASKS - Terminate the enumeration.
  8270. //
  8271. typedef struct
  8272. {
  8273. DWORD dwFlags; // SFVMWVF_XXXX flags. See above.
  8274. IUIElement *pHeader;
  8275. IEnumUICommand *penumTasks;
  8276. int idBitmap; // Valid only for SPECIALTASK sections.
  8277. int idWatermark; // Valid only for SPECIALTASK sections.
  8278. } SFVM_WEBVIEW_ENUMTASKSECTION_DATA;
  8279. // WebView Task helper functions provided by shell32
  8280. // to help answer SFVM_GETWEBVIEWCONTENT and SFVM_GETWEBVIEWTASKS messages.
  8281. //
  8282. // The idea here being that you provide task implementations in the static
  8283. // functions with a pv parameter that gets passed through to your static functions
  8284. // so they can get back to your IShellFolderViewCB object. These helper
  8285. // functions assume that all strings are resources to be loaded out of your DLL.
  8286. //
  8287. typedef HRESULT (*PFN_get_State)(IUnknown* pv,IShellItemArray *psiItemArray, BOOL fOkToBeSlow, UISTATE* puisState);
  8288. typedef HRESULT (*PFN_Invoke)(IUnknown* pv,IShellItemArray *psiItemArray, IBindCtx *pbc);
  8289. typedef struct {
  8290. const GUID* pguidCanonicalName;
  8291. LPCWSTR pszDllName;
  8292. DWORD dwTitleIndexNoSelection;
  8293. DWORD dwTitleIndexFileSelected;
  8294. DWORD dwTitleIndexFolderSelected;
  8295. DWORD dwTitleIndexMultiSelected;
  8296. DWORD dwTooltipIndex;
  8297. DWORD dwIconIndex;
  8298. PFN_get_State pfn_get_State;
  8299. PFN_Invoke pfn_Invoke;
  8300. } WVTASKITEM;
  8301. // Use for tasks that want to be displayed when something is selected, where the UI is independent of the selection
  8302. #define WVTI_ENTRY(g, d, t, p, i, s, k) {&(g), (d), (0), (t), (t), (t), (p), (i), (s), (k)}
  8303. // Use for tasks that want to be displayed when nothing is selected
  8304. #define WVTI_ENTRY_NOSELECTION(g, d, t, p, i, s, k) {&(g), (d), (t), 0, 0, 0, (p), (i), (s), (k)}
  8305. // Use for tasks that want to be displayed when a file is selected
  8306. #define WVTI_ENTRY_FILE(g, d, t, p, i, s, k) {&(g), (d), (0), (t), (0), (0), (p), (i), (s), (k)}
  8307. // Use for tasks that want to be displayed when something is selected, and you want different UI depending on the selection
  8308. // Use this one if you want to control the title, but the tooltip is constant:
  8309. #define WVTI_ENTRY_TITLE(g, d, t2, t3, t4, p, i, s, k) {&(g), (d), (0), (t2), (t3), (t4), (p), (i), (s), (k)}
  8310. // Use this one if you want the same text everywhere:
  8311. #define WVTI_ENTRY_ALL(g, d, t, p, i, s, k) {&(g), (d), (t), (t), (t), (t), (p), (i), (s), (k)}
  8312. // Use this one if you want to control everything:
  8313. #define WVTI_ENTRY_ALL_TITLE(g, d, t1, t2, t3, t4, p, i, s, k) {&(g), (d), (t1), (t2), (t3), (t4), (p), (i), (s), (k)}
  8314. // Use this one for a header:
  8315. #define WVTI_HEADER(d, t, p) {&(CLSID_NULL), (d), (t), (t), (t), (t), (p), 0, NULL, NULL}
  8316. // Use this one for a header that changes with the selection:
  8317. #define WVTI_HEADER_ENTRY(d, t1, t2, t3, t4, p) {&(CLSID_NULL), (d), (t1), (t2), (t3), (t4), (p), 0, NULL, NULL}
  8318. // Creates an IEnumUICommand over an array of WVTASKITEM structures.
  8319. // The enumerator/objects hold a ref on the pv param for the lifetime of the enumerator/objects.
  8320. // The pv param gets passed through to the static WVTASKITEM.pfn functions.
  8321. //
  8322. HRESULT Create_IEnumUICommand(IUnknown *pv, const WVTASKITEM* rgwvti, UINT cwvti, IEnumUICommand**ppenum);
  8323. // Creates an IUICommand out of a single WVTASKITEM, never calling the pfn functions
  8324. HRESULT Create_IUIElement(const WVTASKITEM* pwvti, IUIElement**ppuie);
  8325. // SFVM_GETNOTIFY: The shell will use the pidl returned from this message to synch
  8326. // change notifies. Folders in Folder Shortcuts should return pidlTarget
  8327. // because that is where the change notifies are sent.
  8328. //
  8329. // DOC'ed for DOJ compliance:
  8330. ;end_internal
  8331. // uMsg wParam lParam
  8332. #define SFVM_MERGEMENU 1 // - LPQCMINFO
  8333. #define SFVM_INVOKECOMMAND 2 // idCmd -
  8334. #define SFVM_GETHELPTEXT 3 // idCmd,cchMax pszText
  8335. #define SFVM_GETTOOLTIPTEXT 4 // idCmd,cchMax pszText
  8336. #define SFVM_GETBUTTONINFO 5 // - LPTBINFO
  8337. #define SFVM_GETBUTTONS 6 // idCmdFirst,cbtnMax LPTBBUTTON
  8338. #define SFVM_INITMENUPOPUP 7 // idCmdFirst,nIndex hmenu
  8339. ;begin_internal
  8340. #define SFVM_SELCHANGE 8 // idCmdFirst,nItem SFVM_SELCHANGE_DATA*
  8341. #define SFVM_DRAWITEM 9 // idCmdFirst DRAWITEMSTRUCT*
  8342. #define SFVM_MEASUREITEM 10 // idCmdFirst MEASUREITEMSTRUCT*
  8343. #define SFVM_EXITMENULOOP 11 // - -
  8344. #define SFVM_PRERELEASE 12 // - -
  8345. #define SFVM_GETCCHMAX 13 // LPCITEMIDLIST pcchMax
  8346. #define SFVM_FSNOTIFY 14 // LPCITEMIDLIST* lEvent
  8347. // DOC'ed for DOJ compliance:
  8348. ;end_internal
  8349. #define SFVM_WINDOWCREATED 15 // hwnd -
  8350. ;begin_internal
  8351. #define SFVM_WINDOWDESTROY 16 // hwnd -
  8352. #define SFVM_REFRESH 17 // BOOL fPreOrPost - NB: this may be called multiple times in a row
  8353. #define SFVM_SETFOCUS 18 // - -
  8354. #define SFVM_QUERYCOPYHOOK 20 // - -
  8355. #define SFVM_NOTIFYCOPYHOOK 21 // - COPYHOOKINFO*
  8356. // DOC'ed for DOJ compliance:
  8357. ;end_internal
  8358. #define SFVM_GETDETAILSOF 23 // iColumn DETAILSINFO*
  8359. #define SFVM_COLUMNCLICK 24 // iColumn -
  8360. #define SFVM_QUERYFSNOTIFY 25 // - SHChangeNotifyEntry *
  8361. #define SFVM_DEFITEMCOUNT 26 // - UINT*
  8362. #define SFVM_DEFVIEWMODE 27 // - FOLDERVIEWMODE*
  8363. #define SFVM_UNMERGEMENU 28 // - hmenu
  8364. ;begin_internal
  8365. #define SFVM_INSERTITEM 29 // pidl -
  8366. #define SFVM_DELETEITEM 30 // pidl -
  8367. // DOC'ed for DOJ compliance:
  8368. ;end_internal
  8369. #define SFVM_UPDATESTATUSBAR 31 // fInitialize -
  8370. #define SFVM_BACKGROUNDENUM 32 // - -
  8371. ;begin_internal
  8372. #define SFVM_GETWORKINGDIR 33 // uMax pszDir
  8373. #define SFVM_GETCOLSAVESTREAM 34 // flags IStream **
  8374. #define SFVM_SELECTALL 35 // - -
  8375. // DOC'ed for DOJ compliance:
  8376. ;end_internal
  8377. #define SFVM_DIDDRAGDROP 36 // dwEffect IDataObject *
  8378. ;begin_internal
  8379. #define SFVM_SUPPORTSIDENTITY 37 // - - // NOT USED: must support IShellFolder2
  8380. #define SFVM_FOLDERISPARENT 38 // - pidlChild
  8381. // DOC'ed for DOJ compliance:
  8382. ;end_internal
  8383. #define SFVM_SETISFV 39 // - IShellFolderView*
  8384. ;begin_internal
  8385. #define SFVM_GETVIEWS 40 // SHELLVIEWID* IEnumSFVViews **
  8386. // DOC'ed for DOJ compliance:
  8387. ;end_internal
  8388. #define SFVM_THISIDLIST 41 // - LPITMIDLIST*
  8389. ;begin_internal
  8390. #define SFVM_GETITEMIDLIST 42 // iItem LPITMIDLIST*
  8391. #define SFVM_SETITEMIDLIST 43 // iItem LPITEMIDLIST
  8392. #define SFVM_INDEXOFITEMIDLIST 44 // *iItem LPITEMIDLIST
  8393. #define SFVM_ODFINDITEM 45 // *iItem NM_FINDITEM*
  8394. #define SFVM_HWNDMAIN 46 // hwndMain
  8395. // DOC'ed for DOJ compliance:
  8396. ;end_internal
  8397. #define SFVM_ADDPROPERTYPAGES 47 // - SFVM_PROPPAGE_DATA *
  8398. #define SFVM_BACKGROUNDENUMDONE 48 // - -
  8399. #define SFVM_GETNOTIFY 49 // LPITEMIDLIST* LONG*
  8400. ;begin_internal
  8401. #define SFVM_ARRANGE 50 // - lParamSort
  8402. #define SFVM_QUERYSTANDARDVIEWS 51 // - BOOL * // NOT USED: must use SFVM_GETVIEWDATA instead
  8403. #define SFVM_QUERYREUSEEXTVIEW 52 // - BOOL * // NOT USED
  8404. // DOC'ed for DOJ compliance:
  8405. ;end_internal
  8406. #define SFVM_GETSORTDEFAULTS 53 // iDirection iParamSort
  8407. ;begin_internal
  8408. #define SFVM_GETEMPTYTEXT 54 // cchMax pszText
  8409. #define SFVM_GETITEMICONINDEX 55 // iItem int *piIcon
  8410. #define SFVM_DONTCUSTOMIZE 56 // - BOOL *pbDontCustomize // NOT USED
  8411. // DOC'ed for DOJ compliance:
  8412. ;end_internal
  8413. #define SFVM_SIZE 57 // - -
  8414. #define SFVM_GETZONE 58 // - DWORD*
  8415. #define SFVM_GETPANE 59 // Pane ID DWORD*
  8416. ;begin_internal
  8417. #define SFVM_ISOWNERDATA 60 // ISOWNERDATA BOOL *
  8418. #define SFVM_GETODRANGEOBJECT 61 // iWhich ILVRange **
  8419. #define SFVM_ODCACHEHINT 62 // - NMLVCACHEHINT *
  8420. // DOC'ed for DOJ compliance:
  8421. ;end_internal
  8422. #define SFVM_GETHELPTOPIC 63 // - SFVM_HELPTOPIC_DATA *
  8423. ;begin_internal
  8424. #define SFVM_OVERRIDEITEMCOUNT 64 // - UINT* // NOT USED: allowed override of actual item count for sizing calculations
  8425. #define SFVM_GETHELPTEXTW 65 // idCmd,cchMax pszText - unicode
  8426. #define SFVM_GETTOOLTIPTEXTW 66 // idCmd,cchMax pszText - unicode
  8427. #define SFVM_GETIPERSISTHISTORY 67 // IPersistHistory **
  8428. #define SFVM_GETANIMATION 68 // HINSTANCE * WCHAR *
  8429. #define SFVM_GETHELPTEXTA 69 // idCmd,cchMax pszText - ansi
  8430. #define SFVM_GETTOOLTIPTEXTA 70 // idCmd,cchMax pszText - ansi
  8431. // The below two messages are only used in ownder data case, i.e. when SFVM_ISOWNERDATA returns TRUE
  8432. #define SFVM_GETICONOVERLAY 71 // iItem int iOverlayIndex
  8433. #define SFVM_SETICONOVERLAY 72 // iItem int * piOverlayIndex
  8434. #define SFVM_ALTERDROPEFFECT 73 // DWORD* IDataObject*
  8435. #define SFVM_DELAYWINDOWCREATE 74 // HWND - posted version of SFVM_WINDOWCREATED, no params
  8436. #define SFVM_FORCEWEBVIEW 75 // BOOL* -
  8437. #define SFVM_GETVIEWINFO 76 // fvm.uViewMode SFVM_VIEWINFO_DATA* // NOT USED: shipped in Whistler Beta 1 only, remove soon
  8438. #define SFVM_GETCUSTOMVIEWINFO 77 // - SFVM_CUSTOMVIEWINFO_DATA*
  8439. #define SFVM_FOLDERSETTINGSFLAGS 78 // - DWORD * (FWF_ flags)
  8440. #define SFVM_ENUMERATEDITEMS 79 // UINT celt LPCITEMIDLIST* rgpidl // fired once at view creation, before first SFVM_GETVIEWDATA SFVM_GETDEFERREDVIEWSETTINGS
  8441. #define SFVM_GETVIEWDATA 80 // fvm.uViewMode SFVM_VIEW_DATA*
  8442. #define SFVM_GETWEBVIEW_TEMPLATE 81 // fvm.uViewMode SFVM_WEBVIEW_TEMPLATE_DATA* // NOTE: going away soon
  8443. #define SFVM_GETWEBVIEWLAYOUT 82 // fvm.uViewMode SFVM_WEBVIEW_LAYOUT_DATA*
  8444. #define SFVM_GETWEBVIEWCONTENT 83 // - SFVM_WEBVIEW_CONTENT_DATA*
  8445. #define SFVM_GETWEBVIEWTASKS 84 // - SFVM_WEBVIEW_TASKSECTION_DATA*
  8446. #define SFVM_GETWEBVIEWTHEME 86 // - SFVM_WEBVIEW_THEME_DATA* // HACK for Whistler, will remove when DirectUI goes DLL
  8447. #define SFVM_SORTLISTDATA 87 // PFNLVCOMPARE lParamSort
  8448. #define SFVM_GETWEBVIEWBARRICADE 88 // - Element* // HACK for Whistler, will remove when DirectUI goes DLL
  8449. #define SFVM_ENUMWEBVIEWTASKS 90 // - SFVM_WEBVIEW_ENUMTASKSECTION_DATA*
  8450. #define SFVM_SETEMPTYTEXT 91 // - pszText
  8451. #define SFVM_GETDEFERREDVIEWSETTINGS 92 // - SFVM_DEFERRED_VIEW_SETTINGS* // set the default view settings
  8452. // All of these macros are compatible with HANDLE_MSG in WINDOWSX.H
  8453. #define HANDLE_SFVM_MERGEMENU(pv, wP, lP, fn) \
  8454. ((fn)((pv), (QCMINFO*)(lP)))
  8455. #define HANDLE_SFVM_INVOKECOMMAND(pv, wP, lP, fn) \
  8456. ((fn)((pv), (UINT)(wP)))
  8457. #define HANDLE_SFVM_GETHELPTEXT(pv, wP, lP, fn) \
  8458. ((fn)((pv), LOWORD(wP), HIWORD(wP), (LPTSTR)(lP)))
  8459. #define HANDLE_SFVM_GETTOOLTIPTEXT(pv, wP, lP, fn) \
  8460. ((fn)((pv), LOWORD(wP), HIWORD(wP), (LPTSTR)(lP)))
  8461. #define HANDLE_SFVM_GETBUTTONINFO(pv, wP, lP, fn) \
  8462. ((fn)((pv), (TBINFO*)(lP)))
  8463. #define HANDLE_SFVM_GETBUTTONS(pv, wP, lP, fn) \
  8464. ((fn)((pv), LOWORD(wP), HIWORD(wP), (TBBUTTON*)(lP)))
  8465. #define HANDLE_SFVM_INITMENUPOPUP(pv, wP, lP, fn) \
  8466. ((fn)((pv), LOWORD(wP), HIWORD(wP), (HMENU)(lP)))
  8467. #define HANDLE_SFVM_SELCHANGE(pv, wP, lP, fn) \
  8468. ((fn)((pv), LOWORD(wP), HIWORD(wP), (SFVM_SELCHANGE_DATA*)(lP)))
  8469. #define HANDLE_SFVM_DRAWITEM(pv, wP, lP, fn) \
  8470. ((fn)((pv), (UINT)(wP), (DRAWITEMSTRUCT*)(lP)))
  8471. #define HANDLE_SFVM_MEASUREITEM(pv, wP, lP, fn) \
  8472. ((fn)((pv), (UINT)(wP), (MEASUREITEMSTRUCT*)(lP)))
  8473. #define HANDLE_SFVM_EXITMENULOOP(pv, wP, lP, fn) \
  8474. ((fn)(pv))
  8475. #define HANDLE_SFVM_PRERELEASE(pv, wP, lP, fn) \
  8476. ((fn)(pv))
  8477. #define HANDLE_SFVM_GETCCHMAX(pv, wP, lP, fn) \
  8478. ((fn)((pv), (LPCITEMIDLIST)(wP), (UINT*)(lP)))
  8479. #define HANDLE_SFVM_FSNOTIFY(pv, wP, lP, fn) \
  8480. ((fn)((pv), (LPCITEMIDLIST*)(wP), (lP)))
  8481. #define HANDLE_SFVM_WINDOWCREATED(pv, wP, lP, fn) \
  8482. ((fn)((pv), (HWND)(wP)))
  8483. #define HANDLE_SFVM_WINDOWDESTROY(pv, wP, lP, fn) \
  8484. ((fn)((pv), (HWND)(wP)))
  8485. #define HANDLE_SFVM_REFRESH(pv, wP, lP, fn) \
  8486. ((fn)((pv), (BOOL) wP))
  8487. #define HANDLE_SFVM_SETFOCUS(pv, wP, lP, fn) \
  8488. ((fn)(pv))
  8489. #define HANDLE_SFVM_QUERYCOPYHOOK(pv, wP, lP, fn) \
  8490. ((fn)(pv))
  8491. #define HANDLE_SFVM_NOTIFYCOPYHOOK(pv, wP, lP, fn) \
  8492. ((fn)((pv), (COPYHOOKINFO*)(lP)))
  8493. #define HANDLE_SFVM_GETDETAILSOF(pv, wP, lP, fn) \
  8494. ((fn)((pv), (UINT)(wP), (DETAILSINFO*)(lP)))
  8495. #define HANDLE_SFVM_COLUMNCLICK(pv, wP, lP, fn) \
  8496. ((fn)((pv), (UINT)(wP)))
  8497. #define HANDLE_SFVM_QUERYFSNOTIFY(pv, wP, lP, fn) \
  8498. ((fn)((pv), (SHChangeNotifyEntry*)(lP)))
  8499. #define HANDLE_SFVM_DEFITEMCOUNT(pv, wP, lP, fn) \
  8500. ((fn)((pv), (UINT*)(lP)))
  8501. #define HANDLE_SFVM_OVERRIDEITEMCOUNT(pv, wP, lP, fn) \
  8502. ((fn)((pv), (UINT*)(lP)))
  8503. #define HANDLE_SFVM_DEFVIEWMODE(pv, wP, lP, fn) \
  8504. ((fn)((pv), (FOLDERVIEWMODE*)(lP)))
  8505. #define HANDLE_SFVM_UNMERGEMENU(pv, wP, lP, fn) \
  8506. ((fn)((pv), (HMENU)(lP)))
  8507. #define HANDLE_SFVM_INSERTITEM(pv, wP, lP, fn) \
  8508. ((fn)((pv), (LPCITEMIDLIST)(lP)))
  8509. #define HANDLE_SFVM_DELETEITEM(pv, wP, lP, fn) \
  8510. ((fn)((pv), (LPCITEMIDLIST)(lP)))
  8511. #define HANDLE_SFVM_UPDATESTATUSBAR(pv, wP, lP, fn) \
  8512. ((fn)((pv), (BOOL)(wP)))
  8513. #define HANDLE_SFVM_BACKGROUNDENUM(pv, wP, lP, fn) \
  8514. ((fn)(pv))
  8515. #define HANDLE_SFVM_GETWORKINGDIR(pv, wP, lP, fn) \
  8516. ((fn)((pv), (UINT)(wP), (LPTSTR)(lP)))
  8517. #define HANDLE_SFVM_GETCOLSAVESTREAM(pv, wP, lP, fn) \
  8518. ((fn)((pv), (wP), (IStream**)(lP)))
  8519. #define HANDLE_SFVM_SELECTALL(pv, wP, lP, fn) \
  8520. ((fn)(pv))
  8521. #define HANDLE_SFVM_DIDDRAGDROP(pv, wP, lP, fn) \
  8522. ((fn)((pv), (DWORD)(wP), (IDataObject*)(lP)))
  8523. #define HANDLE_SFVM_SUPPORTSIDENTITY(pv, wp, lP, fn) \
  8524. ((fn)(pv)) /* Only 1 parameter */
  8525. #define HANDLE_SFVM_HWNDMAIN(pv, wP, lP, fn) \
  8526. ((fn)((pv), (HWND)(lP)))
  8527. #define HANDLE_SFVM_GETNOTIFY(pv, wP, lP, fn) \
  8528. ((fn)((pv), (LPITEMIDLIST*)(wP), (LONG*)(lP)))
  8529. #define HANDLE_SFVM_SETISFV(pv, wP, lP, fn) \
  8530. ((fn)((pv), (IShellFolderView*)(lP)))
  8531. #define HANDLE_SFVM_GETVIEWS(pv, wP, lP, fn) \
  8532. ((fn)((pv), (SHELLVIEWID*)(wP), (IEnumSFVViews**)(lP)))
  8533. #define HANDLE_SFVM_THISIDLIST(pv, wP, lP, fn) \
  8534. ((fn)((pv), (LPITEMIDLIST*)(lP)))
  8535. #define HANDLE_SFVM_GETITEMIDLIST(pv, wP, lP, fn) \
  8536. ((fn)((pv), (wP), (LPITEMIDLIST*)(lP)))
  8537. #define HANDLE_SFVM_SETITEMIDLIST(pv, wP, lP, fn) \
  8538. ((fn)((pv), (wP), (LPITEMIDLIST)(lP)))
  8539. #define HANDLE_SFVM_INDEXOFITEMIDLIST(pv, wP, lP, fn) \
  8540. ((fn)((pv), (int*)(wP), (LPITEMIDLIST)(lP)))
  8541. #define HANDLE_SFVM_ODFINDITEM(pv, wP, lP, fn) \
  8542. ((fn)((pv), (int*)(wP), (NM_FINDITEM*)(lP)))
  8543. #define HANDLE_SFVM_ADDPROPERTYPAGES(pv, wP, lP, fn) \
  8544. ((fn)((pv), (SFVM_PROPPAGE_DATA *)(lP)))
  8545. #define HANDLE_SFVM_FOLDERISPARENT(pv, wP, lP, fn) \
  8546. ((fn)((pv), (LPITEMIDLIST)(lP)))
  8547. #define HANDLE_SFVM_ARRANGE(pv, wP, lP, fn) \
  8548. ((fn)((pv), (LPARAM)(lP)))
  8549. #define HANDLE_SFVM_QUERYSTANDARDVIEWS(pv, wP, lP, fn) \
  8550. ((fn)((pv), (BOOL*)(lP)))
  8551. #define HANDLE_SFVM_QUERYREUSEEXTVIEW(pv, wP, lP, fn) \
  8552. ((fn)((pv), (BOOL*)(lP)))
  8553. #define HANDLE_SFVM_GETEMPTYTEXT(pv, wP, lP, fn) \
  8554. ((fn)((pv), (UINT)(wP), (LPTSTR)(lP)))
  8555. #define HANDLE_SFVM_GETITEMICONINDEX(pv, wP, lP, fn) \
  8556. ((fn)((pv), (wP), (int*)(lP)))
  8557. #define HANDLE_SFVM_SIZE(pv, wP, lP, fn) \
  8558. ((fn)((pv), LOWORD(lP), HIWORD(lP)))
  8559. #define HANDLE_SFVM_GETZONE(pv, wP, lP, fn) \
  8560. ((fn)((pv), (DWORD *)(lP)))
  8561. #define HANDLE_SFVM_GETPANE(pv, wP, lP, fn) \
  8562. ((fn)((pv), (wP), (DWORD *)(lP)))
  8563. #define HANDLE_SFVM_ISOWNERDATA(pv, wP, lP, fn) \
  8564. ((fn)((pv), (BOOL*)(lP)))
  8565. #define HANDLE_SFVM_GETODRANGEOBJECT(pv, wP, lP, fn) \
  8566. ((fn)((pv), (wP), (ILVRange **)(lP)))
  8567. #define HANDLE_SFVM_ODCACHEHINT(pv, wP, lP, fn) \
  8568. ((fn)((pv), (NMLVCACHEHINT*)(lP)))
  8569. #define HANDLE_SFVM_GETHELPTOPIC(pv, wP, lP, fn) \
  8570. ((fn)((pv), (SFVM_HELPTOPIC_DATA *)(lP)))
  8571. #define HANDLE_SFVM_GETIPERSISTHISTORY(pv, wP, lP, fn) \
  8572. ((fn)((pv), (IPersistHistory **)(lP)))
  8573. #define HANDLE_SFVM_SETICONOVERLAY(pv, wP, lP, fn) \
  8574. ((fn)((pv), (wP), (int)(lP)))
  8575. #define HANDLE_SFVM_GETICONOVERLAY(pv, wP, lP, fn) \
  8576. ((fn)((pv), (wP), (int *)(lP)))
  8577. #define HANDLE_SFVM_ALTERDROPEFFECT(pv, wP, lP, fn) \
  8578. ((fn)((pv), (DWORD *)(wP), (IDataObject *)(lP)))
  8579. #define HANDLE_SFVM_DELAYWINDOWCREATE(pv, wP, lP, fn) \
  8580. ((fn)((pv), (HWND)(wP)))
  8581. #define HANDLE_SFVM_FORCEWEBVIEW(pv, wP, lP, fn) \
  8582. ((fn)((pv), (BOOL*)(wP)))
  8583. #define HANDLE_SFVM_GETVIEWINFO(pv, wP, lP, fn) \
  8584. ((fn)((pv), (UINT)(wP), (SFVM_VIEWINFO_DATA*)lP))
  8585. #define HANDLE_SFVM_GETCUSTOMVIEWINFO(pv, wP, lP, fn) \
  8586. ((fn)((pv), (SFVM_CUSTOMVIEWINFO_DATA*)(lP)))
  8587. #define HANDLE_SFVM_FOLDERSETTINGSFLAGS(pv, wP, lP, fn) \
  8588. ((fn)((pv), (DWORD*)(lP)))
  8589. #define HANDLE_SFVM_ENUMERATEDITEMS(pv, wP, lP, fn) \
  8590. ((fn)((pv), (UINT)(wP), (LPCITEMIDLIST*)(lP)))
  8591. #define HANDLE_SFVM_GETVIEWDATA(pv, wP, lP, fn) \
  8592. ((fn)((pv), (UINT)(wP), (SFVM_VIEW_DATA*)lP))
  8593. #define HANDLE_SFVM_GETWEBVIEW_TEMPLATE(pv, wP, lP, fn) \
  8594. ((fn)((pv), (UINT)(wP), (SFVM_WEBVIEW_TEMPLATE_DATA*)(lP)))
  8595. #define HANDLE_SFVM_GETWEBVIEWLAYOUT(pv, wP, lP, fn) \
  8596. ((fn)((pv), (UINT)(wP), (SFVM_WEBVIEW_LAYOUT_DATA*)(lP)))
  8597. #define HANDLE_SFVM_GETWEBVIEWCONTENT(pv, wP, lP, fn) \
  8598. ((fn)((pv), (SFVM_WEBVIEW_CONTENT_DATA*)(lP)))
  8599. #define HANDLE_SFVM_GETWEBVIEWTASKS(pv, wP, lP, fn) \
  8600. ((fn)((pv), (SFVM_WEBVIEW_TASKSECTION_DATA*)(lP)))
  8601. #define HANDLE_SFVM_ENUMWEBVIEWTASKS(pv, wP, lP, fn) \
  8602. ((fn)((pv), (SFVM_WEBVIEW_ENUMTASKSECTION_DATA*)(lP)))
  8603. #define HANDLE_SFVM_GETWEBVIEWTHEME(pv, wP, lP, fn) \
  8604. ((fn)((pv), (SFVM_WEBVIEW_THEME_DATA*)(lP)))
  8605. #define HANDLE_SFVM_SORTLISTDATA(pv, wP, lP, fn) \
  8606. ((fn)((pv), (PFNLVCOMPARE)(wP), (lP)))
  8607. #define HANDLE_SFVM_GETDEFERREDVIEWSETTINGS(pv, wP, lP, fn) \
  8608. ((fn)((pv), (SFVM_DEFERRED_VIEW_SETTINGS*)(lP)))
  8609. #define HANDLE_SFVM_SETEMPTYTEXT(pv, wP, lP, fn) \
  8610. ((fn)((pv), (UINT)(wP), (LPCTSTR)(lP)))
  8611. //
  8612. // Return values for SFVM_GETICONOVERLAY:
  8613. // If the icon overlay is not set and you want the shell to set it for you.
  8614. // return SFVOVERLAY_UNSET. This will cause the shell to retrieve the overlay and
  8615. // send SFVM_SETICONOVERLAY.
  8616. // If there is no overlay for this item at all, the correct return value is
  8617. // SFVOVERLAY_DEFAULT
  8618. // If you return SFVOVERLAY_UNSET every time for SFVM_GETICONOVERLAY, the
  8619. // shell will keep setting it indefinitely, so there is a danger of infinite loop
  8620. //
  8621. #define SFV_ICONOVERLAY_DEFAULT 0
  8622. #define SFV_ICONOVERLAY_UNSET 0xFFFFFFFF
  8623. //
  8624. // What you can return from SFVM_UPDATESTATUSBAR:
  8625. //
  8626. // E_NOTIMPL - Message not handled; DefView should manage status bar
  8627. //
  8628. // Otherwise, update the status bar yourself and return a bitmask of the
  8629. // following codes indicating what you want DefView to do for you.
  8630. //
  8631. #define SFVUSB_HANDLED 0x0000 // Client handled completely - DefView does nothing
  8632. #define SFVUSB_INITED 0x0001 // Client initialized parts - DefView will set text
  8633. #define SFVUSB_ALL 0x0001;internal
  8634. // IShellFolderView interface for getting the SFV to do things
  8635. //
  8636. typedef struct _ITEMSPACING
  8637. {
  8638. int cxSmall;
  8639. int cySmall;
  8640. int cxLarge;
  8641. int cyLarge;
  8642. } ITEMSPACING;
  8643. // Define OPtions for SetObjectCount
  8644. #define SFVSOC_INVALIDATE_ALL 0x00000001 // Assumed to reset only what is neccessary...
  8645. #define SFVSOC_NOSCROLL LVSICF_NOSCROLL
  8646. // defines for IShellFolderView::SelectItems()
  8647. #define SFVS_SELECT_NONE 0x0 // unselect all
  8648. #define SFVS_SELECT_ALLITEMS 0x1 // select all
  8649. #define SFVS_SELECT_INVERT 0x2 // Inver the selection
  8650. // defines for IShellFolderView::QuerySupport()
  8651. // allows a view to be queried to see if it supports various operations (useful for
  8652. // enabling menu items)
  8653. #define SFVQS_AUTO_ARRANGE 0x0001
  8654. #define SFVQS_ARRANGE_GRID 0x0002
  8655. #define SFVQS_SELECT_ALL 0x0004
  8656. #define SFVQS_SELECT_NONE 0x0008
  8657. #define SFVQS_SELECT_INVERT 0x0010
  8658. #undef INTERFACE
  8659. #define INTERFACE IShellFolderView
  8660. DECLARE_INTERFACE_(IShellFolderView, IUnknown)
  8661. {
  8662. // *** IUnknown methods ***
  8663. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  8664. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  8665. STDMETHOD_(ULONG,Release) (THIS) PURE;
  8666. // *** IShellFolderView methods ***
  8667. STDMETHOD(Rearrange) (THIS_ LPARAM lParamSort) PURE;
  8668. STDMETHOD(GetArrangeParam) (THIS_ LPARAM *plParamSort) PURE;
  8669. STDMETHOD(ArrangeGrid) (THIS) PURE;
  8670. STDMETHOD(AutoArrange) (THIS) PURE;
  8671. STDMETHOD(GetAutoArrange) (THIS) PURE;
  8672. STDMETHOD(AddObject) (THIS_ LPITEMIDLIST pidl, UINT *puItem) PURE;
  8673. STDMETHOD(GetObject) (THIS_ LPITEMIDLIST *ppidl, UINT uItem) PURE;
  8674. STDMETHOD(RemoveObject) (THIS_ LPITEMIDLIST pidl, UINT *puItem) PURE;
  8675. STDMETHOD(GetObjectCount) (THIS_ UINT *puCount) PURE;
  8676. STDMETHOD(SetObjectCount) (THIS_ UINT uCount, UINT dwFlags) PURE;
  8677. STDMETHOD(UpdateObject) (THIS_ LPITEMIDLIST pidlOld, LPITEMIDLIST pidlNew, UINT *puItem) PURE;
  8678. STDMETHOD(RefreshObject) (THIS_ LPITEMIDLIST pidl, UINT *puItem) PURE;
  8679. STDMETHOD(SetRedraw) (THIS_ BOOL bRedraw) PURE;
  8680. STDMETHOD(GetSelectedCount) (THIS_ UINT *puSelected) PURE;
  8681. STDMETHOD(GetSelectedObjects) (THIS_ LPCITEMIDLIST **pppidl, UINT *puItems) PURE;
  8682. STDMETHOD(IsDropOnSource) (THIS_ IDropTarget *pDropTarget) PURE;
  8683. STDMETHOD(GetDragPoint) (THIS_ POINT *ppt) PURE;
  8684. STDMETHOD(GetDropPoint) (THIS_ POINT *ppt) PURE;
  8685. STDMETHOD(MoveIcons) (THIS_ IDataObject *pDataObject) PURE;
  8686. STDMETHOD(SetItemPos) (THIS_ LPCITEMIDLIST pidl, POINT *ppt) PURE;
  8687. STDMETHOD(IsBkDropTarget) (THIS_ IDropTarget *pDropTarget) PURE;
  8688. STDMETHOD(SetClipboard) (THIS_ BOOL bMove) PURE;
  8689. STDMETHOD(SetPoints) (THIS_ IDataObject *pDataObject) PURE;
  8690. STDMETHOD(GetItemSpacing) (THIS_ ITEMSPACING *pSpacing) PURE;
  8691. STDMETHOD(SetCallback) (THIS_ IShellFolderViewCB* pNewCB, IShellFolderViewCB** ppOldCB) PURE;
  8692. STDMETHOD(Select) ( THIS_ UINT dwFlags ) PURE;
  8693. STDMETHOD(QuerySupport) (THIS_ UINT * pdwSupport ) PURE;
  8694. STDMETHOD(SetAutomationObject)(THIS_ IDispatch* pdisp) PURE;
  8695. } ;
  8696. // DOC'ed for DOJ compliance:
  8697. ;end_internal
  8698. // SHCreateShellFolderView struct
  8699. typedef struct _SFV_CREATE
  8700. {
  8701. UINT cbSize;
  8702. IShellFolder* pshf;
  8703. IShellView* psvOuter;
  8704. IShellFolderViewCB* psfvcb; // No callback if NULL
  8705. } SFV_CREATE;
  8706. SHSTDAPI SHCreateShellFolderView(const SFV_CREATE* pcsfv, IShellView **ppsv);
  8707. ;begin_internal
  8708. #define SHCreateShellFolderViewORD 256
  8709. SHSTDAPI_(IShellFolderViewCB*) SHGetShellFolderViewCB(HWND hwndMain);
  8710. #define SHGetShellFolderViewCBORD 257
  8711. //===========================================================================
  8712. // Defview APIs to make name space author lives somewhat easier
  8713. // DOC'ed for DOJ compliance
  8714. ;end_internal
  8715. typedef HRESULT (CALLBACK * LPFNDFMCALLBACK)(IShellFolder *psf, HWND hwnd,
  8716. IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam);
  8717. SHSTDAPI CDefFolderMenu_Create2(LPCITEMIDLIST pidlFolder, HWND hwnd,
  8718. UINT cidl, LPCITEMIDLIST *apidl,
  8719. IShellFolder *psf, LPFNDFMCALLBACK lpfn,
  8720. UINT nKeys, const HKEY *ahkeyClsKeys,
  8721. IContextMenu **ppcm);
  8722. SHSTDAPI_(BOOL) SHOpenPropSheet%(LPCTSTR% pszCaption, HKEY ahkeys[], UINT cikeys,
  8723. const CLSID * pclsidDefault, IDataObject *pdtobj,
  8724. IShellBrowser *psb, LPCTSTR% pStartPage);
  8725. ;begin_internal
  8726. // structure for lParam of DFM_INFOKECOMMANDEX
  8727. typedef struct
  8728. {
  8729. DWORD cbSize;
  8730. DWORD fMask; // CMIC_MASK_ values for the invoke
  8731. LPARAM lParam; // same as lParam of DFM_INFOKECOMMAND
  8732. UINT idCmdFirst;
  8733. UINT idDefMax;
  8734. LPCMINVOKECOMMANDINFO pici; // the whole thing so you can re-invoke on a child
  8735. } DFMICS, *PDFMICS;
  8736. // Note on context menus ranges:
  8737. // Standard Items // DFM_MERGECONTEXTMENU, context menu extensions, DFM_MERGECONTEXTMENU_TOP
  8738. // Separator
  8739. // View Items // context menu extensions can get here
  8740. // Separator
  8741. // (defcm S_FALSE "default" items, if applicable)
  8742. // Separator
  8743. // Folder Items // context menu extensions can get here
  8744. // Separator
  8745. // Bottom Items // DFM_MERGECONTEXTMENU_BOTTOM
  8746. // DOC'ed for DOJ compliance
  8747. ;end_internal
  8748. // uMsg wParam lParam
  8749. #define DFM_MERGECONTEXTMENU 1 // uFlags LPQCMINFO
  8750. #define DFM_INVOKECOMMAND 2 // idCmd pszArgs
  8751. ;begin_internal
  8752. #define DFM_ADDREF 3 // 0 0
  8753. #define DFM_RELEASE 4 // 0 0
  8754. #define DFM_GETHELPTEXT 5 // idCmd,cchMax pszText -Ansi
  8755. #define DFM_WM_MEASUREITEM 6 // ---from the message---
  8756. #define DFM_WM_DRAWITEM 7 // ---from the message---
  8757. #define DFM_WM_INITMENUPOPUP 8 // ---from the message---
  8758. #define DFM_VALIDATECMD 9 // idCmd 0
  8759. #define DFM_MERGECONTEXTMENU_TOP 10 // uFlags LPQCMINFO
  8760. #define DFM_GETHELPTEXTW 11 // idCmd,cchMax pszText -Unicode
  8761. #define DFM_INVOKECOMMANDEX 12 // idCmd PDFMICS
  8762. #define DFM_MAPCOMMANDNAME 13 // idCmd * pszCommandName
  8763. ;end_internal
  8764. #define DFM_GETDEFSTATICID 14 // idCmd * 0
  8765. ;begin_internal
  8766. #define DFM_GETVERBW 15 // idCmd,cchMax pszText -Unicode
  8767. #define DFM_GETVERBA 16 // idCmd,cchMax pszText -Ansi
  8768. #define DFM_MERGECONTEXTMENU_BOTTOM 17 // uFlags LPQCMINFO
  8769. ;end_internal
  8770. // Commands from DFM_INVOKECOMMAND when strings are passed in
  8771. ;begin_internal
  8772. #define DFM_CMD_DELETE ((UINT)-1)
  8773. #define DFM_CMD_MOVE ((UINT)-2)
  8774. #define DFM_CMD_COPY ((UINT)-3)
  8775. #define DFM_CMD_LINK ((UINT)-4)
  8776. ;end_internal
  8777. #define DFM_CMD_PROPERTIES ((UINT)-5)
  8778. ;begin_internal
  8779. #define DFM_CMD_NEWFOLDER ((UINT)-6)
  8780. #define DFM_CMD_PASTE ((UINT)-7)
  8781. #define DFM_CMD_VIEWLIST ((UINT)-8)
  8782. #define DFM_CMD_VIEWDETAILS ((UINT)-9)
  8783. #define DFM_CMD_PASTELINK ((UINT)-10)
  8784. #define DFM_CMD_PASTESPECIAL ((UINT)-11)
  8785. #define DFM_CMD_MODALPROP ((UINT)-12)
  8786. #define DFM_CMD_RENAME ((UINT)-13)
  8787. SHSTDAPI CDefFolderMenu_Create(LPCITEMIDLIST pidlFolder,
  8788. HWND hwndOwner,
  8789. UINT cidl, LPCITEMIDLIST * apidl,
  8790. IShellFolder *psf,
  8791. LPFNDFMCALLBACK lpfn,
  8792. HKEY hkeyProgID, HKEY hkeyBaseProgID,
  8793. IContextMenu ** ppcm);
  8794. SHSTDAPI_(void) CDefFolderMenu_MergeMenu(HINSTANCE hinst, UINT idMainMerge, UINT idPopupMerge,
  8795. LPQCMINFO pqcm);
  8796. STDAPI_(void) Def_InitFileCommands(ULONG dwAttr, HMENU hmInit, UINT idCmdFirst,
  8797. BOOL bContext);
  8798. STDAPI_(void) Def_InitEditCommands(ULONG dwAttr, HMENU hmInit, UINT idCmdFirst,
  8799. IDropTarget *pdtgt, UINT fContext);
  8800. // indeces in bitmap strip
  8801. #define VIEW_MOVETO 24
  8802. #define VIEW_COPYTO 25
  8803. #define VIEW_OPTIONS 26
  8804. //===========================================================================
  8805. // Default IShellView for IShellFolder
  8806. //===========================================================================
  8807. // Menu ID's
  8808. #define SFVIDM_FIRST (FCIDM_SHVIEWLAST-0x0fff)
  8809. #define SFVIDM_LAST (FCIDM_SHVIEWLAST)
  8810. // Hardcoded message values => This range can be used for messages that we
  8811. // pass from shdoc401 to shell32
  8812. #define SFVIDM_HARDCODED_FIRST (SFVIDM_LAST-0x0010)
  8813. #define SFVIDM_HARDCODED_LAST (SFVIDM_LAST)
  8814. #define SFVIDM_MISC_SETWEBVIEW (SFVIDM_HARDCODED_FIRST)
  8815. // Popup menu ID's used in merging menus
  8816. #define SFVIDM_MENU_ARRANGE (SFVIDM_FIRST + 0x0001)
  8817. #define SFVIDM_MENU_VIEW (SFVIDM_FIRST + 0x0002)
  8818. #define SFVIDM_MENU_SELECT (SFVIDM_FIRST + 0x0003)
  8819. #define SHARED_FILE_FIRST 0x0010
  8820. #define SHARED_FILE_LINK (SHARED_FILE_FIRST + 0x0000)
  8821. #define SHARED_FILE_DELETE (SHARED_FILE_FIRST + 0x0001)
  8822. #define SHARED_FILE_RENAME (SHARED_FILE_FIRST + 0x0002)
  8823. #define SHARED_FILE_PROPERTIES (SHARED_FILE_FIRST + 0x0003)
  8824. #define SHARED_EDIT_FIRST 0x0018
  8825. #define SHARED_EDIT_CUT (SHARED_EDIT_FIRST + 0x0000)
  8826. #define SHARED_EDIT_COPY (SHARED_EDIT_FIRST + 0x0001)
  8827. #define SHARED_EDIT_PASTE (SHARED_EDIT_FIRST + 0x0002)
  8828. #define SHARED_EDIT_UNDO (SHARED_EDIT_FIRST + 0x0003)
  8829. #define SHARED_EDIT_PASTELINK (SHARED_EDIT_FIRST + 0x0004)
  8830. #define SHARED_EDIT_PASTESPECIAL (SHARED_EDIT_FIRST + 0x0005)
  8831. #define SHARED_EDIT_COPYTO (SHARED_EDIT_FIRST + 0x0006)
  8832. #define SHARED_EDIT_MOVETO (SHARED_EDIT_FIRST + 0x0007)
  8833. #define SFVIDM_FILE_FIRST (SFVIDM_FIRST + SHARED_FILE_FIRST)
  8834. #define SFVIDM_FILE_LINK (SFVIDM_FIRST + SHARED_FILE_LINK)
  8835. #define SFVIDM_FILE_DELETE (SFVIDM_FIRST + SHARED_FILE_DELETE)
  8836. #define SFVIDM_FILE_RENAME (SFVIDM_FIRST + SHARED_FILE_RENAME)
  8837. #define SFVIDM_FILE_PROPERTIES (SFVIDM_FIRST + SHARED_FILE_PROPERTIES)
  8838. #define SFVIDM_EDIT_FIRST (SFVIDM_FIRST + SHARED_EDIT_FIRST)
  8839. #define SFVIDM_EDIT_CUT (SFVIDM_FIRST + SHARED_EDIT_CUT)
  8840. #define SFVIDM_EDIT_COPY (SFVIDM_FIRST + SHARED_EDIT_COPY)
  8841. #define SFVIDM_EDIT_PASTE (SFVIDM_FIRST + SHARED_EDIT_PASTE)
  8842. #define SFVIDM_EDIT_UNDO (SFVIDM_FIRST + SHARED_EDIT_UNDO)
  8843. #define SFVIDM_EDIT_PASTELINK (SFVIDM_FIRST + SHARED_EDIT_PASTELINK)
  8844. #define SFVIDM_EDIT_PASTESPECIAL (SFVIDM_FIRST + SHARED_EDIT_PASTESPECIAL)
  8845. #define SFVIDM_EDIT_COPYTO (SFVIDM_FIRST + SHARED_EDIT_COPYTO)
  8846. #define SFVIDM_EDIT_MOVETO (SFVIDM_FIRST + SHARED_EDIT_MOVETO)
  8847. #define SFVIDM_SELECT_FIRST (SFVIDM_FIRST + 0x0020)
  8848. #define SFVIDM_SELECT_ALL (SFVIDM_SELECT_FIRST + 0x0001)
  8849. #define SFVIDM_SELECT_INVERT (SFVIDM_SELECT_FIRST + 0x0002)
  8850. #define SFVIDM_DESELECT_ALL (SFVIDM_SELECT_FIRST + 0x0003)
  8851. #define SFVIDM_VIEW_FIRST (SFVIDM_FIRST + 0x0028)
  8852. #define SFVIDM_VIEW_FIRSTVIEW (SFVIDM_VIEW_FIRST + 1)
  8853. #define SFVIDM_VIEW_ICON (SFVIDM_VIEW_FIRST + 1)
  8854. #define SFVIDM_VIEW_SMALLICON (SFVIDM_VIEW_FIRST + 2)
  8855. #define SFVIDM_VIEW_LIST (SFVIDM_VIEW_FIRST + 3)
  8856. #define SFVIDM_VIEW_DETAILS (SFVIDM_VIEW_FIRST + 4)
  8857. #define SFVIDM_VIEW_THUMBNAIL (SFVIDM_VIEW_FIRST + 5)
  8858. #define SFVIDM_VIEW_TILE (SFVIDM_VIEW_FIRST + 6)
  8859. #define SFVIDM_VIEW_THUMBSTRIP (SFVIDM_VIEW_FIRST + 7)
  8860. #define SFVIDM_VIEW_LASTVIEW (SFVIDM_VIEW_FIRST + 7)
  8861. // TileView
  8862. // One more for safe keeping
  8863. #define SFVIDM_VIEW_OPTIONS (SFVIDM_VIEW_FIRST + 0x0008)
  8864. #define SFVIDM_VIEW_VIEWMENU (SFVIDM_VIEW_FIRST + 0x0009)
  8865. #define SFVIDM_VIEW_CUSTOMWIZARD (SFVIDM_VIEW_FIRST + 0x000A)
  8866. #define SFVIDM_VIEW_COLSETTINGS (SFVIDM_VIEW_FIRST + 0x000B)
  8867. #define SFVIDM_VIEW_EXTFIRST (SFVIDM_VIEW_FIRST + 0x000C)
  8868. #define SFVIDM_VIEW_EXTLAST (SFVIDM_VIEW_EXTFIRST + 0x0017)
  8869. #define SFVIDM_VIEW_SVEXTFIRST (SFVIDM_VIEW_EXTFIRST)
  8870. #define SFVIDM_VIEW_SVEXTLAST (SFVIDM_VIEW_EXTFIRST + 0x000F)
  8871. #define SFVIDM_VIEW_EXTENDEDFIRST (SFVIDM_VIEW_EXTFIRST + 0x0010)
  8872. #define SFVIDM_VIEW_EXTENDEDLAST (SFVIDM_VIEW_EXTLAST)
  8873. // #define SFVIDM_VIEW_THUMBNAIL (SFVIDM_VIEW_FIRST + 0x0021) defined above
  8874. #define SFVIDM_ARRANGE_FIRST (SFVIDM_FIRST + 0x0050)
  8875. #define SFVIDM_ARRANGE_AUTO (SFVIDM_ARRANGE_FIRST + 0x0001)
  8876. #define SFVIDM_ARRANGE_GRID (SFVIDM_ARRANGE_FIRST + 0x0002)
  8877. #define SFVIDM_ARRANGE_DISPLAYICONS (SFVIDM_ARRANGE_FIRST + 0x0003)
  8878. #define SFVIDM_ARRANGE_AUTOGRID (SFVIDM_ARRANGE_FIRST + 0x0004)
  8879. #define SFVIDM_TOOL_FIRST (SFVIDM_FIRST + 0x0060)
  8880. #define SFVIDM_TOOL_CONNECT (SFVIDM_TOOL_FIRST + 0x0001)
  8881. #define SFVIDM_TOOL_DISCONNECT (SFVIDM_TOOL_FIRST + 0x0002)
  8882. #define SFVIDM_TOOL_OPTIONS (SFVIDM_TOOL_FIRST + 0x0003)
  8883. #define SFVIDM_DEBUG_WEBVIEW (SFVIDM_TOOL_FIRST + 0x0004)
  8884. #define SFVIDM_HELP_FIRST (SFVIDM_FIRST + 0x0070)
  8885. #define SFVIDM_HELP_TOPIC (SFVIDM_HELP_FIRST + 0x0001)
  8886. #define SFVIDM_MISC_FIRST (SFVIDM_FIRST + 0x0100)
  8887. #define SFVIDM_MISC_REFRESH (SFVIDM_MISC_FIRST + 0x0003)
  8888. #define SFVIDM_MISC_HARDREFRESH (SFVIDM_MISC_FIRST + 0x0004)
  8889. // Range for the client's additional menus
  8890. #define SFVIDM_CLIENT_FIRST (SFVIDM_FIRST + 0x0200)
  8891. #define SFVIDM_CLIENT_LAST (SFVIDM_FIRST + 0x02ff)
  8892. // ---- SFVIDM_UNUSED_FIRST (SFVIDM_FIRST + 0x0300)
  8893. #define SFVIDM_DESKTOP_FIRST (SFVIDM_FIRST + 0x0400)
  8894. #define SFVIDM_DESKTOPHTML_WEBCONTENT (SFVIDM_DESKTOP_FIRST + 0x0001)
  8895. #define SFVIDM_DESKTOPHTML_ICONS (SFVIDM_DESKTOP_FIRST + 0x0002)
  8896. #define SFVIDM_DESKTOPHTML_LOCK (SFVIDM_DESKTOP_FIRST + 0x0003)
  8897. #define SFVIDM_DESKTOPHTML_WIZARD (SFVIDM_DESKTOP_FIRST + 0x0004)
  8898. #define SFVIDM_DESKTOP_LAST (SFVIDM_FIRST + 0x04ff)
  8899. #define SFVIDM_COLUMN_FIRST (SFVIDM_FIRST + 0x0500)
  8900. #define SFVIDM_COLUMN_LAST (SFVIDM_FIRST + 0x05ff)
  8901. #define SFVIDM_GROUPSEP (SFVIDM_FIRST + 0x0600)
  8902. #define SFVIDM_GROUPBY (SFVIDM_FIRST + 0x0601)
  8903. #define SFVIDM_GROUPSFIRST (SFVIDM_FIRST + 0x0602)
  8904. #define SFVIDM_GROUPSLAST (SFVIDM_FIRST + 0x067f)
  8905. #define SFVIDM_GROUPSEXTENDEDFIRST (SFVIDM_FIRST + 0x0680)
  8906. #define SFVIDM_GROUPSEXTENDEDLAST (SFVIDM_FIRST + 0x06ff)
  8907. // Range for context menu id's
  8908. #define SFVIDM_CONTEXT_FIRST (SFVIDM_FIRST + 0x0800)
  8909. #define SFVIDM_CONTEXT_LAST (SFVIDM_FIRST + 0x0900)
  8910. #define SFVIDM_BACK_CONTEXT_FIRST (SFVIDM_FIRST + 0x0901)
  8911. #define SFVIDM_BACK_CONTEXT_LAST (SFVIDM_FIRST + 0x09ff)
  8912. // DOC'ed for DOJ compliance:
  8913. ;end_internal
  8914. typedef TBINFO * LPTBINFO;
  8915. typedef DETAILSINFO *PDETAILSINFO;
  8916. ;begin_internal
  8917. typedef COPYHOOKINFO *LPCOPYHOOKINFO;
  8918. // uMsg wParam lParam
  8919. #define DVM_MERGEMENU SFVM_MERGEMENU // uFlags LPQCMINFO
  8920. #define DVM_INVOKECOMMAND SFVM_INVOKECOMMAND // idCmd 0
  8921. #define DVM_GETHELPTEXT SFVM_GETHELPTEXT // idCmd,cchMax pszText - Ansi
  8922. #define DVM_GETTOOLTIPTEXT SFVM_GETTOOLTIPTEXT // idCmd,cchMax pszText
  8923. #define DVM_GETBUTTONINFO SFVM_GETBUTTONINFO // 0 LPTBINFO
  8924. #define DVM_GETBUTTONS SFVM_GETBUTTONS // idCmdFirst,cbtnMax LPTBBUTTON
  8925. #define DVM_INITMENUPOPUP SFVM_INITMENUPOPUP // idCmdFirst,nIndex hmenu
  8926. #define DVM_SELCHANGE SFVM_SELCHANGE // idCmdFirst,nItem PDVSELCHANGEINFO
  8927. #define DVM_DRAWITEM SFVM_DRAWITEM // idCmdFirst pdis
  8928. #define DVM_MEASUREITEM SFVM_MEASUREITEM // idCmdFirst pmis
  8929. #define DVM_EXITMENULOOP SFVM_EXITMENULOOP // - -
  8930. #define DVM_RELEASE SFVM_PRERELEASE // - lSelChangeInfo (ShellFolder private)
  8931. #define DVM_GETCCHMAX SFVM_GETCCHMAX // pidlItem pcchMax
  8932. #define DVM_FSNOTIFY SFVM_FSNOTIFY // LPITEMIDLIST* lEvent
  8933. #define DVM_WINDOWCREATED SFVM_WINDOWCREATED // hwnd PDVSELCHANGEINFO
  8934. #define DVM_WINDOWDESTROY SFVM_WINDOWDESTROY // hwnd PDVSELCHANGEINFO
  8935. #define DVM_REFRESH SFVM_REFRESH // - lSelChangeInfo
  8936. #define DVM_SETFOCUS SFVM_SETFOCUS // - lSelChangeInfo
  8937. #define DVM_KILLFOCUS 19 // unused
  8938. #define DVM_QUERYCOPYHOOK SFVM_QUERYCOPYHOOK // - -
  8939. #define DVM_NOTIFYCOPYHOOK SFVM_NOTIFYCOPYHOOK // - LPCOPYHOOKINFO
  8940. #define DVM_NOTIFY SFVM_NOTIFY // idFrom LPNOTIFY
  8941. #define DVM_GETDETAILSOF SFVM_GETDETAILSOF // iColumn PDETAILSINFO
  8942. #define DVM_COLUMNCLICK SFVM_COLUMNCLICK // iColumn -
  8943. #define DVM_QUERYFSNOTIFY SFVM_QUERYFSNOTIFY // - FSNotifyEntry *
  8944. #define DVM_DEFITEMCOUNT SFVM_DEFITEMCOUNT // - PINT
  8945. #define DVM_DEFVIEWMODE SFVM_DEFVIEWMODE // - PFOLDERVIEWMODE
  8946. #define DVM_UNMERGEMENU SFVM_UNMERGEMENU // uFlags
  8947. #define DVM_INSERTITEM SFVM_INSERTITEM // pidl PDVSELCHANGEINFO
  8948. #define DVM_DELETEITEM SFVM_DELETEITEM // pidl PDVSELCHANGEINFO
  8949. #define DVM_UPDATESTATUSBAR SFVM_UPDATESTATUSBAR // - lSelChangeInfo
  8950. #define DVM_BACKGROUNDENUM SFVM_BACKGROUNDENUM //
  8951. #define DVM_GETWORKINGDIR SFVM_GETWORKINGDIR //
  8952. #define DVM_GETCOLSAVESTREAM SFVM_GETCOLSAVESTREAM // flags IStream **
  8953. #define DVM_SELECTALL SFVM_SELECTALL // lSelChangeInfo
  8954. #define DVM_DIDDRAGDROP SFVM_DIDDRAGDROP // dwEffect IDataObject *
  8955. #define DVM_SUPPORTSIDENTIFY SFVM_SUPPORTSIDENTITY // - -
  8956. #define DVM_FOLDERISPARENT SFVM_FOLDERISPARENT // - pidlChild
  8957. // max length for guid strings
  8958. #define GUIDSTR_MAX (1+ 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)
  8959. typedef struct _DVSELCHANGEINFO {
  8960. UINT uOldState;
  8961. UINT uNewState;
  8962. LPARAM lParamItem;
  8963. LPARAM* plParam;
  8964. } DVSELCHANGEINFO, *PDVSELCHANGEINFO;
  8965. // DOC'ed for DOJ compliance:
  8966. ;end_internal
  8967. typedef HRESULT (CALLBACK * LPFNVIEWCALLBACK)(IShellView *psvOuter,
  8968. IShellFolder *psf,
  8969. HWND hwndMain,
  8970. UINT uMsg,
  8971. WPARAM wParam,
  8972. LPARAM lParam);
  8973. // SHCreateShellFolderViewEx struct
  8974. typedef struct _CSFV
  8975. {
  8976. UINT cbSize;
  8977. IShellFolder * pshf;
  8978. IShellView * psvOuter;
  8979. LPCITEMIDLIST pidl;
  8980. LONG lEvents;
  8981. LPFNVIEWCALLBACK pfnCallback; // No callback if NULL
  8982. FOLDERVIEWMODE fvm;
  8983. } CSFV, * LPCSFV;
  8984. ;begin_internal
  8985. // DOC'ed for DOJ Compliance
  8986. ;end_internal
  8987. // Tell the FolderView to rearrange. The lParam will be passed to
  8988. // IShellFolder::CompareIDs
  8989. #define SFVM_REARRANGE 0x00000001
  8990. #define ShellFolderView_ReArrange(_hwnd, _lparam) \
  8991. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_REARRANGE, _lparam)
  8992. ;begin_internal
  8993. // Get the last sorting parameter given to FolderView
  8994. #define SFVM_GETARRANGEPARAM 0x00000002
  8995. #define ShellFolderView_GetArrangeParam(_hwnd) \
  8996. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETARRANGEPARAM, 0L)
  8997. // DOC'ed for DOJ Compliance
  8998. ;end_internal
  8999. // Add an OBJECT into the view
  9000. #define SFVM_ADDOBJECT 0x00000003
  9001. #define ShellFolderView_AddObject(_hwnd, _pidl) \
  9002. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_ADDOBJECT, (LPARAM)_pidl)
  9003. ;begin_internal
  9004. // Gets the count of objects in the view
  9005. #define SFVM_GETOBJECTCOUNT 0x00000004
  9006. #define ShellFolderView_GetObjectCount(_hwnd) \
  9007. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETOBJECTCOUNT, (LPARAM)0)
  9008. // Returns a pointer to the Idlist associated with the specified index
  9009. // Returns NULL if at end of list.
  9010. #define SFVM_GETOBJECT 0x00000005
  9011. #define ShellFolderView_GetObject(_hwnd, _iObject) \
  9012. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETOBJECT, _iObject)
  9013. // DOC'ed for DOJ Compliance
  9014. ;end_internal
  9015. // Remove an OBJECT into the view
  9016. #define SFVM_REMOVEOBJECT 0x00000006
  9017. #define ShellFolderView_RemoveObject(_hwnd, _pidl) \
  9018. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_REMOVEOBJECT, (LPARAM)_pidl)
  9019. // updates an object by passing in pointer to two PIDLS, the first
  9020. // is the old pidl, the second one is the one with update information.
  9021. //
  9022. // _ppidl[1] must be a *copy* of a pidl, as control over the lifetime
  9023. // of the pidl belongs to the view after successful completion of
  9024. // this call. (Unsuccessful completion (a -1 return) implies failure
  9025. // and the caller must free the memory.) Win95 waits a while before
  9026. // freeing the pidl, IE4 frees the pidl immediately.
  9027. // IShellFolderView::UpdateObject does not suffer from this problem.
  9028. //
  9029. #define SFVM_UPDATEOBJECT 0x00000007
  9030. #define ShellFolderView_UpdateObject(_hwnd, _ppidl) \
  9031. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_UPDATEOBJECT, (LPARAM)_ppidl)
  9032. ;begin_internal
  9033. // Sets the redraw mode for the window that is displaying the information
  9034. #define SFVM_SETREDRAW 0x00000008
  9035. #define ShellFolderView_SetRedraw(_hwnd, fRedraw) \
  9036. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_SETREDRAW, (LPARAM)fRedraw)
  9037. // DOC'ed for DOJ Compliance
  9038. ;end_internal
  9039. // Returns an array of the selected IDS to the caller.
  9040. // lparam is a pointer to receive the idlists into
  9041. // return value is the count of items in the array.
  9042. #define SFVM_GETSELECTEDOBJECTS 0x00000009
  9043. #define ShellFolderView_GetSelectedObjects(_hwnd, ppidl) \
  9044. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETSELECTEDOBJECTS, (LPARAM)ppidl)
  9045. ;begin_internal
  9046. // Checks if the current drop is on the view window
  9047. // lparam is unused
  9048. // return value is TRUE if the current drop is upon the background of the
  9049. // view window, FALSE otherwise
  9050. #define SFVM_ISDROPONSOURCE 0x0000000a
  9051. #define ShellFolderView_IsDropOnSource(_hwnd, _pdtgt) \
  9052. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_ISDROPONSOURCE, (LPARAM)_pdtgt)
  9053. // Moves the selected icons in the listview
  9054. // lparam is a pointer to a drop target
  9055. // return value is unused
  9056. #define SFVM_MOVEICONS 0x0000000b
  9057. #define ShellFolderView_MoveIcons(_hwnd, _pdt) \
  9058. (void)SHShellFolderView_Message(_hwnd, SFVM_MOVEICONS, (LPARAM)(LPDROPTARGET)_pdt)
  9059. // Gets the start point of a drag-drop
  9060. // lparam is a pointer to a point
  9061. // return value is unused
  9062. #define SFVM_GETDRAGPOINT 0x0000000c
  9063. #define ShellFolderView_GetDragPoint(_hwnd, _ppt) \
  9064. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETDRAGPOINT, (LPARAM)(LPPOINT)_ppt)
  9065. // Gets the end point of a drag-drop
  9066. // lparam is a pointer to a point
  9067. // return value is unused
  9068. #define SFVM_GETDROPPOINT 0x0000000d
  9069. #define ShellFolderView_GetDropPoint(_hwnd, _ppt) \
  9070. SHShellFolderView_Message(_hwnd, SFVM_GETDROPPOINT, (LPARAM)(LPPOINT)_ppt)
  9071. #define ShellFolderView_GetAnchorPoint(_hwnd, _fStart, _ppt) \
  9072. (BOOL)((_fStart) ? ShellFolderView_GetDragPoint(_hwnd, _ppt) : ShellFolderView_GetDropPoint(_hwnd, _ppt))
  9073. // DOC'ed for DOJ Compliance
  9074. ;end_internal
  9075. typedef struct _SFV_SETITEMPOS
  9076. {
  9077. LPCITEMIDLIST pidl;
  9078. POINT pt;
  9079. } SFV_SETITEMPOS, *LPSFV_SETITEMPOS;
  9080. // Sets the position of an item in the viewer
  9081. // lparam is a pointer to a SVF_SETITEMPOS
  9082. // return value is unused
  9083. #define SFVM_SETITEMPOS 0x0000000e
  9084. #define ShellFolderView_SetItemPos(_hwnd, _pidl, _x, _y) \
  9085. { SFV_SETITEMPOS _sip = {_pidl, {_x, _y}}; \
  9086. SHShellFolderView_Message(_hwnd, SFVM_SETITEMPOS, (LPARAM)(LPSFV_SETITEMPOS)&_sip);}
  9087. ;begin_internal
  9088. // Determines if a given drop target interface is the one being used for
  9089. // the background of the ShellFolderView (as opposed to an object in the
  9090. // view)
  9091. // lparam is a pointer to a drop target interface
  9092. // return value is TRUE if it is the background drop target, FALSE otherwise
  9093. #define SFVM_ISBKDROPTARGET 0x0000000f
  9094. #define ShellFolderView_IsBkDropTarget(_hwnd, _pdptgt) \
  9095. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_ISBKDROPTARGET, (LPARAM)(LPDROPTARGET)_pdptgt)
  9096. // DOC'ed for DOJ Compliance
  9097. ;end_internal
  9098. // Notifies a ShellView when one of its objects get put on the clipboard
  9099. // as a result of a menu command.
  9100. //
  9101. // called by defcm.c when it does a copy/cut ;internal
  9102. //
  9103. // lparam is the dwEffect (DROPEFFECT_MOVE, DROPEFFECT_COPY)
  9104. // return value is void.
  9105. #define SFVM_SETCLIPBOARD 0x00000010
  9106. #define ShellFolderView_SetClipboard(_hwnd, _dwEffect) \
  9107. (void)SHShellFolderView_Message(_hwnd, SFVM_SETCLIPBOARD, (LPARAM)(DWORD)(_dwEffect))
  9108. ;begin_internal
  9109. // sets auto arrange
  9110. #define SFVM_AUTOARRANGE 0x00000011
  9111. #define ShellFolderView_AutoArrange(_hwnd) \
  9112. (void)SHShellFolderView_Message(_hwnd, SFVM_AUTOARRANGE, 0)
  9113. // sets snap to grid
  9114. #define SFVM_ARRANGEGRID 0x00000012
  9115. #define ShellFolderView_ArrangeGrid(_hwnd) \
  9116. (void)SHShellFolderView_Message(_hwnd, SFVM_ARRANGEGRID, 0)
  9117. #define SFVM_GETAUTOARRANGE 0x00000013
  9118. #define ShellFolderView_GetAutoArrange(_hwnd) \
  9119. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETAUTOARRANGE, 0)
  9120. #define SFVM_GETSELECTEDCOUNT 0x00000014
  9121. #define ShellFolderView_GetSelectedCount(_hwnd) \
  9122. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETSELECTEDCOUNT, 0)
  9123. typedef ITEMSPACING *LPITEMSPACING;
  9124. #define SFVM_GETITEMSPACING 0x00000015
  9125. #define ShellFolderView_GetItemSpacing(_hwnd, lpis) \
  9126. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETITEMSPACING, (LPARAM)lpis)
  9127. // Causes an object to be repainted
  9128. #define SFVM_REFRESHOBJECT 0x00000016
  9129. #define ShellFolderView_RefreshObject(_hwnd, _ppidl) \
  9130. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_REFRESHOBJECT, (LPARAM)_ppidl)
  9131. // Causes the the whole view to be refreshed
  9132. #define ShellFolderView_RefreshAll(_hwnd) \
  9133. (LPARAM)PostMessage(_hwnd, WM_KEYDOWN, (WPARAM)VK_F5, (LPARAM)0);
  9134. // DOC'ed for DOJ Compliance
  9135. ;end_internal
  9136. #define SFVM_SETPOINTS 0x00000017
  9137. #define ShellFolderView_SetPoints(_hwnd, _pdtobj) \
  9138. (void)SHShellFolderView_Message(_hwnd, SFVM_SETPOINTS, (LPARAM)_pdtobj)
  9139. ;begin_internal
  9140. // SVM_SELECTANDPOSITIONITEM lParam
  9141. typedef struct
  9142. {
  9143. LPCITEMIDLIST pidl; // relative pidl to the view
  9144. UINT uSelectFlags; // select flags
  9145. BOOL fMove; // if true, we should also move it to point pt
  9146. POINT pt;
  9147. } SFM_SAP;
  9148. // shell view messages
  9149. #define SVM_SELECTITEM (WM_USER + 1)
  9150. #define SVM_SELECTANDPOSITIONITEM (WM_USER + 5)
  9151. ;end_internal
  9152. ;begin_both
  9153. #include <poppack.h> /* Return to byte packing */
  9154. ;end_both
  9155. ;begin_internal
  9156. //===========================================================================
  9157. // CDefShellFolder members (for easy subclassing)
  9158. //===========================================================================
  9159. // Default implementation (no dependencies to the instance data)
  9160. STDMETHODIMP CDefShellFolder_QueryInterface(IShellFolder *psf, REFIID riid, void **ppv);
  9161. STDMETHODIMP CDefShellFolder_BindToStorage(IShellFolder *psf, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv);
  9162. STDMETHODIMP CDefShellFolder_BindToObject(IShellFolder *psf, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv);
  9163. STDMETHODIMP CDefShellFolder_GetAttributesOf(IShellFolder *psf, UINT cidl, LPCITEMIDLIST * apidl, ULONG * rgfOut);
  9164. STDMETHODIMP CDefShellFolder_SetNameOf(IShellFolder *psf, HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR pszName, DWORD dwReserved, LPITEMIDLIST * ppidlOut);
  9165. // File Search APIS
  9166. // DOC'ed for DOJ compliance
  9167. ;end_internal
  9168. SHSTDAPI_(IContextMenu *) SHFind_InitMenuPopup(HMENU hmenu, HWND hwndOwner, UINT idCmdFirst, UINT idCmdLast);
  9169. ;begin_internal
  9170. SHSTDAPI_(void) Control_RunDLL(HWND hwndStub, HINSTANCE hAppInstance, LPSTR pszCmdLine, int nCmdShow);
  9171. SHSTDAPI_(void) Control_RunDLLW(HWND hwndStub, HINSTANCE hAppInstance, LPWSTR pszCmdLine, int nCmdShow);
  9172. SHSTDAPI_(void) Control_RunDLLAsUserW(HWND hwndStub, HINSTANCE hAppInstance, LPWSTR lpwszCmdLine, int nCmdShow);
  9173. // to add 16 bit pages to 32bit things. hGlobal can be NULL
  9174. SHSTDAPI_(UINT) SHAddPages16(HGLOBAL hGlobal, LPCTSTR pszDllEntry, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
  9175. // DOC'ed for DOJ compliance
  9176. ;end_internal
  9177. SHSTDAPI SHCreateShellFolderViewEx(LPCSFV pcsfv, IShellView ** ppsv);
  9178. ;begin_internal
  9179. // Access to MSHMTL's ditherer
  9180. /* Definition of interface: IIntDitherer */
  9181. #undef INTERFACE
  9182. #define INTERFACE IIntDitherer
  9183. DECLARE_INTERFACE_(IIntDitherer, IUnknown)
  9184. {
  9185. #ifndef NO_BASEINTERFACE_FUNCS
  9186. // *** IUnknown methods ***
  9187. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  9188. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  9189. STDMETHOD_(ULONG, Release)(THIS) PURE;
  9190. #endif
  9191. // *** IIntDitherer methods ***
  9192. STDMETHOD(DitherTo8bpp)(THIS_ BYTE * pDestBits, LONG nDestPitch,
  9193. BYTE * pSrcBits, LONG nSrcPitch, REFGUID bfidSrc,
  9194. RGBQUAD * prgbDestColors, RGBQUAD * prgbSrcColors,
  9195. BYTE * pbDestInvMap,
  9196. LONG x, LONG y, LONG cx, LONG cy,
  9197. LONG lDestTrans, LONG lSrcTrans) PURE;
  9198. };
  9199. #ifdef COBJMACROS
  9200. #define IntDitherer_QueryInterface(This,riid,ppvObject) \
  9201. (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  9202. #define IntDitherer_AddRef(This) \
  9203. (This)->lpVtbl -> AddRef(This)
  9204. #define IntDitherer_Release(This) \
  9205. (This)->lpVtbl -> Release(This)
  9206. #define IntDitherer_DitherTo8bpp(This, pDestBits, nDestPitch, \
  9207. pSrcBits, nSrcPitch, bfidSrc, \
  9208. prgbDestColors, prgbSrcColors, \
  9209. pbDestInvMap, x, y, cx, cy, \
  9210. lDestTrans, lSrcTrans) \
  9211. (This)->lpVtbl -> DitherTo8bpp(This, pDestBits, nDestPitch, pSrcBits, nSrcPitch, bfidSrc, \
  9212. prgbDestColors, prgbSrcColors, pbDestInvMap, x, y, cx, cy, lDestTrans, lSrcTrans)
  9213. #endif
  9214. ;end_internal
  9215. //
  9216. // PROPIDs for Internet Shortcuts (FMTID_Intshcut) to be used with
  9217. // IPropertySetStorage/IPropertyStorage
  9218. //
  9219. // The known property ids and their variant types are:
  9220. // PID_IS_URL [VT_LPWSTR] URL
  9221. // PID_IS_SCHEME [VT_UI4] Scheme value ;Internal
  9222. // PID_IS_NAME [VT_LPWSTR] Name of the internet shortcut
  9223. // PID_IS_WORKINGDIR [VT_LPWSTR] Working directory for the shortcut
  9224. // PID_IS_HOTKEY [VT_UI2] Hotkey for the shortcut
  9225. // PID_IS_SHOWCMD [VT_I4] Show command for shortcut
  9226. // PID_IS_ICONINDEX [VT_I4] Index into file that has icon
  9227. // PID_IS_ICONFILE [VT_LPWSTR] File that has the icon
  9228. // PID_IS_WHATSNEW [VT_LPWSTR] What's New text
  9229. // PID_IS_AUTHOR [VT_LPWSTR] Author
  9230. // PID_IS_DESCRIPTION [VT_LPWSTR] Description text of site
  9231. // PID_IS_COMMENT [VT_LPWSTR] User annotated comment
  9232. //
  9233. #define PID_IS_FIRST 2 ;Internal
  9234. #define PID_IS_URL 2
  9235. #define PID_IS_SCHEME 3 ;Internal
  9236. #define PID_IS_NAME 4
  9237. #define PID_IS_WORKINGDIR 5
  9238. #define PID_IS_HOTKEY 6
  9239. #define PID_IS_SHOWCMD 7
  9240. #define PID_IS_ICONINDEX 8
  9241. #define PID_IS_ICONFILE 9
  9242. #define PID_IS_WHATSNEW 10
  9243. #define PID_IS_AUTHOR 11
  9244. #define PID_IS_DESCRIPTION 12
  9245. #define PID_IS_COMMENT 13
  9246. #define PID_IS_IDLIST 14 ;Internal
  9247. #define PID_IS_LAST 14 ;Internal
  9248. //
  9249. // PROPIDs for Internet Sites (FMTID_InternetSite) to be used with
  9250. // IPropertySetStorage/IPropertyStorage
  9251. //
  9252. // The known property ids and their variant types are:
  9253. // PID_INTSITE_WHATSNEW [VT_LPWSTR] What's New text
  9254. // PID_INTSITE_AUTHOR [VT_LPWSTR] Author
  9255. // PID_INTSITE_LASTVISIT [VT_FILETIME] Time site was last visited
  9256. // PID_INTSITE_LASTMOD [VT_FILETIME] Time site was last modified
  9257. // PID_INTSITE_VISITCOUNT [VT_UI4] Number of times user has visited
  9258. // PID_INTSITE_DESCRIPTION [VT_LPWSTR] Description text of site
  9259. // PID_INTSITE_COMMENT [VT_LPWSTR] User annotated comment
  9260. // PID_INTSITE_FLAGS [VT_UI4] PIDISF_ flags ;Internal
  9261. // PID_INTSITE_CONTENTLEN [VT_UI4] Content length ;Internal
  9262. // PID_INTSITE_CONTENTCODE [VT_UI8] Content code ;Internal
  9263. // PID_INTSITE_RECURSE [VT_UI4] Levels to recurse (0-3)
  9264. // PID_INTSITE_WATCH [VT_UI4] PIDISM_ flags
  9265. // PID_INTSITE_SUBSCRIPTION [VT_UI8] Subscription cookie
  9266. // PID_INTSITE_URL [VT_LPWSTR] URL
  9267. // PID_INTSITE_TITLE [VT_LPWSTR] Title
  9268. // PID_INTSITE_FRAGMENT [VT_NULL] Fragments ;Internal
  9269. // PID_INTSITE_CODEPAGE [VT_UI4] Codepage of the document
  9270. // PID_INTSITE_TRACKING [VT_UI4] Tracking
  9271. // PID_INTSITE_ICONINDEX [VT_I4] Retrieve the index to the icon
  9272. // PID_INTSITE_ICONFILE [VT_LPWSTR] Retrieve the file containing the icon index.
  9273. #define PID_INTSITE_FIRST 2 ;Internal
  9274. #define PID_INTSITE_WHATSNEW 2
  9275. #define PID_INTSITE_AUTHOR 3
  9276. #define PID_INTSITE_LASTVISIT 4
  9277. #define PID_INTSITE_LASTMOD 5
  9278. #define PID_INTSITE_VISITCOUNT 6
  9279. #define PID_INTSITE_DESCRIPTION 7
  9280. #define PID_INTSITE_COMMENT 8
  9281. #define PID_INTSITE_FLAGS 9
  9282. #define PID_INTSITE_CONTENTLEN 10
  9283. #define PID_INTSITE_CONTENTCODE 11
  9284. #define PID_INTSITE_RECURSE 12
  9285. #define PID_INTSITE_WATCH 13
  9286. #define PID_INTSITE_SUBSCRIPTION 14
  9287. #define PID_INTSITE_URL 15
  9288. #define PID_INTSITE_TITLE 16
  9289. #define PID_INTSITE_FRAGMENT 17 ;Internal
  9290. #define PID_INTSITE_CODEPAGE 18
  9291. #define PID_INTSITE_TRACKING 19
  9292. #define PID_INTSITE_ICONINDEX 20
  9293. #define PID_INTSITE_ICONFILE 21
  9294. #define PID_INTSITE_LAST 21 ;Internal
  9295. // Flags for PID_IS_FLAGS
  9296. #define PIDISF_RECENTLYCHANGED 0x00000001
  9297. #define PIDISF_CACHEDSTICKY 0x00000002
  9298. #define PIDISF_CACHEIMAGES 0x00000010
  9299. #define PIDISF_FOLLOWALLLINKS 0x00000020
  9300. //Is URL entered in IE history bucket? ; Internal
  9301. #define PIDISF_HISTORY 0x10000000 ; Internal
  9302. // Values for PID_INTSITE_WATCH
  9303. #define PIDISM_GLOBAL 0 // Monitor based on global setting
  9304. #define PIDISM_WATCH 1 // User says watch
  9305. #define PIDISM_DONTWATCH 2 // User says don't watch
  9306. ////////////////////////////////////////////////////////////////////
  9307. //
  9308. // The shell keeps track of some per-user state to handle display
  9309. // options that is of major interest to ISVs.
  9310. // The key one requested right now is "DoubleClickInWebView".
  9311. ;begin_internal
  9312. // Athena needs this to determine whether to double click or not.
  9313. //
  9314. // NOTE: if user uninstalls IE4, the Win95 code will
  9315. // realize that the size has changed (even though it's not
  9316. // in this struct, it is saved) and drop back to default state.
  9317. //
  9318. // Since we're exporting this so ISVs can get access to our flags,
  9319. // let's avoid the need for a thunk and export the beginning section
  9320. // of this structure ONLY. Here are the A and W versions for internal use:
  9321. //
  9322. // DOC'ed for DOJ compliance
  9323. ;end_internal
  9324. typedef struct {
  9325. // These were in Win95 //;Internal
  9326. BOOL fShowAllObjects : 1;
  9327. BOOL fShowExtensions : 1;
  9328. BOOL fNoConfirmRecycle : 1;
  9329. // The below were added for IE4 //;Internal
  9330. BOOL fShowSysFiles : 1;
  9331. BOOL fShowCompColor : 1;
  9332. BOOL fDoubleClickInWebView : 1;
  9333. BOOL fDesktopHTML : 1;
  9334. BOOL fWin95Classic : 1;
  9335. BOOL fDontPrettyPath : 1;
  9336. BOOL fShowAttribCol : 1; // No longer used, dead bit
  9337. BOOL fMapNetDrvBtn : 1;
  9338. BOOL fShowInfoTip : 1;
  9339. BOOL fHideIcons : 1;
  9340. BOOL fWebView : 1;
  9341. BOOL fFilter : 1;
  9342. BOOL fShowSuperHidden : 1;
  9343. BOOL fNoNetCrawling : 1;
  9344. DWORD dwWin95Unused; // Win95 only - no longer supported pszHiddenFileExts
  9345. UINT uWin95Unused; // Win95 only - no longer supported cbHiddenFileExts
  9346. ;begin_internal
  9347. // These must have been an OSR release, as they aren't on \\guilo\slmadd\src\dev\inc16\shsemip.h
  9348. ;end_internal
  9349. // Note: Not a typo! This is a persisted structure so we cannot use LPARAM
  9350. LONG lParamSort;
  9351. int iSortDirection;
  9352. ;begin_internal
  9353. // This was added for IE4
  9354. ;end_internal
  9355. UINT version;
  9356. // new for win2k. need notUsed var to calc the right size of ie4 struct
  9357. // FIELD_OFFSET does not work on bit fields
  9358. UINT uNotUsed; // feel free to rename and use
  9359. BOOL fSepProcess: 1;
  9360. // new for Whistler.
  9361. BOOL fStartPanelOn: 1; //Indicates if the Whistler StartPanel mode is ON or OFF.
  9362. BOOL fShowStartPage: 1; //Indicates if the Whistler StartPage on desktop is ON or OFF.
  9363. // If you need a new flag, steal a bit from from fSpareFlags.;internal
  9364. UINT fSpareFlags : 13;
  9365. // ;internal
  9366. // If you add any fields to this structure, you ;internal
  9367. // must also add upgrade code to shell32\util.cpp. ;internal
  9368. // ;internal
  9369. } SHELLSTATEA, *LPSHELLSTATEA;
  9370. typedef struct {
  9371. BOOL fShowAllObjects : 1;
  9372. BOOL fShowExtensions : 1;
  9373. BOOL fNoConfirmRecycle : 1;
  9374. BOOL fShowSysFiles : 1;
  9375. BOOL fShowCompColor : 1;
  9376. BOOL fDoubleClickInWebView : 1;
  9377. BOOL fDesktopHTML : 1;
  9378. BOOL fWin95Classic : 1;
  9379. BOOL fDontPrettyPath : 1;
  9380. BOOL fShowAttribCol : 1;
  9381. BOOL fMapNetDrvBtn : 1;
  9382. BOOL fShowInfoTip : 1;
  9383. BOOL fHideIcons : 1;
  9384. BOOL fWebView : 1;
  9385. BOOL fFilter : 1;
  9386. BOOL fShowSuperHidden : 1;
  9387. BOOL fNoNetCrawling : 1;
  9388. DWORD dwWin95Unused; // Win95 only - no longer supported pszHiddenFileExts
  9389. UINT uWin95Unused; // Win95 only - no longer supported cbHiddenFileExts
  9390. // Note: Not a typo! This is a persisted structure so we cannot use LPARAM
  9391. LONG lParamSort;
  9392. int iSortDirection;
  9393. UINT version;
  9394. // new for win2k. need notUsed var to calc the right size of ie4 struct
  9395. // FIELD_OFFSET does not work on bit fields
  9396. UINT uNotUsed; // feel free to rename and use
  9397. BOOL fSepProcess: 1;
  9398. // new for Whistler.
  9399. BOOL fStartPanelOn: 1; //Indicates if the Whistler StartPage mode is ON or OFF.
  9400. BOOL fShowStartPage: 1; //Indicates if the Whistler StartPage on desktop is ON or OFF.
  9401. // If you need a new flag, steal a bit from from fSpareFlags.
  9402. UINT fSpareFlags : 13;
  9403. // ;internal
  9404. // If you add any fields to this structure, you ;internal
  9405. // must also add upgrade code to shell32\util.cpp. ;internal
  9406. // ;internal
  9407. } SHELLSTATEW, *LPSHELLSTATEW;
  9408. #define SHELLSTATEVERSION_IE4 9
  9409. #define SHELLSTATEVERSION_WIN2K 10
  9410. #define SHELLSTATEVERSION 13 // rev if defaults change but size doesn't //;Internal
  9411. #ifdef UNICODE
  9412. #define SHELLSTATE SHELLSTATEW
  9413. #define LPSHELLSTATE LPSHELLSTATEW
  9414. #else
  9415. #define SHELLSTATE SHELLSTATEA
  9416. #define LPSHELLSTATE LPSHELLSTATEA
  9417. #endif
  9418. #define SHELLSTATE_SIZE_WIN95 FIELD_OFFSET(SHELLSTATE,lParamSort)
  9419. #define SHELLSTATE_SIZE_NT4 FIELD_OFFSET(SHELLSTATE,version)
  9420. #define SHELLSTATE_SIZE_IE4 FIELD_OFFSET(SHELLSTATE,uNotUsed)
  9421. #define SHELLSTATE_SIZE_WIN2K sizeof(SHELLSTATE)
  9422. SHSTDAPI_(void) SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet);
  9423. ;begin_internal
  9424. // And here's the beginning portion for public use:
  9425. ;end_internal
  9426. //
  9427. // SysFiles are these windows special files:
  9428. // "dll sys vxd 386 drv"
  9429. //
  9430. // hidden files are files with the FILE_ATTRIBUTE_HIDDEN attribute
  9431. //
  9432. // system files are files with the FILE_ATTRIBUTE_SYSTEM attribute
  9433. //
  9434. // fShowAllObjects fShowSysFiles Result
  9435. // --------------- ------------- ------
  9436. // 0 0 hide hidden + SysFiles + system files
  9437. // 0 1 hide hidden files.
  9438. // 1 0 show all files.
  9439. // 1 1 show all files.
  9440. //
  9441. typedef struct {
  9442. BOOL fShowAllObjects : 1;
  9443. BOOL fShowExtensions : 1;
  9444. BOOL fNoConfirmRecycle : 1;
  9445. BOOL fShowSysFiles : 1;
  9446. BOOL fShowCompColor : 1;
  9447. BOOL fDoubleClickInWebView : 1;
  9448. BOOL fDesktopHTML : 1;
  9449. BOOL fWin95Classic : 1;
  9450. BOOL fDontPrettyPath : 1;
  9451. BOOL fShowAttribCol : 1;
  9452. BOOL fMapNetDrvBtn : 1;
  9453. BOOL fShowInfoTip : 1;
  9454. BOOL fHideIcons : 1;
  9455. UINT fRestFlags : 3;
  9456. } SHELLFLAGSTATE, *LPSHELLFLAGSTATE;
  9457. #define SSF_SHOWALLOBJECTS 0x00000001
  9458. #define SSF_SHOWEXTENSIONS 0x00000002
  9459. #define SSF_HIDDENFILEEXTS 0x00000004 // ;Internal - not supported
  9460. #define SSF_SHOWCOMPCOLOR 0x00000008
  9461. #define SSF_SORTCOLUMNS 0x00000010 // ;Internal - corresponding SHELLSTATE fields don't exist in SHELLFLAGSTATE
  9462. #define SSF_SHOWSYSFILES 0x00000020
  9463. #define SSF_DOUBLECLICKINWEBVIEW 0x00000080
  9464. #define SSF_SHOWATTRIBCOL 0x00000100
  9465. #define SSF_DESKTOPHTML 0x00000200
  9466. #define SSF_WIN95CLASSIC 0x00000400
  9467. #define SSF_DONTPRETTYPATH 0x00000800
  9468. #define SSF_SHOWINFOTIP 0x00002000
  9469. #define SSF_MAPNETDRVBUTTON 0x00001000
  9470. #define SSF_NOCONFIRMRECYCLE 0x00008000
  9471. #define SSF_HIDEICONS 0x00004000
  9472. #define SSF_FILTER 0x00010000 // ;Internal - corresponding SHELLSTATE fields don't exist in SHELLFLAGSTATE
  9473. #define SSF_WEBVIEW 0x00020000 // ;Internal
  9474. #define SSF_SHOWSUPERHIDDEN 0x00040000 // ;Internal
  9475. #define SSF_SEPPROCESS 0x00080000 // ;Internal
  9476. #define SSF_NONETCRAWLING 0x00100000 // ;Internal
  9477. #define SSF_STARTPANELON 0x00200000 // ;Internal
  9478. #define SSF_SHOWSTARTPAGE 0x00400000 // ;Internal
  9479. // SHGetSettings(LPSHELLFLAGSTATE lpss, DWORD dwMask)
  9480. //
  9481. // Specify the bits you are interested in in dwMask and they will be
  9482. // filled out in the lpss structure.
  9483. //
  9484. // When these settings change, a WM_SETTINGCHANGE message is sent
  9485. // with the string lParam value of "ShellState".
  9486. //
  9487. SHSTDAPI_(void) SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
  9488. // SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, void **ppv, LPCITEMIDLIST *ppidlLast)
  9489. //
  9490. // Given a pidl, you can get an interface pointer (as specified by riid) of the pidl's parent folder (in ppv)
  9491. // If ppidlLast is non-NULL, you can also get the pidl of the last item.
  9492. //
  9493. SHSTDAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, void **ppv, LPCITEMIDLIST *ppidlLast);
  9494. // SHSTDAPI SHParseDisplayName(PCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
  9495. //
  9496. // given a string it will call psfDesktop->ParseDisplayName() to try and create a pidl
  9497. // if no pbc specified, it uses the preferred options for parsing.
  9498. // this includes mapping file system paths to their appropriate aliased location (RegisterObjectParam(STR_PARSE_TRANSLATE_ALIASES))
  9499. // psfgaoOut is optional for SFGAO attributes
  9500. //
  9501. SHSTDAPI SHParseDisplayName(PCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut);
  9502. // SHPathPrepareForWrite(HWND hwnd, IUnknown *punkEnableModless, LPCTSTR pszPath, DWORD dwFlags)
  9503. //
  9504. // DESCRIPTION:
  9505. // This API will prepare the path for the caller. This includes:
  9506. // 1. Prompting for the ejectable media to be re-inserted. (Floppy, CD-ROM, ZIP drive, etc.)
  9507. // 2. Prompting for the media to be formatted. (Floppy, hard drive, etc.)
  9508. // 3. Remount mapped drives if the connection was lost. (\\unc\share mapped to N: becomes disconnected)
  9509. // 4. If the path doesn't exist, create it. (SHPPFW_DIRCREATE and SHPPFW_ASKDIRCREATE)
  9510. // 5. Display an error if the media is read only. (SHPPFW_NOWRITECHECK not set)
  9511. //
  9512. // PARAMETERS:
  9513. // hwnd: Parernt window for UI. NULL means don't display UI. OPTIONAL
  9514. // punkEnableModless: Parent that will be set to modal during UI using IOleInPlaceActiveObject::EnableModeless(). OPTIONAL
  9515. // pszPath: Path to verify is valid for writting. This can be a UNC or file drive path. The path
  9516. // should only contain directories. Pass SHPPFW_IGNOREFILENAME if the last path segment
  9517. // is always filename to ignore.
  9518. // dwFlags: SHPPFW_* Flags to modify behavior
  9519. //
  9520. //-------------------------------------------------------------------------
  9521. #define SHPPFW_NONE 0x00000000
  9522. #define SHPPFW_DEFAULT SHPPFW_DIRCREATE // May change
  9523. #define SHPPFW_DIRCREATE 0x00000001 // Create the directory if it doesn't exist without asking the user.
  9524. #define SHPPFW_ASKDIRCREATE 0x00000002 // Create the directory if it doesn't exist after asking the user.
  9525. #define SHPPFW_IGNOREFILENAME 0x00000004 // Ignore the last item in pszPath because it's a file. Example: pszPath="C:\DirA\DirB", only use "C:\DirA".
  9526. #define SHPPFW_NOWRITECHECK 0x00000008 // Caller only needs to read from the drive, so don't check if it's READ ONLY.
  9527. #define SHPPFW_MEDIACHECKONLY 0x00000010 // do the retrys on the media (or net path), return errors if the file can't be found
  9528. SHSTDAPI SHPathPrepareForWrite%(HWND hwnd, IUnknown *punkEnableModless, LPCTSTR% pszPath, DWORD dwFlags);
  9529. //--------------------------------------------------------------------------
  9530. //
  9531. // Interface used for exposing the INI file methods on a shortcut file
  9532. //
  9533. //
  9534. //--------------------------------------------------------------------------
  9535. #undef INTERFACE
  9536. #define INTERFACE INamedPropertyBag
  9537. DECLARE_INTERFACE_(INamedPropertyBag, IUnknown)
  9538. {
  9539. // *** IUnknown methods ***
  9540. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  9541. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  9542. STDMETHOD_(ULONG,Release) (THIS) PURE;
  9543. // *** INamedPropertyBag methods ***
  9544. STDMETHOD(ReadPropertyNPB) (THIS_ /* [in] */ LPCOLESTR pszBagname,
  9545. /* [in] */ LPCOLESTR pszPropName,
  9546. /* [out][in] */ PROPVARIANT *pVar) PURE;
  9547. STDMETHOD(WritePropertyNPB)(THIS_ /* [in] */ LPCOLESTR pszBagname,
  9548. /* [in] */ LPCOLESTR pszPropName,
  9549. /* [in] */ PROPVARIANT *pVar) PURE;
  9550. STDMETHOD(RemovePropertyNPB)(THIS_ /* [in] */ LPCOLESTR pszBagname,
  9551. /* [in] */ LPCOLESTR pszPropName) PURE;
  9552. };
  9553. #ifdef __urlmon_h__
  9554. // NOTE: urlmon.h must be included before shlobj.h to access this function.
  9555. //
  9556. // SoftwareUpdateMessageBox
  9557. //
  9558. // Provides a standard message box for the alerting the user that a software
  9559. // update is available or installed. No UI will be displayed if there is no
  9560. // update available or if the available update version is less than or equal
  9561. // to the Advertised update version.
  9562. //
  9563. // hWnd - [in] Handle of owner window
  9564. // szDistUnit - [in] Unique identifier string for a code distribution unit. For
  9565. // ActiveX controls and Active Setup installed components, this
  9566. // is typically a GUID string.
  9567. // dwFlags - [in] Must be 0.
  9568. // psdi - [in,out] Pointer to SOFTDISTINFO ( see URLMon.h ). May be NULL.
  9569. // cbSize should be initialized
  9570. // by the caller to sizeof(SOFTDISTINFO), dwReserved should be set to 0.
  9571. //
  9572. // RETURNS:
  9573. //
  9574. // IDNO - The user chose cancel. If *pbRemind is FALSE, the caller should save the
  9575. // update version from the SOFTDISTINFO and pass it in as the Advertised
  9576. // version in future calls.
  9577. //
  9578. // IDYES - The user has selected Update Now/About Update. The caller should navigate to
  9579. // the SOFTDISTINFO's pszHREF to initiate the install or learn about it.
  9580. // The caller should save the update version from the SOFTDISTINFO and pass
  9581. // it in as the Advertised version in future calls.
  9582. //
  9583. // IDIGNORE - There is no pending software update. Note: There is
  9584. // no Ignore button in the standard UI. This occurs if the available
  9585. // version is less than the installed version or is not present or if the
  9586. // Advertised version is greater than or equal to the update version.
  9587. //
  9588. // IDABORT - An error occured. Call GetSoftwareUpdateInfo() for a more specific HRESULT.
  9589. // Note: There is no Abort button in the standard UI.
  9590. SHDOCAPI_(DWORD) SoftwareUpdateMessageBox( HWND hWnd,
  9591. LPCWSTR szDistUnit,
  9592. DWORD dwFlags,
  9593. LPSOFTDISTINFO psdi );
  9594. #endif // if __urlmon_h__
  9595. ;begin_internal
  9596. // CmdID's for CGID_MENUDESKBAR
  9597. #define MBCID_GETSIDE 1
  9598. #define MBCID_RESIZE 2
  9599. #define MBCID_SETEXPAND 3
  9600. #define MBCID_SETFLAT 4
  9601. #define MBCID_NOBORDER 5
  9602. // menubar orientation
  9603. #define MENUBAR_LEFT ABE_LEFT
  9604. #define MENUBAR_TOP ABE_TOP
  9605. #define MENUBAR_RIGHT ABE_RIGHT
  9606. #define MENUBAR_BOTTOM ABE_BOTTOM
  9607. //
  9608. // Net Access Wizard - called from NetID and WinLogon.
  9609. //
  9610. #define NAW_NETID 0x00 // called from netid tab
  9611. #define NAW_PSDOMAINJOINED 0x02 // post setup (joined domain)
  9612. #define NAW_PSDOMAINJOINFAILED 0x03 // post setup (domain joined failed)
  9613. STDAPI NetAccessWizard(HWND hwnd, UINT uType, BOOL *pfReboot);
  9614. typedef HRESULT (CALLBACK *LPNETACCESSWIZARD)(HWND hwnd, UINT uType, BOOL *pfReboot);
  9615. STDAPI ClearAutoLogon(VOID);
  9616. //
  9617. // Net Places API's called from mpr.
  9618. //
  9619. typedef enum
  9620. {
  9621. NETPLACES_WIZARD_MAPDRIVE = 0,
  9622. NETPLACES_WIZARD_ADDPLACE,
  9623. } NETPLACESWIZARDTYPE;
  9624. STDAPI_(DWORD)
  9625. NetPlacesWizardDoModal(
  9626. LPCONNECTDLGSTRUCTW lpConnDlgStruct,
  9627. NETPLACESWIZARDTYPE npwt,
  9628. BOOL fIsRoPath
  9629. );
  9630. // Definition for the exported function types (for GetProcAddress)
  9631. typedef DWORD (STDAPICALLTYPE*NetPlacesWizardDoModal_t)(LPCONNECTDLGSTRUCTW lpConnDlgStruct, NETPLACESWIZARDTYPE npwt, BOOL fIsROPath);
  9632. //
  9633. // moved here from nettarg.h (shell\inc)
  9634. //
  9635. // nCmdID
  9636. #define CFCID_SETENUMTYPE 0
  9637. //nCmdExecOpt
  9638. #define CFCOPT_ENUMINCOMING 1
  9639. #define CFCOPT_ENUMOUTGOING 2
  9640. #define CFCOPT_ENUMALL 3
  9641. /****************************************************
  9642. Items to display in the shutdown dialog (dwItems)
  9643. -------------------------------------------------
  9644. These flags can be |'d when passed in. A single
  9645. value will be returned, with NONE indicating an
  9646. error or the user clicked cancel.
  9647. -dsheldon
  9648. ****************************************************/
  9649. #define SHTDN_NONE 0x000000000
  9650. #define SHTDN_LOGOFF 0x000000001
  9651. #define SHTDN_SHUTDOWN 0x000000002
  9652. #define SHTDN_RESTART 0x000000004
  9653. #define SHTDN_RESTART_DOS 0x000000008
  9654. #define SHTDN_SLEEP 0x000000010
  9655. #define SHTDN_SLEEP2 0x000000020
  9656. #define SHTDN_HIBERNATE 0x000000040
  9657. #define SHTDN_DISCONNECT 0x000000080
  9658. // Shutdown dialog function exported from MSGINA.dll
  9659. STDAPI_(DWORD) ShellShutdownDialog(HWND hwndParent, LPCTSTR szUsername, DWORD dwExcludeItems);
  9660. typedef DWORD (STDAPICALLTYPE*PFNSHELLSHUTDOWNDIALOG)(HWND hwndParent, LPCTSTR szUsername, DWORD dwExcludeItems);
  9661. // Define a clipboard format for a data object to pass a user's SID
  9662. // A data object supporting this format is passed to IShellExtInit::Initialize
  9663. // before calling IShellPropSheetExt::AddPages.
  9664. #define CFSTR_USERPROPPAGESSID TEXT("UserPropertyPagesSid")
  9665. // Registry paths where extra IShellPropSheetExt handlers can be put so that
  9666. // extended pages are added to the CPL or User Properties
  9667. #define REGSTR_USERSANDPASSWORDS_CPL \
  9668. /* HKLM\\ */ TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Users and Passwords")
  9669. // CLSIDs go in HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\Users and Passwords\shellex\PropertySheetHandlers
  9670. #define REGSTR_USERPROPERTIES_SHEET \
  9671. /* HKLM\\ */ TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Users and Passwords\\User Properties")
  9672. // CLSIDs go in HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\Users and Passwords\User Properties\shellex\PropertySheetHandlers
  9673. //
  9674. // SHFileSysBindToStorage()
  9675. // Wrap of file system IShellFolder::BindToStorage
  9676. //
  9677. // pszPath // storage path
  9678. // grfFileAttrib // optional Win32/64 file attribute bits. Use 0 to specify default behavior
  9679. // grfMode // STGM_ mode flags.
  9680. // grfFlags // BIND_xxx bind flags
  9681. // riid // storage interface ID
  9682. // **ppv // outbound storage interface pointer.
  9683. //
  9684. SHSTDAPI SHFileSysBindToStorage(LPCWSTR pszPath, DWORD grfFileAttrib, DWORD grfMode, DWORD grfFlags, REFIID riid, void **ppv);
  9685. // DOC'ed for DOJ compliance
  9686. ;end_internal
  9687. // SHPropStgCreate()
  9688. // Wrap of IPropertySetStorage::Open/Create
  9689. //
  9690. // This function ensures proper handling of code page retrieval/assignment
  9691. // for the requested property set operation.
  9692. //
  9693. // psstg, // Address of IPropertySetStorage vtable
  9694. // fmtid, // property set ID
  9695. // pclsid, // class ID associated with the set. This can be NULL
  9696. // grfFlags, // PROPSETFLAG_xxx. All sets containing ansi bytes should be created with
  9697. // PROPSETFLAG_ANSI, otherwise PROPSETFLAG_DEFAULT.
  9698. // grfMode, // STGM_ flags. Must contain STGM_DIRECT|STGM_EXCLUSIVE.
  9699. // dwDisposition, // OPEN_EXISTING. OPEN_ALWAYS, CREATE_NEW, or CREATE_ALWAYS
  9700. // IPropertyStorage** ppstg, // Address to receive requested vtable
  9701. // puCodePage // Optional address to receive the code page ID for the set.
  9702. //
  9703. SHSTDAPI SHPropStgCreate( IPropertySetStorage* psstg, REFFMTID fmtid, CLSID* pclsid, DWORD grfFlags, DWORD grfMode, DWORD dwDisposition, OUT IPropertyStorage** ppstg, OUT OPTIONAL UINT* puCodePage );
  9704. // SHPropStgReadMultiple()
  9705. // IPropertyStorage::ReadMultiple wrap
  9706. //
  9707. // The wrap ensures ANSI/UNICODE translations are handled properly for
  9708. // legacy property sets.
  9709. //
  9710. // pps, // address of IPropertyStorage vtable.
  9711. // uCodePage, //Code page value retrieved from SHCreatePropertySet
  9712. // cpspec, //Count of properties being read
  9713. // rgpspec, //Array of the properties to be read
  9714. // rgvar //Array of PROPVARIANTs containing the property values on return
  9715. //
  9716. SHSTDAPI SHPropStgReadMultiple( IPropertyStorage* pps, UINT uCodePage, ULONG cpspec, PROPSPEC const rgpspec[], PROPVARIANT rgvar[] );
  9717. // SHPropStgWriteMultiple()
  9718. // IPropertyStorage::WriteMultiple wrap
  9719. //
  9720. // The wrap ensures ANSI/UNICODE translations are handled properly for
  9721. // legacy property sets.
  9722. //
  9723. // pps, // address of IPropertyStorage vtable.
  9724. // uCodePage, // code page retrieved from SHCreatePropertySet.
  9725. // cpspec, // The number of properties being set
  9726. // rgpspec, // Property specifiers
  9727. // rgvar, // Array of PROPVARIANT values
  9728. // propidNameFirst // Minimum value for property identifiers. This value should be >= PID_FIRST_USABLE
  9729. //
  9730. SHSTDAPI SHPropStgWriteMultiple( IPropertyStorage* pps, UINT* puCodePage, ULONG cpspec, PROPSPEC const rgpspec[], PROPVARIANT rgvar[], PROPID propidNameFirst );
  9731. ;begin_internal
  9732. // SHIsLegacyAnsiProperty()
  9733. //
  9734. // Determine whether the property is a legacy ANSI property, and if so,
  9735. // compute a conversion type for the property.
  9736. //
  9737. // fmtid, // property set identifier
  9738. // propid, // property identifier
  9739. // pvt, // optional: if non-null, contains on input the VARTYPE for the property; on output,
  9740. // the converted type. (e.g., VT_LPSTR <--> VT_LPWSTR).
  9741. SHSTDAPI_(BOOL) SHIsLegacyAnsiProperty( REFFMTID fmtid, PROPID propid, IN OUT OPTIONAL VARTYPE* pvt );
  9742. //-------------------------------------------------------------------------//
  9743. // linkwnd.h - declaration of LinkWindow control
  9744. //
  9745. // LinkWindow supports HTML-like embedded links in the caption text.
  9746. // (e.g. "<a>Click Here</a> to see something cool"
  9747. //
  9748. // An unlimited number of embedded links are supported. When the user clicks
  9749. // on a link, an WM_NOTIFY - LWN_CLICK notification message is sent to the
  9750. // parent window. The message data includes the zero-based index
  9751. // (left to right orientation) of the link that was clicked.
  9752. //
  9753. // scotthan: author/owner
  9754. // dsheldon: moved this to shlobjp.h. Eventually destined for comctl32.
  9755. EXTERN_C BOOL WINAPI LinkWindow_RegisterClass() ;
  9756. EXTERN_C BOOL WINAPI LinkWindow_UnregisterClass( HINSTANCE ) ;
  9757. #define INVALID_LINK_INDEX (-1)
  9758. #define MAX_LINKID_TEXT 48
  9759. #define LINKWINDOW_CLASS TEXT("Link Window")
  9760. #define LWS_TRANSPARENT 0x0001
  9761. #define LWS_HOTTRACK 0x0002
  9762. #define LWIF_ITEMINDEX 0x00000001
  9763. #define LWIF_STATE 0x00000002
  9764. #define LWIF_ITEMID 0x00000004
  9765. #define LWIF_URL 0x00000008
  9766. #define LWIS_FOCUSED 0x0001
  9767. #define LWIS_ENABLED 0x0002
  9768. #define LWIS_VISITED 0x0004
  9769. #define LWIS_SHELLEXECURL 0x00000008 // If the caller didn't handle the msg (NM_CLICK), then ShellExecute the szURL
  9770. // BUGBUG: we've got to change the following definition to
  9771. // wininet.h::INTERNET_MAX_URL_LENGTH.
  9772. // Currently, this breaks various dependents.
  9773. #define LW_MAX_URL_LENGTH (2048 + 32 + sizeof("://"))
  9774. // LWITEM
  9775. typedef struct tagLWITEMA {
  9776. UINT mask ;
  9777. int iLink ;
  9778. UINT state ;
  9779. UINT stateMask ;
  9780. CHAR szID[MAX_LINKID_TEXT] ;
  9781. CHAR szUrl[LW_MAX_URL_LENGTH] ; //bugbug: INTERNET_MAX_URL_LENGTH
  9782. } LWITEMA, *LPLWITEMA;
  9783. typedef struct tagLWITEMW {
  9784. UINT mask ;
  9785. int iLink ;
  9786. UINT state ;
  9787. UINT stateMask ;
  9788. WCHAR szID[MAX_LINKID_TEXT] ;
  9789. WCHAR szUrl[LW_MAX_URL_LENGTH] ; //bugbug: INTERNET_MAX_URL_LENGTH
  9790. } LWITEMW, *LPLWITEMW;
  9791. // LWHITTESTINFO
  9792. typedef struct tagLWHITTESTINFOA {
  9793. POINT pt ;
  9794. LWITEMA item ;
  9795. } LWHITTESTINFOA, *LPLWHITTESTINFOA;
  9796. // LWHITTESTINFO
  9797. typedef struct tagLWHITTESTINFOW {
  9798. POINT pt ;
  9799. LWITEMW item ;
  9800. } LWHITTESTINFOW, *LPLWHITTESTINFOW;
  9801. // NMLINKWND
  9802. typedef struct tagNMLINKWNDA {
  9803. NMHDR hdr;
  9804. LWITEMA item ;
  9805. } NMLINKWNDA, *LPNMLINKWNDA;
  9806. typedef struct tagNMLINKWNDW {
  9807. NMHDR hdr;
  9808. LWITEMW item ;
  9809. } NMLINKWNDW, *LPNMLINKWNDW;
  9810. #ifdef UNICODE
  9811. #define LWITEM LWITEMW
  9812. #define LPLWITEM LPLWITEMW
  9813. #define LWHITTESTINFO LWHITTESTINFOW
  9814. #define LPLWHITTESTINFO LPLWHITTESTINFOW
  9815. #define NMLINKWND NMLINKWNDW
  9816. #define LPNMLINKWND LPNMLINKWNDW
  9817. #else //UNICODE
  9818. #define LWITEM LWITEMA
  9819. #define LPLWITEM LPLWITEMA
  9820. #define LWHITTESTINFO LWHITTESTINFOA
  9821. #define LPLWHITTESTINFO LPLWHITTESTINFOA
  9822. #define NMLINKWND NMLINKWNDA
  9823. #define LPNMLINKWND LPNMLINKWNDA
  9824. #endif //UNICODE
  9825. // LinkWindow notifications
  9826. // NM_CLICK // wParam: n/a, lParam: LPLWITEM, ret: ignored.
  9827. // LinkWindow messages
  9828. #define LWM_HITTEST (WM_USER+0x300) // wParam: n/a, lparam: LPLWHITTESTINFO, ret: BOOL
  9829. #define LWM_GETIDEALHEIGHT (WM_USER+0x301) // wParam: n/a, lparam: n/a, ret: cy
  9830. #define LWM_SETITEM (WM_USER+0x302) // wParam: n/a, lparam: LWITEM*, ret: BOOL
  9831. #define LWM_GETITEM (WM_USER+0x303) // wParam: n/a, lparam: LWITEM*, ret: BOOL
  9832. //-------------------------------------------------------------------------//
  9833. // INTERNAL: Darwin link tracking for start menu
  9834. // lives in unicpp\startmnu.cpp
  9835. #if _WIN32_IE >= 0x0600
  9836. // Note: SHRegisterDarwinLink takes ownership of pidlFull. fUpdate means: update the Darwin state right away
  9837. SHSTDAPI_(BOOL) SHRegisterDarwinLink(LPITEMIDLIST pidlFull, LPWSTR pszDarwinID, BOOL fUpdate);
  9838. // Use this function to update the Darwin state for all registered Darwin shortcuts.
  9839. SHSTDAPI_(void) SHReValidateDarwinCache();
  9840. SHSTDAPI SHParseDarwinIDFromCacheW(LPWSTR pszDarwinDescriptor, LPWSTR *ppwszOut);
  9841. #endif
  9842. //
  9843. // GroupButton is a variation of a group box control but supports a link-like
  9844. // caption bar, and optionally, can be buddied to a containee window for
  9845. // auto-positioning behavior.
  9846. //
  9847. // scotthan: author/owner
  9848. #define GROUPBUTTON_CLASS TEXT("GroupButton")
  9849. EXTERN_C ATOM WINAPI GroupButton_RegisterClass() ;
  9850. EXTERN_C BOOL WINAPI GroupButton_UnregisterClass() ;
  9851. #include <pshpack8.h>
  9852. typedef struct tagGBPLACEMENT
  9853. {
  9854. LONG x ; // in: top left; -1 to ignore
  9855. LONG y ; // in: top right; -1 to ignore
  9856. LONG cx ; // in: width to assign; -1 to ignore.
  9857. // If cx != -1, cxContain and cxMax are ignored.
  9858. LONG cy ; // in: height to assign; -1 to ignore.
  9859. // If cy != -1, cyContain and cyMax are ignored.
  9860. LONG cxBuddy ; // in: width of buddy area; -1 to ignore
  9861. LONG cyBuddy ; // in: height of buddy area; -1 to ignore
  9862. LONG cxBuddyMargin ;// in: width of buddy margin; -1 to ignore
  9863. LONG cyBuddyMargin ;// in: height of buddy margin; -1 to ignore
  9864. RECT rcBuddy ; // out: new buddy rect in parent coords.
  9865. RECT rcWindow ; // out: new window rect in parent coords.
  9866. HDWP hdwp ; // optional in: Non-NULL => DeferWindowPos,
  9867. // NULL => SetWindowPos
  9868. } GBPLACEMENT, *PGBPLACEMENT, *LPGBPLACEMENT ;
  9869. #include <poppack.h> /* Return to byte packing */
  9870. // Buddy flags
  9871. #define GBBF_HRESIZE 0x00000001
  9872. #define GBBF_VRESIZE 0x00000002
  9873. #define GBBF_HSCROLL 0x00000004
  9874. #define GBBF_VSCROLL 0x00000008
  9875. #define GBBF_HSLAVE 0x00000010
  9876. #define GBBF_VSLAVE 0x00000020
  9877. // Group button messages
  9878. #define GBM_FIRST (WM_USER+0x400) // arbitrary
  9879. #define GBM_SETPLACEMENT (GBM_FIRST+0) // WPARAM: n/a, LPARAM: PGBPLACEMENT, return: BOOL
  9880. #define GBM_SETBUDDY (GBM_FIRST+1) // WPARAM: HWND hwndBuddy, LPARAM: dwBuddyFlags, return: BOOL
  9881. #define GBM_GETBUDDY (GBM_FIRST+2) // WPARAM: n/a, LPARAM: n/a, return: HWND
  9882. #define GBM_SETDROPSTATE (GBM_FIRST+3) // WPARAM: BOOL fDropped, LPARAM: n/a, return: BOOL
  9883. #define GBM_GETDROPSTATE (GBM_FIRST+4) // WPARAM: n/a, LPARAM: n/a, return: BOOL fDropped
  9884. #define GBM_LAST GBM_GETDROPSTATE
  9885. typedef struct tagGBNQUERYBUDDYSIZE
  9886. {
  9887. NMHDR hdr;
  9888. LONG cx ;
  9889. LONG cy ;
  9890. } GBNQUERYBUDDYSIZE, *LPGBNQUERYBUDDYSIZE, *PGBNQUERYBUDDYSIZE ;
  9891. // Group button notifications
  9892. #define GBN_FIRST 2000U
  9893. #define GBN_LAST 2020U
  9894. #define GBN_QUERYBUDDYHEIGHT (GBN_FIRST+0) // LPARAM: LPGBNQUERYBUDDYSIZE
  9895. #define GBN_QUERYBUDDYWIDTH (GBN_FIRST+1) // LPARAM: LPGBNQUERYBUDDYSIZE.
  9896. // create standard IExtractIcon for file system like things (that does not really exist)
  9897. // DOC'ed for DOJ compliance
  9898. ;end_internal
  9899. SHSTDAPI SHCreateFileExtractIcon%(LPCTSTR% pszFile, DWORD dwFileAttributes, REFIID riid, void **ppv);
  9900. ;begin_internal
  9901. // Limit Input Mask values:
  9902. #define LIM_FLAGS 0x00000001 // dwFlags contains valid data. Otherwise all default values are used.
  9903. #define LIM_FILTER 0x00000002 // pszFilter contains valid data. At least one of the filter and mask fields must be used. Both can be used it desired.
  9904. #define LIM_HINST 0x00000008 // hinst contains valid data
  9905. #define LIM_TITLE 0x00000010 // pszTitle contains valid data. This data will be shown in bold at the top of any tooltips displayed.
  9906. #define LIM_MESSAGE 0x00000020 // pszMessage contains valid data. This data will be shown in default font below the title if a title is also used.
  9907. #define LIM_ICON 0x00000040 // hicon contains valid data. This icon will be displayed in front of the title if a title is given.
  9908. #define LIM_NOTIFY 0x00000080 // hwndNotify contains the window handle that should receive any notification messages. By default, the parent of hwndEdit recieves notifications.
  9909. #define LIM_TIMEOUT 0x00000100 // iTimeout is valid. Otherwise the default timeout of 10 seconds is used.
  9910. #define LIM_TIPWIDTH 0x00000200 // cxTipWidth is valid. Otherwiser the default is 500 pixels.
  9911. // Limit Input Flags values:
  9912. #define LIF_INCLUDEFILTER 0x00000000 // default value. pszFilter is a string of allowable characters.
  9913. #define LIF_EXCLUDEFILTER 0x00000001 // pszFilter is a string of excluded characters.
  9914. #define LIF_CATEGORYFILTER 0x00000002 // pszFilter is not a pointer, but rather its a bitfield indicating types or characters. If combined with LIF_EXCLUDEFILTER these are excluded categories, otherwise they are allowed categories.
  9915. #define LIF_WARNINGBELOW 0x00000000 // default value. Balloon tooltips will be shown below the window by default.
  9916. #define LIF_WARNINGABOVE 0x00000004 // Ballon tooltips will be shown above the window by default.
  9917. #define LIF_WARNINGCENTERED 0x00000008 // Ballon tooltips will be shown pointing to the center of the window.
  9918. #define LIF_WARNINGOFF 0x00000010 // no balloon tooltip will be displayed upon invalid input.
  9919. #define LIF_FORCEUPPERCASE 0x00000020 // all characters will be converted to upper case. Cannot be use with LIF_FORCELOWERCASE.
  9920. #define LIF_FORCELOWERCASE 0x00000040 // all characters will be converted to lower case. Cannot be use with LIF_FORCEUPPERCASE.
  9921. #define LIF_MEESAGEBEEP 0x00000000 // default value. A tone will be played to alert the user if they attemp invalid input.
  9922. #define LIF_SILENT 0x00000080 // No tone will be played.
  9923. #define LIF_NOTIFYONBADCHAR 0x00000100 // a notify message will be sent to hwndNotify when invalid input is attempted.
  9924. #define LIF_HIDETIPONVALID 0x00000200 // if the tooltip is displayed, it should be hidden when the next valid character is entered. By default, the tip remains visible for iTimeOut milliseconds.
  9925. #define LIF_PASTESKIP 0x00000000 // default value. When pasting, skip the bad characters and paste all of the good characters.
  9926. #define LIF_PASTESTOP 0x00000400 // When pasting, stop when the first bad character is incountered. Valid characters in front of this will get pasted.
  9927. #define LIF_PASTECANCEL 0x00000800 // When pasting, abort the entire paste if any characters are invalid.
  9928. #define LIF_KEEPCLIPBOARD 0x00001000 // When pasting, don't modify the contents of the clipboard when there are invalid characters. By defualt the clipboard is changed. How it is changed depends on which LIF_PASTE* flag is used.
  9929. // Limit Input Category Filters:
  9930. // these flags use the result of GetStringTypeEx with CT_TYPE1:
  9931. #define LICF_UPPER 0x00000001 // Uppercase
  9932. #define LICF_LOWER 0x00000002 // Lowercase
  9933. #define LICF_DIGIT 0x00000004 // Decimal digits
  9934. #define LICF_SPACE 0x00000008 // Space characters
  9935. #define LICF_PUNCT 0x00000010 // Punctuation
  9936. #define LICF_CNTRL 0x00000020 // Control characters
  9937. #define LICF_BLANK 0x00000040 // Blank characters
  9938. #define LICF_XDIGIT 0x00000080 // Hexadecimal digits
  9939. #define LICF_ALPHA 0x00000100 // Any linguistic character: alphabetic, syllabary, or ideographic
  9940. // these flags check for a few things that GetStringTypeEx doesn't check
  9941. #define LICF_BINARYDIGIT 0x00010000 // 0-1
  9942. #define LICF_OCTALDIGIT 0x00020000 // 0-7
  9943. #define LICF_ATOZUPPER 0x00100000 // A-Z (use LICF_ALPHA for language independent check)
  9944. #define LICF_ATOZLOWER 0x00200000 // a-z (use LICF_ALPHA for language independent check)
  9945. #define LICF_ATOZ (LICF_ATOZUPPER|LICF_ATOZLOWER) // a-z, A-Z
  9946. ;end_internal
  9947. ;begin_both
  9948. #include <pshpack8.h>
  9949. ;end_both
  9950. ;begin_internal
  9951. typedef struct tagLIMITINPUT
  9952. {
  9953. DWORD cbSize;
  9954. DWORD dwMask;
  9955. DWORD dwFlags;
  9956. HINSTANCE hinst;
  9957. LPWSTR pszFilter; // pointer to a string, or the ID of a string resource if hinst is also given, or LPSTR_TEXTCALLBACK if the parent window should be notified to provide a string.
  9958. LPWSTR pszTitle; // pointer to a string, or the ID of a string resource if hinst is also given, or LPSTR_TEXTCALLBACK if the parent window should be notified to provide a string.
  9959. LPWSTR pszMessage; // pointer to a string, or the ID of a string resource if hinst is also given, or LPSTR_TEXTCALLBACK if the parent window should be notified to provide a string.
  9960. HICON hIcon; // handle to an icon, or I_ICONCALLBACK if the notify window should be asked to provide an icon.
  9961. HWND hwndNotify; // handle to a window to process notify messages
  9962. INT iTimeout; // time in milliseconds to display the tooltip
  9963. INT cxTipWidth; // max width of the tooltip in pixels. Defaults to 500.
  9964. } LIMITINPUT;
  9965. typedef struct tagNMLIDISPINFO
  9966. {
  9967. NMHDR hdr; // standard notification header structure
  9968. LIMITINPUT li; // the mask member indicates which fields must be filled out.
  9969. } NMLIDISPINFO, * LPNMLIDISPINFO, NMLIFILTERINFO, * LPNMLIFILTERINFO;
  9970. #define LIN_GETDISPINFO 0x01 // notify code sent to retrieve tooltip display info
  9971. #define LIN_GETFILTERINFO 0x02 // notify code sent to retrieve filter or mask info
  9972. typedef struct tagNMLIBADCHAR
  9973. {
  9974. NMHDR hdr; // standard notification header structure
  9975. WPARAM wParam; // wParam sent in WM_CHAR message
  9976. LPARAM lParam; // lParam sent in WM_CHAR message
  9977. } NMLIBADCHAR, * LPNMLIBADCHAR;
  9978. #define LIN_BADCHAR 0x03 // notify code sent when a character is filtered out
  9979. #define I_ICONCALLBACK ((HICON)-1L)
  9980. // Helpers which prevent entry of invalid (as defined by the folder) characters. Call on LVN_BEGIN_INPUT_EDIT
  9981. // doc'ed for DOJ compliance
  9982. ;end_internal
  9983. SHSTDAPI SHLimitInputEdit(HWND hwndEdit, IShellFolder *psf);
  9984. ;begin_internal
  9985. SHSTDAPI SHLimitInputEditWithFlags(HWND hwndEdit, LIMITINPUT * pil);
  9986. SHSTDAPI SHLimitInputEditChars(HWND hwndEdit, LPCWSTR pszValidChars, LPCWSTR pszInvalidChars);
  9987. SHSTDAPI SHLimitInputCombo(HWND hwndComboBox, IShellFolder *psf);
  9988. // DOC'ed for DOJ Compliance
  9989. ;end_internal
  9990. #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)
  9991. //
  9992. // The SHMultiFileProperties API displays a property sheet for a
  9993. // set of files specified in an IDList Array.
  9994. //
  9995. // Parameters:
  9996. // pdtobj - Data object containing list of files. The data
  9997. // object must provide the "Shell IDList Array"
  9998. // clipboard format. The parent folder's implementation of
  9999. // IShellFolder::GetDisplayNameOf must return a fully-qualified
  10000. // filesystem path for each item in response to the
  10001. // SHGDN_FORPARSING flag.
  10002. //
  10003. // dwFlags - Reserved for future use. Should be set to 0.
  10004. //
  10005. // Returns:
  10006. // S_OK
  10007. //
  10008. SHSTDAPI SHMultiFileProperties(IDataObject *pdtobj, DWORD dwFlags);
  10009. #endif
  10010. #if (_WIN32_IE >= 0x0600)
  10011. //
  10012. //
  10013. typedef void (CALLBACK *PFNASYNCICONTASKBALLBACK)(LPCITEMIDLIST pidl, LPVOID pvData, LPVOID pvHint, INT iIconIndex, INT iOpenIconIndex);
  10014. // HRESULT SHMapIDListToImageListIndexAsync(IShellTaskScheduler* pts, IShellFolder *psf, LPCITEMIDLIST pidl, UINT flags,
  10015. // PFNASYNCICONTASKBALLBACK pfn, LPVOID pvData, LPVOID pvHint, int *piIndex, int *piIndexSel);
  10016. // A usefull function for asynchronously mapping idlist into index into system
  10017. // image list. Optionally it can also look up the index of the selected icon.
  10018. // pts Task scheduler interface to use to create the background task
  10019. // psf Shell folder relating to the pidl
  10020. // pidl Item whose icon is requested
  10021. // flags GIL_ flags
  10022. // pfn Function called back when the background task is done
  10023. // pvData User data passed back in the (*pfn) callback
  10024. // pvHint User data passed back in the (*pfn) callback
  10025. // piIndex Icon index returned. This is the temporary index if the function returns E_PENDING. The final index will be provided thru the callback
  10026. // piIndexSel Optional icon index for the open icon case (GIL_OPENICON).
  10027. //
  10028. // Returns S_OK if all the requested info was available. E_PENDING means that you get temporary icons, and will be called back
  10029. // asynchronously with the final icons. Other failure code means the function failed.
  10030. SHSTDAPI SHMapIDListToImageListIndexAsync(IShellTaskScheduler* pts, IShellFolder *psf, LPCITEMIDLIST pidl, UINT flags,
  10031. PFNASYNCICONTASKBALLBACK pfn, LPVOID pvData, LPVOID pvHint, int *piIndex, int *piIndexSel);
  10032. #endif // (_WIN32_IE >= 0x0600)
  10033. // A usefull function in Defview for mapping idlist into index into system
  10034. // image list. Optionally it can also look up the index of the selected
  10035. // icon.
  10036. SHSTDAPI_(int) SHMapPIDLToSystemImageListIndex(IShellFolder *pshf, LPCITEMIDLIST pidl, int *piIndexSel);
  10037. ;begin_internal
  10038. // DOC'ed for DOJ Compliance
  10039. ;end_internal
  10040. EXTERN_C WINSHELLAPI HRESULT STDAPICALLTYPE SHCLSIDFromString(LPCWSTR lpsz, LPCLSID lpclsid);
  10041. HANDLE _SHAllocShared(LPCVOID pvData, DWORD dwSize, DWORD dwDestinationProcessId);
  10042. BOOL _SHFreeShared(HANDLE hData, DWORD dwSourceProcessId);
  10043. void *_SHLockShared(HANDLE hData, DWORD dwSourceProcessId);
  10044. BOOL _SHUnlockShared(void * pvData);
  10045. STDAPI SHFlushClipboard(void);
  10046. STDAPI SHCreateQueryCancelAutoPlayMoniker(IMoniker** ppmoniker);
  10047. HINSTANCE WINAPI SHGetShellStyleHInstance(void);
  10048. STDAPI_(void) PerUserInit(void);
  10049. WINSHELLAPI BOOL WINAPI SHRunControlPanel(LPCWSTR lpcszCmdLine, HWND hwndMsgParent);
  10050. #ifndef _SHLOBJ_NO_PICKICONDLG
  10051. WINSHELLAPI int WINAPI PickIconDlg(HWND hwnd, LPWSTR pszIconPath, UINT cbIconPath, int *piIconIndex);
  10052. #endif
  10053. typedef struct tagAAMENUFILENAME
  10054. {
  10055. SHORT cbTotal;
  10056. BYTE rgbReserved[12];
  10057. WCHAR szFileName[1]; // variable length string
  10058. } AASHELLMENUFILENAME, *LPAASHELLMENUFILENAME;
  10059. typedef struct tagAASHELLMENUITEM
  10060. {
  10061. void* lpReserved1;
  10062. int iReserved;
  10063. UINT uiReserved;
  10064. LPAASHELLMENUFILENAME lpName; // name of file
  10065. LPWSTR psz; // text to use if no file
  10066. } AASHELLMENUITEM, *LPAASHELLMENUITEM;
  10067. ;begin_internal
  10068. int _cdecl ShellMessageBoxWrapW(HINSTANCE hInst, HWND hWnd, LPCWSTR pszMsg, LPCWSTR pszTitle, UINT fuStyle, ...);
  10069. #ifdef UNICODE
  10070. #define ShellMessageBoxWrap ShellMessageBoxWrapW
  10071. #else
  10072. #define ShellMessageBoxWrap ShellMessageBoxA
  10073. #endif
  10074. // Helpers for handling IDataObject stuff - from shell32.dll
  10075. // DOC'ed for DOJ compliance
  10076. ;end_internal
  10077. STDAPI SHGetAttributesFromDataObject(IDataObject *pdo, DWORD dwAttributeMask, DWORD *pdwAttributes, UINT *pcItems);
  10078. ;begin_internal
  10079. STDAPI SHSimulateDropOnClsid(REFCLSID clsidDrop, IUnknown* punkSite, IDataObject* pdo);
  10080. ;end_internal
  10081. ;begin_both
  10082. #include <poppack.h> /* Return to byte packing */
  10083. ;end_both
  10084. ;begin_both
  10085. #ifdef __cplusplus
  10086. }
  10087. #endif /* __cplusplus */
  10088. #include <poppack.h>
  10089. ;end_both
  10090. SHDOCAPI_(BOOL) ImportPrivacySettings( LPCWSTR szFilename,
  10091. IN OUT BOOL* pfParsePrivacyPreferences, IN OUT BOOL* pfParsePerSiteRules);
  10092. #ifndef IEnumPrivacyRecords
  10093. typedef interface IEnumPrivacyRecords IEnumPrivacyRecords;
  10094. #endif
  10095. SHDOCAPI DoPrivacyDlg( HWND hwndParent, LPOLESTR pszUrl, IEnumPrivacyRecords *pPrivacyEnum, BOOL fReportAllSites);
  10096. #endif // _SHLOBJ_H_
  10097. #endif // _SHLOBJP_H_ ;Internal