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.

6568 lines
266 KiB

  1. //***************************************************************************
  2. // --- SHELLAPI.W SHSEMIP.H SHLOBJ.W SHOBJIDL.IDL SHLDISP.IDL SHPRIV.IDL ---
  3. // Which header is best for my new API?
  4. //
  5. // SHLOBJ - *AVOID NEW USAGE*, PREFER OTHER HEADERS
  6. // used primarily for legacy compatibility
  7. //
  8. // SHELLAPI - ALL NEW SHELL32 EXPORTS public and private
  9. // used for both public and private exports from shell32
  10. //
  11. // SHSEMIP - *AVOID _ALL_ USAGE*, NO EXPORTS, SUPER PRIVATE
  12. // used for very private shell defines.
  13. //
  14. // SHOBJIDL - ALL NEW SHELL PUBLIC INTERFACES
  15. // primary file for public shell (shell32+) interfaces
  16. //
  17. // SHLDISP - ALL NEW SHELL AUTOMATION INTERFACES
  18. // automation interfaces are always public
  19. //
  20. // SHPRIV - ALL NEW SHELL PRIVATE INTERFACES
  21. // private interfaces used anywhere in the shell
  22. //
  23. //
  24. // SHLOBJ was originally the file that defined all of shell32's interfaces.
  25. // it devolved into a dumping ground of public and private APIs and
  26. // interfaces. in the effort to better support COM and better API management
  27. // we are attempting to avoid using shlobj
  28. //***************************************************************************
  29. #ifndef _SHLOBJP_H_
  30. #define _SHLOBJP_H_
  31. #define NO_MONIKER
  32. #include <docobj.h>
  33. #include <shldisp.h>
  34. #include <pshpack1.h> /* Assume byte packing throughout */
  35. #ifdef __cplusplus
  36. extern "C" { /* Assume C declarations for C++ */
  37. #endif /* __cplusplus */
  38. #include <shtypes.h>
  39. #include <shpriv.h>
  40. #include <iepriv.h>
  41. // HMONITOR is already declared in NT 5's windef.h.
  42. #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
  43. DECLARE_HANDLE(HMONITOR);
  44. #define HMONITOR_DECLARED
  45. #endif
  46. #include <tlog.h>
  47. // DOC'ed for DOJ compliance
  48. SHSTDAPI_(void *) SHRealloc(void * pv, SIZE_T cbNew);
  49. SHSTDAPI_(SIZE_T) SHGetSize(void * pv);
  50. // DOC'ed for DOJ compliance
  51. #define CMF_FINDHACK 0x00000080 // This is a hack - we should remove this bit
  52. //
  53. // Private QueryContextMenuFlag passed from DefView
  54. //
  55. #define CMF_DVFILE 0x00010000 // "File" pulldown
  56. #define CMF_ICM3 0x00020000 // QueryContextMenu can assume IContextMenu3 semantics (i.e.,
  57. // will receive WM_INITMENUPOPUP, WM_MEASUREITEM, WM_DRAWITEM,
  58. // and WM_MENUCHAR, via HandleMenuMsg2)
  59. #define CMICEXSIZE_NT4 (SIZEOF(CMINVOKECOMMANDINFOEX) - SIZEOF(POINT))
  60. #define CMIC_MASK_NO_HOOKS SEE_MASK_NO_HOOKS
  61. #define CMIC_MASK_DATAOBJECT 0x40000000 // lpPara is IDataObject*
  62. #define CMIC_MASK_MODAL 0x80000000
  63. #define CMIC_VALID_SEE_FLAGS SEE_VALID_CMIC_FLAGS
  64. #include <pshpack8.h>
  65. // the struct below is used for cross-process passing of CMINVOKECOMMANDINFOEX structs
  66. // we store offsets for the strings into ourself and we are win64 safe
  67. typedef struct {
  68. DWORD cbSize; // size of the struct
  69. DWORD fMask; // any combination of CMIC_MASK_*
  70. DWORD dwHwnd; // might be NULL (indicating no owner window)
  71. int nShow; // one of SW_ values for ShowWindow() API
  72. DWORD dwHotKey;
  73. POINT ptInvoke; // Point where it's invoked
  74. DWORD dwVerbW; // offset from struct to lpVerbW
  75. DWORD dwParametersW; // offset from struct to lpParametersW - might be NULL (indicating no parameter)
  76. DWORD dwDirectoryW; // offset from struct to lpDirectoryW - might be NULL (indicating no specific directory)
  77. DWORD dwTitleW; // offset from struct to lpTitleW - might be NULL (indicating no title)
  78. }ICIX_PERSIST;
  79. #include <poppack.h>
  80. #define CONTEXTMENU_IDCMD_FIRST 1 // minimal QueryContextMenu idCmdFirst value //
  81. #define CONTEXTMENU_IDCMD_LAST 0x7fff // maximal QueryContextMenu idCmdLast value //
  82. //----------------------------------------------------------------------------
  83. // Internal helper macro
  84. //----------------------------------------------------------------------------
  85. #define _IOffset(class, itf) ((UINT_PTR)&(((class *)0)->itf))
  86. #define IToClass(class, itf, pitf) ((class *)(((LPSTR)pitf)-_IOffset(class, itf)))
  87. #define IToClassN(class, itf, pitf) IToClass(class, itf, pitf)
  88. //
  89. // Helper macro definitions
  90. //
  91. #define S_BOOL(f) MAKE_SCODE(SEVERITY_SUCCESS, 0, f)
  92. #ifdef DEBUG
  93. #define ReleaseAndAssert(punk) Assert(punk->lpVtbl->Release(punk)==0)
  94. #else
  95. #define ReleaseAndAssert(punk) (punk->lpVtbl->Release(punk))
  96. #endif
  97. //
  98. // this interface is just the IID. return back
  99. // a pointer to the IPersist interface if the object
  100. // implementation is free threaded. this is used
  101. // for performance on free threaded objects.
  102. //
  103. #define IPersistFreeThreadedObject IPersist
  104. // this interface is just the IID. return back
  105. // a pointer to the IDropTarget interface if the
  106. // object calls DAD_DragLeave/DAD_SetDragImage
  107. // in its IDropTarget::Drop().
  108. //
  109. #define IDropTargetWithDADSupport IDropTarget
  110. // this is only inherited by CFSFolder_IconOverlayManager, it enumerates through all IconOverlayID's and
  111. // keep their information in an array.
  112. //===========================================================================
  113. //
  114. // IBrowserBand
  115. //
  116. // IBrowserBand::GetObjectBB(REFIID riid, void **ppv)
  117. // Obtain a service from the web browser.
  118. //
  119. // IBrowserBand::SetBrowserBandInfo(DWORD dwMask, PBROWSERBANDINFO pbbi)
  120. // Set browser band properties based on members of browserbandinfo struct
  121. // specified by dwMask. These properties include title, deskband mode, and
  122. // current size.
  123. //
  124. //===========================================================================
  125. typedef struct {
  126. UINT cbSize;
  127. DWORD dwModeFlags;
  128. BSTR bstrTitle;
  129. SIZE sizeMin;
  130. SIZE sizeMax;
  131. SIZE sizeCur;
  132. } BROWSERBANDINFO, *PBROWSERBANDINFO;
  133. #define BBIM_MODEFLAGS 0x00000001
  134. #define BBIM_TITLE 0x00000002
  135. #define BBIM_SIZEMIN 0x00000004
  136. #define BBIM_SIZEMAX 0x00000008
  137. #define BBIM_SIZECUR 0x00000010
  138. #undef INTERFACE
  139. #define INTERFACE IBrowserBand
  140. DECLARE_INTERFACE_(IBrowserBand, IUnknown)
  141. {
  142. // *** IUnknown methods ***
  143. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  144. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  145. STDMETHOD_(ULONG,Release)(THIS) PURE;
  146. // *** IBrowserBand methods ***
  147. STDMETHOD(GetObjectBB)(THIS_ REFIID riid, void **ppv) PURE;
  148. STDMETHOD(SetBrowserBandInfo)(THIS_ DWORD dwMask, PBROWSERBANDINFO pbbi) PURE;
  149. STDMETHOD(GetBrowserBandInfo)(THIS_ DWORD dwMask, PBROWSERBANDINFO pbbi) PURE;
  150. };
  151. // NT4 Console Server included shell32\shlink.h to get structure
  152. // definitions and mimicked shell32\shlink.c to understand the
  153. // stream format so our stream format is fixed forever. This is
  154. // not bad since it was designed with extension in mind. We need
  155. // to publish (as privately as possible) the file format and
  156. // structures needed to read the file format.
  157. //
  158. // The stream format is a SHELL_LINK_DATA followed by
  159. // if SLDF_HAS_ID_LIST an ILSaveToStream followed by
  160. // if SLDF_HAS_LINK_INFO a LINKINFO followed by
  161. // if SLDF_HAS_NAME a STREAMSTRING followed by
  162. // if SLDF_RELPATH a STREAMSTRING followed by
  163. // if SLDF_WORKINGDIR a STREAMSTRING followed by
  164. // if SLDF_HAS_ARGS a STREAMSTRING followed by
  165. // if SLDF_HAS_ICON_LOCATION a STREAMSTRING followed by
  166. // SHWriteDataBlockList list of signature blocks
  167. //
  168. // Where a STREAMSTRING is a USHORT count of characters
  169. // followed by that many (SLDF_UNICODE ? WIDE : ANSI) characters.
  170. //
  171. typedef struct { // sld
  172. DWORD cbSize; // signature for this data structure
  173. CLSID clsid; // our GUID
  174. DWORD dwFlags; // SHELL_LINK_DATA_FLAGS enumeration
  175. DWORD dwFileAttributes;
  176. FILETIME ftCreationTime;
  177. FILETIME ftLastAccessTime;
  178. FILETIME ftLastWriteTime;
  179. DWORD nFileSizeLow;
  180. int iIcon;
  181. int iShowCmd;
  182. WORD wHotkey;
  183. WORD wUnused;
  184. DWORD dwRes1;
  185. DWORD dwRes2;
  186. } SHELL_LINK_DATA, *LPSHELL_LINK_DATA;
  187. typedef struct
  188. {
  189. DWORD cbSize; // Size of this extra data block
  190. DWORD dwSignature; // signature of this extra data block
  191. } EXP_HEADER, *LPEXP_HEADER;
  192. typedef struct
  193. {
  194. DWORD cbSize; // Size of this extra data block
  195. DWORD dwSignature; // signature of this extra data block
  196. BYTE abTracker[ 1 ]; //
  197. } EXP_TRACKER, *LPEXP_TRACKER;
  198. #define EXP_TRACKER_SIG 0xA0000003 // LPEXP_TRACKER
  199. typedef struct
  200. {
  201. DWORD cbSize; // Size of this extra data block
  202. DWORD dwSignature; // signature of this extra data block
  203. WCHAR wszLayerEnvName[64]; // name of shim layer to run with this link (eg "NT4SP5")
  204. } EXP_SHIMLAYER;
  205. #define EXP_SHIMLAYER_SIG 0xA0000008
  206. // NT40 Console Control Panel Applet does a CoCreateInstance(CLSID_CShellLink),
  207. // used the CShellLink definition to get the 'this' pointer, and passed that
  208. // along to some private exports in shell32. This completely prevents us
  209. // from moving the CShellLink implementation to another DLL. (If we do, or an
  210. // ISV takes our stream format and implements a better link by pointing the
  211. // classid to their implementation, the NT40 Console CPA will fault.)
  212. //
  213. // To fix this problem in future revs, CShellLink will support IShellLinkDataList
  214. // AddDataBlock adds the data block
  215. // FindDataBloc returns a LocalAlloc()d COPY of a data block with the
  216. // signature dwSig (NOTE: this is different than SHFindDataBlock)
  217. // RemoveDataBlock removes a data block with signature dwSig
  218. // Plan is for NT50's Console CPA to use this interface instead.
  219. //
  220. //
  221. // IURLSearchHook Interface is called whenever the browser navigates to a
  222. // non-standard URL. It can be used to redirect the user's request to a
  223. // search engine or a specific web site.
  224. //
  225. // A non-standard URL does not have a protocol prefix (e.g.,
  226. // "www.microsoft.com") and the protocol cannot be easily guessed by
  227. // the browser (e.g., "home.microsoft.com").
  228. //
  229. // The parameters of Translate(..)
  230. // lpwszSearchURL -- (IN/OUT) Wide char buffer that contains the request
  231. // "URL" user typed in as input and the tranlated URL
  232. // as output.
  233. // cchBufferSize -- (IN) size of lpwszSearchURL
  234. //
  235. // Return Values:
  236. // S_OK Search handled completely, pszResult has the full URL to
  237. // browse to. Stop running any further IURLSearchHooks and
  238. // pass this URL back to the browser for browsing.
  239. //
  240. // S_FALSE Query has been preprocessed, pszResult has the result of
  241. // the preprocess, further search still needed. Go on
  242. // executing the rest of the IURLSearchHooks. The
  243. // preprocessing steps can be:
  244. //
  245. // 1. replaced certain characters
  246. // 2. added more hints
  247. //
  248. // E_ABORT Search handled completely, stop running any further
  249. // IURLSearchHooks, but NO BROWSING NEEDED as a result,
  250. // pszResult is a copy of pcszQuery.
  251. //
  252. // ;BUGBUG: This is not fully implemented, yet, making IURLQualify return this
  253. // involves too much change.
  254. //
  255. // BUGBUG:: E_ABORT is currently treated as E_FAIL. It requires too much change.
  256. //
  257. // E_FAIL This Hook was unsuccessful. Search not handled at all,
  258. // pcszQueryURL has the query string. Please go on running
  259. // other IURLSearchHooks.
  260. //
  261. // BUGBUG: There is a potential danger in this Interface, that is people can write
  262. // very bad SearchHooks, but we (Microsoft) take the blame.
  263. // History:
  264. // --/--/94 KurtE Created
  265. //
  266. // History:
  267. // 3/4/94 kraigb Created
  268. //
  269. // CGID_DefView Command Target IDs. used to persist global DefView state
  270. enum
  271. {
  272. DVID_SETASDEFAULT, // Set the DefView state of this folder as default for all of the same class
  273. DVID_RESETDEFAULT // Reset the DefView state to the default (delete subkeys)
  274. };
  275. // CGID_ShellDocView Command Target IDs. for shell doc view wedge
  276. enum {
  277. SHDVID_FINALTITLEAVAIL, // DEAD: variantIn bstr - sent after final OLECMDID_SETTITLE is sent
  278. SHDVID_MIMECSETMENUOPEN, // mimecharset menu open commands
  279. SHDVID_PRINTFRAME, // print HTML frame
  280. SHDVID_PUTOFFLINE, // DEAD: The Offline property has been changed
  281. SHDVID_PUTSILENT, // DEAD: The frame's Silent property has been changed
  282. SHDVID_GOBACK, // Navigate Back
  283. SHDVID_GOFORWARD, // Navigate Forward
  284. SHDVID_CANGOBACK, // Is Back Navigation Possible?
  285. SHDVID_CANGOFORWARD, // Is Forward Navigation Possible?
  286. SHDVID_CANACTIVATENOW, // (down) (PICS) OK to navigate to this view now?
  287. SHDVID_ACTIVATEMENOW, // (up) (PICS) Rating checks out, navigate now
  288. SHDVID_CANSUPPORTPICS, // (down) variantIn I4: IOleCommandTarget to reply to
  289. SHDVID_PICSLABELFOUND, // (up) variantIn bstr: PICS label
  290. SHDVID_NOMOREPICSLABELS, // (up) End of document, no more PICS labels coming
  291. SHDVID_CANDEACTIVATENOW, // (QS down) (in script/etc) OK to deactivate view now?
  292. SHDVID_DEACTIVATEMENOW, // (EXEC up) (in script/etc) out of script, deactivate view now
  293. SHDVID_NODEACTIVATENOW, // (EXEC up) (in script/etc) entering script, disable deactivate
  294. SHDVID_AMBIENTPROPCHANGE, // variantIn I4: dispid of ambient property that changed
  295. SHDVID_GETSYSIMAGEINDEX, // variantOut: image index for current page
  296. SHDVID_GETPENDINGOBJECT, // variantOut: IUnknown of pending shellview/docobject
  297. SHDVID_GETPENDINGURL, // variantOut: BSTR of URL for pending docobject
  298. SHDVID_SETPENDINGURL, // variantIn: BSTR of URL passed to pending docobject
  299. SHDVID_ISDRAGSOURCE, // (down) varioutOut I4: non-zero if it's initiated drag&drop
  300. SHDVID_DOCFAMILYCHARSET, // variantOut: I4: windows (family) codepage
  301. SHDVID_DOCCHARSET, // variantOut: I4: actual (mlang) codepage
  302. SHDVID_RAISE, // vaIn:I4:DTRF_*, vaOut:NULL unless DTRF_QUERY
  303. SHDVID_GETTRANSITION, // (down) vaIn: I4: TransitionEvent; vaOut BSTR (CLSID), I4 (dwSpeed)
  304. SHDVID_GETMIMECSETMENU, // get menu handle for mimecharset
  305. SHDVID_DOCWRITEABORT, // Abort binding but activate pending docobject
  306. SHDVID_SETPRINTSTATUS, // VariantIn: BOOL, TRUE - Started printing, FALSE - Finished printing
  307. SHDVID_NAVIGATIONSTATUS, // QS for tooltip text and Exec when user clicks
  308. SHDVID_PROGRESSSTATUS, // QS for tooltip text and Exec when user clicks
  309. SHDVID_ONLINESTATUS, // QS for tooltip text and Exec when user clicks
  310. SHDVID_SSLSTATUS, // QS for tooltip text and Exec when user clicks
  311. SHDVID_PRINTSTATUS, // QS for tooltip text and Exec when user clicks
  312. SHDVID_ZONESTATUS, // QS for tooltip text and Exec when user clicks
  313. SHDVID_ONCODEPAGECHANGE, // variantIn I4: new specified codepage
  314. SHDVID_SETSECURELOCK, // set the secure icon
  315. SHDVID_SHOWBROWSERBAR, // show browser bar of clsid guid
  316. SHDVID_NAVIGATEBB, // navigate to pidl in browserbar.
  317. SHDVID_UPDATEOFFLINEDESKTOP,// put the desktop in ON-LINE mode, update and put it back in Offline mode
  318. SHDVID_PICSBLOCKINGUI, // (up) In I4: pointer to "ratings nugget" for block API
  319. SHDVID_ONCOLORSCHANGE, // (up) sent by mshtml to indicate color set change
  320. SHDVID_CANDOCOLORSCHANGE, // (down) used to query if document supports the above
  321. SHDVID_QUERYMERGEDHELPMENU, // was the help menu micro-merged?
  322. SHDVID_QUERYOBJECTSHELPMENU,// return the object's help menu
  323. SHDVID_HELP, // do help
  324. SHDVID_UEMLOG, // set UEM logging vaIn:I4:UEMIND_*, vaOut:NULL
  325. SHDVID_GETBROWSERBAR, // get IDeskBand for browser bar of clsid guid
  326. SHDVID_GETFONTMENU,
  327. SHDVID_FONTMENUOPEN,
  328. SHDVID_CLSIDTOIDM, // get the idm for the given clsid
  329. SHDVID_GETDOCDIRMENU, // get menu handle for document direction
  330. SHDVID_ADDMENUEXTENSIONS, // Context Menu Extensions
  331. SHDVID_CLSIDTOMONIKER, // CLSID to property page resource mapping
  332. SHDVID_RESETSTATUSBAR, // set the status bar back to "normal" icon w/out text
  333. SHDVID_ISBROWSERBARVISIBLE, // is browser bar of clsid guid visible?
  334. SHDVID_GETOPTIONSHWND, // gets hwnd for internet options prop sheet (NULL if not open)
  335. SHDVID_DELEGATEWINDOWOM, // set policy for whether window OM methods should be delegated.
  336. SHDVID_PAGEFROMPOSTDATA, // determines if page was generated by post data
  337. SHDVID_DISPLAYSCRIPTERRORS, // tells the top docobject host to display his script err dialog
  338. SHDVID_NAVIGATEBBTOURL, // Navigate to an URL in browserbar (used in Trident).
  339. SHDVID_NAVIGATEFROMDOC, // The document delegated the navigation for a non-html mime-type.
  340. SHDVID_STARTPICSFORWINDOW, // (up) variantIn: IUnknown of window that is navigating
  341. // variantOut: bool if pics process started
  342. SHDVID_CANCELPICSFORWINDOW, // (up) variantIn: IUnknown of window that is no longer navigating
  343. SHDVID_ISPICSENABLED, // (up) variantOut: bool
  344. SHDVID_PICSLABELFOUNDINHTTPHEADER,// (up) variantIn bstr: PICS label
  345. SHDVID_CHECKINCACHEIFOFFLINE, // Check in cache if offline
  346. SHDVID_CHECKDONTUPDATETLOG, // check if the current navigate is already dealing with the travellog correctly
  347. SHDVID_UPDATEDOCHOSTSTATE, // Sent from CBaseBrowser2::_UpdateBrowserState to tell the dochost to update its state.
  348. SHDVID_FIREFILEDOWNLOAD,
  349. SHDVID_COMPLETEDOCHOSTPASSING,
  350. SHDVID_NAVSTART,
  351. SHDVID_SETNAVIGATABLECODEPAGE,
  352. SHDVID_WINDOWOPEN,
  353. SHDVID_PRIVACYSTATUS, // QS for tooltip text and exec when user clicks
  354. SHDVID_FORWARDSECURELOCK, // asks CDocObjectHost to forward its security status up to the shell browser
  355. SHDVID_ISEXPLORERBARVISIBLE, // is any explorer bar visible?
  356. };
  357. // CGID_DocHostCmdPriv Command Target IDs
  358. //
  359. enum
  360. {
  361. DOCHOST_DOCCANNAVIGATE, // The document knows how to navigate.
  362. DOCHOST_NAVIGATION_ERROR, // Navigation Error
  363. DOCHOST_DOCHYPERLINK, // The document is navigating.
  364. DOCHOST_SENDINGREQUEST, // The document is sending a request for download. Update the progress bar.
  365. DOCHOST_FINDINGRESOURCE, // The document is finding a resource. Update the progress bar.
  366. DOCHOST_RESETSEARCHINFO, // Reset search information (after a successful navigation)
  367. DOCHOST_SETBROWSERINDEX, // Sets the browser ID to use for TravelLog and frame targeting
  368. DOCHOST_NOTE_ERROR_PAGE, // Need to know when we're navigating to an error web page.
  369. DOCHOST_READYSTATE_INTERACTIVE, // a document on a page is readystate interactive
  370. DOCHOST_CONTENTDISPOSITIONATTACH // The document needs to be saved.
  371. };
  372. // CGID_SearchBand Command Target IDs.
  373. enum {
  374. SBID_SEARCH_NEW, // (re)load the context-appropriate url
  375. SBID_SEARCH_NEXT, // cycle between multiple providers
  376. SBID_SEARCH_CUSTOMIZE, // navigate to customization url
  377. SBID_SEARCH_HELP, // what it says
  378. SBID_GETPIDL, // get the search pane's pidl
  379. SBID_HASPIDL, // does the search pane have a pidl (i.e, has it navigated)
  380. };
  381. // CGID_MediaBar target ids
  382. enum {
  383. MBID_PLAY, // Play an url
  384. MBID_POPOUT // Detect state of player
  385. };
  386. enum {
  387. MB_DOCKED,
  388. MB_POPOUT
  389. };
  390. //
  391. // Private struct passed as argument to SHDVID_UPDATEDOCHOSTSTATE
  392. //
  393. struct DOCHOSTUPDATEDATA
  394. {
  395. LPITEMIDLIST _pidl;
  396. BOOL _fIsErrorUrl;
  397. };
  398. //
  399. // this enum is used by SHDVID_SETSECURELOCK and SBCMDID_SETSECURELOCKICON
  400. // when adding new values, make sure to add to both SET and SUGGEST, and
  401. // the code depends on a direct correlation between the level of security
  402. // and the value of the enum. so keep new values in the correct order
  403. //
  404. enum {
  405. SECURELOCK_NOCHANGE = -1,
  406. SECURELOCK_SET_UNSECURE = 0,
  407. SECURELOCK_SET_MIXED,
  408. SECURELOCK_SET_SECUREUNKNOWNBIT,
  409. SECURELOCK_SET_SECURE40BIT,
  410. SECURELOCK_SET_SECURE56BIT,
  411. SECURELOCK_SET_FORTEZZA,
  412. SECURELOCK_SET_SECURE128BIT,
  413. SECURELOCK_FIRSTSUGGEST,
  414. SECURELOCK_SUGGEST_UNSECURE = SECURELOCK_FIRSTSUGGEST,
  415. SECURELOCK_SUGGEST_MIXED,
  416. SECURELOCK_SUGGEST_SECUREUNKNOWNBIT,
  417. SECURELOCK_SUGGEST_SECURE40BIT,
  418. SECURELOCK_SUGGEST_SECURE56BIT,
  419. SECURELOCK_SUGGEST_FORTEZZA,
  420. SECURELOCK_SUGGEST_SECURE128BIT,
  421. };
  422. #define FCIDM_DRIVELIST (FCIDM_BROWSERFIRST + 2) //
  423. #define FCIDM_TREE (FCIDM_BROWSERFIRST + 3) //
  424. #define FCIDM_TABS (FCIDM_BROWSERFIRST + 4) //
  425. #define FCIDM_REBAR (FCIDM_BROWSERFIRST + 5) //
  426. // SBCMDID_SHOWCONTROL
  427. enum {
  428. SBSC_HIDE = 0,
  429. SBSC_SHOW = 1,
  430. SBSC_TOGGLE = 2,
  431. SBSC_QUERY = 3
  432. };
  433. // SBCMDID_OPTIONS
  434. enum {
  435. SBO_DEFAULT = 0 ,
  436. SBO_NOBROWSERPAGES = 1
  437. };
  438. // CGID_Explorer Command Target IDs
  439. enum {
  440. SBCMDID_ENABLESHOWTREE = 0,
  441. SBCMDID_SHOWCONTROL = 1, // variant vt_i4 = loword = FCW_* hiword = SBSC_*
  442. SBCMDID_CANCELNAVIGATION = 2, // cancel last navigation
  443. SBCMDID_MAYSAVECHANGES = 3, // about to close and may save changes
  444. SBCMDID_SETHLINKFRAME = 4, // variant vt_i4 = phlinkframe
  445. SBCMDID_ENABLESTOP = 5, // variant vt_bool = fEnable
  446. SBCMDID_OPTIONS = 6, // the view.options page
  447. SBCMDID_EXPLORER = 7, // are you explorer.exe?
  448. SBCMDID_ADDTOFAVORITES = 8,
  449. SBCMDID_ACTIVEOBJECTMENUS = 9,
  450. SBCMDID_MAYSAVEVIEWSTATE = 10, // Should we save view stream
  451. SBCMDID_DOFAVORITESMENU = 11, // popup the favorites menu
  452. SBCMDID_DOMAILMENU = 12, // popup the mail menu
  453. SBCMDID_GETADDRESSBARTEXT = 13, // get user-typed text
  454. SBCMDID_ASYNCNAVIGATION = 14, // do an async navigation
  455. SBCMDID_SEARCHBAROBSOLETE = 15, // OBSOLETE beta-1 SEARCHBAR
  456. SBCMDID_FLUSHOBJECTCACHE = 16, // flush object cache
  457. SBCMDID_CREATESHORTCUT = 17, // create a shortcut
  458. SBCMDID_SETMERGEDWEBMENU = 18, // set pre-merged menu for HTML
  459. SBCMDID_REMOVELOCKICON = 19, // Remove lock icon
  460. SBCMDID_SELECTHISTPIDL = 20, // QS:EXEC select history pidl on navigate
  461. SBCMDID_WRITEHIST = 21, // QS only:write history sf on navigate
  462. SBCMDID_GETHISTPIDL = 22, // EXEC gets most recent history pidl
  463. SBCMDID_REGISTERNSCBAND = 23, // EXEC registers NscBand when visible
  464. SBCMDID_COCREATEDOCUMENT = 24, // Create an instance of MSHTML
  465. SBCMDID_SETSECURELOCKICON = 25, // sets the SSL lock icon for the current page
  466. SBCMDID_INITFILECTXMENU = 26, // EXEC,QS: file context menu for band item
  467. SBCMDID_UNREGISTERNSCBAND = 27, // EXEC unregisters NscBand when invisible
  468. SBCMDID_SEARCHBAR = 28, // show/hide/toggle BrowserBar search
  469. SBCMDID_HISTORYBAR = 29, // show/hide/toggle BrowserBar history
  470. SBCMDID_FAVORITESBAR = 30, // show/hide/toggle BrowserBar favorites
  471. #ifdef ENABLE_CHANNELS
  472. SBCMDID_CHANNELSBAR = 31, // show/hide/toggle BrowserBar channels
  473. #endif
  474. SBCMDID_SENDPAGE = 32, // sends the current page via email
  475. SBCMDID_SENDSHORTCUT = 33, // sends a shortcut to current page via email
  476. SBCMDID_TOOLBAREMPTY = 34, // toolbar has nothing visible
  477. SBCMDID_EXPLORERBAR = 35, // show/hide/toggle BrowserBar all folders
  478. SBCMDID_GETUSERADDRESSBARTEXT = 36, // get the exact text the user-entered
  479. SBCMDID_HISTSFOLDER = 37, // EXEC varOut returns cached history IShellFolder
  480. SBCMDID_UPDATETRAVELLOG = 38, // updates the travellog with the current info
  481. SBCMDID_MIXEDZONE = 39, // The current view has mixed zones
  482. SBCMDID_REPLACELOCATION = 40, // replace the current URL with this one.
  483. SBCMDID_GETPANE = 41, // Browser asks the view for pane ordinal
  484. SBCMDID_FILERENAME = 42, // Browser forwards file->rename to explorer bar
  485. SBCMDID_FILEDELETE = 43, // Browser forwards file->delete to explorer bar
  486. SBCMDID_FILEPROPERTIES = 44, // Browser forwards file->properties to explorer bar
  487. SBCMDID_IESHORTCUT = 45, // Navigates the browser to an .url file
  488. SBCMDID_GETSHORTCUTPATH = 46, // Asks for the path to the shortcut - if it exists
  489. SBCMDID_DISCUSSIONBAND = 47, // show/hide/toggle the Office discussion band
  490. SBCMDID_SETADDRESSBARFOCUS = 48, // Set focus on address bar on WM_ACTIVATE (UNIX)
  491. SBCMDID_HASADDRESSBARFOCUS = 49, // Checks whether address bar has focus (UNIX)
  492. SBCMDID_MSGBAND = 50, // MsgBand Message (UNIX)
  493. SBCMDID_ISIEMODEBROWSER = 51, // returns S_OK if browser is in IE mode
  494. SBCMDID_GETTEMPLATEMENU = 52, // get handle to template menu
  495. SBCMDID_GETCURRENTMENU = 53, // get handle to current menu
  496. SBCMDID_ERRORPAGE = 54, // informs addressbar mru that this is an error page
  497. SBCMDID_AUTOSEARCHING = 55, // informs addressbar mru that we are trying a new url
  498. SBCMDID_STARTEDFORINTERNET = 56, // return S_OK if window started as IE window, S_FALSE otherwise
  499. SBCMDID_ISBROWSERACTIVE = 57, // return S_OK if the browser is active, S_FALSE otherwise
  500. SBCMDID_SUGGESTSAVEWINPOS = 58, // return S_OK if browser decides to save window position, S_FALSE otherwise
  501. SBCMDID_CACHEINETZONEICON = 59, // Cache/refresh internet zone icons painted by status bar
  502. SBCMDID_ONVIEWMOVETOTOP = 60, // Notification that the view window has moved to HWND_TOP
  503. SBCMDID_ONCLOSE = 61, // Close notification destined for the dochost.
  504. SBCMDID_CANCELANDCLOSE = 62, // Cancel the async download and close the browser.
  505. SBCMDID_MEDIABAR = 63, // show/hide/toggle MediaBar
  506. };
  507. #define ZONE_UNKNOWN -1
  508. #define ZONE_MIXED -2
  509. #define IS_SPECIAL_ZONE(a) (((a) == ZONE_UNKNOWN) || ((a) == ZONE_MIXED))
  510. #if (_WIN32_IE >= 0x0400)
  511. // CGID_AddresseditBox Command Target IDs
  512. enum {
  513. AECMDID_SAVE = 0, // Ask AddressEditBox to save
  514. };
  515. #endif
  516. #ifdef NONAMELESSUNION
  517. #define NAMELESS_MEMBER(member) DUMMYUNIONNAME.##member
  518. #else
  519. #define NAMELESS_MEMBER(member) member
  520. #endif
  521. #define STRRET_OLESTR STRRET_WSTR // same as STRRET_WSTR
  522. #define STRRET_OFFPTR(pidl,lpstrret) ((LPSTR)((LPBYTE)(pidl)+(lpstrret)->NAMELESS_MEMBER(uOffset)))
  523. // DOC'ed for DOJ compliance
  524. SHSTDAPI SHParseShellItem(LPCWSTR psz, IShellItem **ppsi);
  525. SHSTDAPI SIEnumObjects(IShellItem *psi, HWND hwnd, SHCONTF flags, IEnumShellItems **ppenum);
  526. SHSTDAPI SHCreateShellItemArray(LPCITEMIDLIST pidlParent,IShellFolder *psfParent,UINT cidl,
  527. LPCITEMIDLIST *ppidl,IShellItemArray **ppsiItemArray);
  528. #define REGSTR_PATH_INTERNET_EXPLORER TEXT("\\SOFTWARE\\Microsoft\\Internet Explorer")
  529. #define REGSTR_PATH_IE_MAIN REGSTR_PATH_INTERNET_EXPLORER TEXT("\\Main")
  530. #define REGSTR_VALUE_USER_AGENT TEXT("UserAgent")
  531. #define REGSTR_DEFAULT_USER_AGENT TEXT("Mozilla/2.0 (compatible; MSIE 3.0A; Windows 95)")
  532. // 0x000f
  533. #define CSIDL_PERUSER_TEMP 0x0032 // per user TEMP (reserved, not impelemented)
  534. #define CSIDL_9XCOMMAND 0x0033 // Win9x COMMANDN (dos programs) (reserved, not impelemented)
  535. #define CSIDL_9XSYSTEM 0x0034 // Win9x/NT system (not system32) (reserved, not impelemented)
  536. #define CSIDL_FLAG_DONT_UNEXPAND 0x2000 // combine with CSIDL_ value to avoid unexpanding environment variables
  537. // DOC'ed for DOJ compliance
  538. SHFOLDERAPI SHSetFolderPathA(int csidl, HANDLE hToken, DWORD dwFlags, LPCSTR pszPath);
  539. // 0x000f
  540. #define CSIDL_PERUSER_TEMP 0x0032 // per user TEMP (reserved, not impelemented)
  541. #define CSIDL_9XCOMMAND 0x0033 // Win9x COMMANDN (dos programs) (reserved, not impelemented)
  542. #define CSIDL_9XSYSTEM 0x0034 // Win9x/NT system (not system32) (reserved, not impelemented)
  543. #define CSIDL_FLAG_DONT_UNEXPAND 0x2000 // combine with CSIDL_ value to avoid unexpanding environment variables
  544. // DOC'ed for DOJ compliance
  545. SHFOLDERAPI SHSetFolderPathW(int csidl, HANDLE hToken, DWORD dwFlags, LPCWSTR pszPath);
  546. #ifdef UNICODE
  547. #define SHSetFolderPath SHSetFolderPathW
  548. #else
  549. #define SHSetFolderPath SHSetFolderPathA
  550. #endif // !UNICODE
  551. SHSTDAPI_(BOOL) MakeShellURLFromPathA(LPCSTR pszPathIn, LPSTR pszUrl, DWORD dwCch);
  552. SHSTDAPI_(BOOL) MakeShellURLFromPathW(LPCWSTR pszPathIn, LPWSTR pszUrl, DWORD dwCch);
  553. #ifdef UNICODE
  554. #define MakeShellURLFromPath MakeShellURLFromPathW
  555. #else
  556. #define MakeShellURLFromPath MakeShellURLFromPathA
  557. #endif // !UNICODE
  558. SHSTDAPI_(BOOL) SHIsTempDisplayMode();
  559. SHSTDAPI_(FILEDESCRIPTOR *) GetFileDescriptor(FILEGROUPDESCRIPTOR *pfgd, BOOL fUnicode, int nIndex, LPTSTR pszName);
  560. SHSTDAPI CopyStreamUI(IStream *pstmSrc, IStream *pstmDest, IProgressDialog *pdlg, ULONGLONG ullMaxBytes);
  561. // DOC'ed for DOJ compliance
  562. // above was doc'ed for DOJ compliance
  563. // pszTitle can be a resource, but the hinst is assumed to be shell32.dll
  564. // lpszTitle can be a resource, but the hinst is assumed to be shell32.dll
  565. //-------------------------------------------------------------------------
  566. //
  567. // Shell Service Object
  568. //
  569. //-------------------------------------------------------------------------
  570. // Cmds for CGID_ShellServiceObject
  571. enum {
  572. SSOCMDID_OPEN = 2,
  573. SSOCMDID_CLOSE = 3,
  574. };
  575. #define CMDID_SAVEASTHICKET 5
  576. //-------------------------------------------------------------------------
  577. // STR_DISPLAY_UI_DURING_BINDING - IBindCtx Key
  578. //-------------------------------------------------------------------------
  579. // If displaying UI during binding is allowed, this parameter
  580. // will be in the IBindCtx so the object binding can get the
  581. // IUnknown* of the site in order to:
  582. // 1. Use the site's hwnd as the parent hwnd of any UI dialogs.
  583. // This is done via. IOleWindow::GetWindow() or IInternetSecurityMgrSite::GetWindow()
  584. // 2. While the dialog is being displayed, make the site modal
  585. // This is done via:
  586. // IOleInPlaceActiveObject::EnableModeless()
  587. // IOleInPlaceUIWindow::EnableModelessSB()
  588. // IInternetSecurityMgrSite::EnableModeless()
  589. #define STR_DISPLAY_UI_DURING_BINDING L"UI During Binding"
  590. // bindctx key, tells an FS folder to ignore the STGM_CREATE flag in ParseDisplayName.
  591. // otherwise it will always succeed, but we need to be able to force it to fail for
  592. // the cd-r drive.
  593. #define STR_DONT_FORCE_CREATE L"Don't Force Create"
  594. // bindctx key, passed to IShellFolder::ParseDisplayName(). gives netfldr extra
  595. // information it can use to route the parsing of the name we are giving it.
  596. #define STR_PARSE_NETFOLDER_INFO L"Net Parse Data"
  597. // in the property bag associated with STR_PARSE_NETFOLDER_INFO this string property
  598. // defines the WNetProvider to be used when calling WNetGetResourceInformation.
  599. #define STR_PARSE_NETFOLDER_PROVIDERNAME L"WNetProvider"
  600. //
  601. // The IShellDetails interface was private in win95 and didnt have a _WIN32_IE guard,
  602. // so it is now in shlobj.h, along with the definition of SHELLDETAILS
  603. //
  604. //-------------------------------------------------------------------------
  605. //
  606. // DELEGATEITEMID structure
  607. //
  608. //
  609. // A Delegate Item ID is a standard SHITEMID with some additional
  610. // fields defined.
  611. //
  612. //-------------------------------------------------------------------------
  613. typedef struct tagDELEGATEITEMID {
  614. WORD cbSize; // Size of entire item ID
  615. WORD wOuter; // Private data owned by the outer folder
  616. WORD cbInner; // Size of delegate's data
  617. BYTE rgb[1]; // Inner folder's data,
  618. // followed by outer folder's data.
  619. } DELEGATEITEMID;
  620. typedef const UNALIGNED DELEGATEITEMID *PCDELEGATEITEMID;
  621. typedef UNALIGNED DELEGATEITEMID *PDELEGATEITEMID;
  622. //-------------------------------------------------------------------------
  623. //
  624. // IDelegateFolder interface
  625. //
  626. //
  627. // [Member functions]
  628. //
  629. // IDelegateFolder::SetItemAlloc(pm)
  630. // This function gives the object an IMalloc interface that it
  631. // should use to alloc and free item IDs. These IDs are in the
  632. // form of DELEGATEITEMIDs.
  633. //
  634. //-------------------------------------------------------------------------
  635. #undef INTERFACE
  636. #define INTERFACE IDelegateFolder
  637. DECLARE_INTERFACE_(IDelegateFolder, IUnknown)
  638. {
  639. // *** IUnknown methods ***
  640. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  641. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  642. STDMETHOD_(ULONG,Release) (THIS) PURE;
  643. // *** IDelegateFolder methods ***
  644. STDMETHOD(SetItemAlloc)(THIS_ IMalloc *pmalloc) PURE;
  645. };
  646. #undef INTERFACE
  647. #define INTERFACE IMountedVolume
  648. DECLARE_INTERFACE_(IMountedVolume, IUnknown)
  649. {
  650. // *** IUnknown methods ***
  651. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  652. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  653. STDMETHOD_(ULONG,Release) (THIS) PURE;
  654. // *** IMountedVolume methods ***
  655. STDMETHOD(Initialize)(THIS_ LPCWSTR pcszHostFolderPath) PURE;
  656. };
  657. //-------------------------------------------------------------------------
  658. // This is the interface for a browser to "subclass" the main File Cabinet
  659. // window. Note that only the hwnd, message, wParam, and lParam fields of
  660. // the msg structure are used. The browser window will get a WM_NOTIFY
  661. // message with NULL ID, FCN_MESSAGE as the code, and a pointer to
  662. // FCMSG_NOTIFY as the lParam.
  663. //
  664. //-------------------------------------------------------------------------
  665. #include <pshpack8.h>
  666. typedef struct tagFCMSG_NOTIFY
  667. {
  668. NMHDR hdr;
  669. MSG msg;
  670. LRESULT lResult;
  671. } FCMSG_NOTIFY;
  672. #include <poppack.h> /* Return to byte packing */
  673. #define FCN_MESSAGE (100)
  674. //---------------------------------------------------------------------------
  675. // messages that can be send to the cabinet by other apps
  676. //
  677. // REVIEW: Do we really need to publish any of those?
  678. //---------------------------------------------------------------------------
  679. #define NF_INHERITVIEW 0x0000
  680. #define NF_LOCALVIEW 0x0001
  681. // Change the path of an existing folder.
  682. // wParam:
  683. // 0: LPARAM is a pidl, handle the message immediately.
  684. // CSP_REPOST: LPARAM is a pidl, copy the pidl and handle the
  685. // message later.
  686. // CSP_NOEXECUTE: if this path is not a folder, fail, don't shell exec
  687. //
  688. //
  689. // lParam: LPITEMIDLIST of path.
  690. //
  691. //
  692. #define CSP_REPOST 0x0001
  693. #define CSP_INITIATEDBYHLINKFRAME 0x0002
  694. #define CSP_NOEXECUTE 0x0004
  695. #define CSP_NONAVIGATE 0x0008
  696. #define CWM_SETPATH (WM_USER + 2)
  697. // lpsv points to the Shell View extension that requested idle processing
  698. // uID is an app define identifier for the processor
  699. // returns: TRUE if there is more idle processing necessary, FALSE if all done
  700. // Note that the idle processor should do one "atomic" operation and return
  701. // as soon as possible.
  702. typedef BOOL (CALLBACK *FCIDLEPROC)(void *lpsv, UINT uID);
  703. // Inform the File Cabinet that you want idle messages.
  704. // This should ONLY be used by File Cabinet extensions.
  705. // wParam: app define UINT (passed to FCIDLEPROC).
  706. // lParam: pointer to an FCIDLEPROC.
  707. // return: TRUE if successful; FALSE otherwise
  708. //
  709. #define CWM_WANTIDLE (WM_USER + 3)
  710. // get or set the FOLDERSETTINGS for a view
  711. // wParam: BOOL TRUE -> set to view info buffer, FALSE -> get view info buffer
  712. // lParam: LPFOLDERSETTINGS buffer to get or set view info
  713. //
  714. #define CWM_GETSETCURRENTINFO (WM_USER + 4)
  715. #define FileCabinet_GetSetCurrentInfo(_hwnd, _bSet, _lpfs) \
  716. SendMessage(_hwnd, CWM_GETSETCURRENTINFO, (WPARAM)(_bSet), (LPARAM)(LPFOLDERSETTINGS)_lpfs)
  717. // selects the specified item in the current view
  718. // wParam: SVSI_* flags
  719. // lParam: LPCITEMIDLIST of the item ID, NULL -> all items
  720. //
  721. #define CWM_SELECTITEM (WM_USER + 5)
  722. #define FileCabinet_SelectItem(_hwnd, _sel, _item) \
  723. SendMessage(_hwnd, CWM_SELECTITEM, _sel, (LPARAM)(LPCITEMIDLIST)(_item))
  724. // selects the specified path in the current view
  725. // wParam: SVSI_* flags
  726. // lParam: LPCSTR of the display name
  727. //
  728. #define CWM_SELECTPATH (WM_USER + 6)
  729. #define FileCabinet_SelectPath(_hwnd, _sel, _path) \
  730. SendMessage(_hwnd, CWM_SELECTPATH, _sel, (LPARAM)(LPCSTR)(_path))
  731. // Get the IShellBrowser object associated with an hwndMain
  732. #define CWM_GETISHELLBROWSER (WM_USER + 7)
  733. #define FileCabinet_GetIShellBrowser(_hwnd) \
  734. (IShellBrowser*)SendMessage(_hwnd, CWM_GETISHELLBROWSER, 0, 0L)
  735. //
  736. // two pidls can have the same path, so we need a compare pidl message
  737. #define CWM_COMPAREPIDL (WM_USER + 9)
  738. //
  739. // sent when the global state changes
  740. #define CWM_GLOBALSTATECHANGE (WM_USER + 10)
  741. #define CWMF_GLOBALSTATE 0x0000
  742. #define CWMF_SECURITY 0x0001
  743. // sent to the desktop from a second instance
  744. #define CWM_COMMANDLINE (WM_USER + 11)
  745. // global clone your current pidl
  746. #define CWM_CLONEPIDL (WM_USER + 12)
  747. // See if the root of the instance is as specified
  748. #define CWM_COMPAREROOT (WM_USER + 13)
  749. // Tell desktop our root
  750. #define CWM_SPECIFYCOMPARE (WM_USER + 14)
  751. // See if the root of the instance matches a hwnd
  752. #define CWM_PERFORMCOMPARE (WM_USER + 15)
  753. // Forward SHChangeNotify events
  754. #define CWM_FSNOTIFY (WM_USER + 16)
  755. // Forward SHChangeRegistration events
  756. #define CWM_CHANGEREGISTRATION (WM_USER + 17)
  757. // For AddToRecentDocs processing by desktop
  758. #define CWM_ADDTORECENT (WM_USER + 18)
  759. // For SHWaitForFile processing by desktopop
  760. #define CWM_WAITOP (WM_USER + 19)
  761. // Notify for changes to the fav's folder.
  762. #define CWM_FAV_CHANGE (WM_USER + 20)
  763. #define CWM_SHOWDRAGIMAGE (WM_USER + 21)
  764. #define CWM_SHOWFOLDEROPT (WM_USER + 22)
  765. #define CWMW_FOLDEROPTIONS 0 // wParam for CWM_SHOWFOLDEROPT
  766. #define CWMW_TASKBAROPTIONS 1 // wParam for CWM_SHOWFOLDEROPT
  767. #define CWM_FSNOTIFYSUSPENDRESUME (WM_USER + 23)
  768. #define CWM_CREATELOCALSERVER (WM_USER + 24)
  769. #define CWM_GETSCNWINDOW (WM_USER + 25)
  770. #define CWM_TASKBARWAKEUP (WM_USER + 26) // Used to restore tray thread to normal priority in extremely stressed machines
  771. #define CWM_STARTNETCRAWLER (WM_USER + 27)
  772. #define CWM_RESERVEDFORCOMDLG_FIRST (WM_USER + 100)
  773. #define CWM_RESERVEDFORCOMDLG_LAST (WM_USER + 199)
  774. #define CWM_RESERVEDFORWEBBROWSER_FIRST (WM_USER + 200)
  775. #define CWM_RESERVEDFORWEBBROWSER_LAST (WM_USER + 299)
  776. // ;BUGBUG (scotth): fill this in
  777. #define STFRF_NORMAL DWFRF_NORMAL
  778. #define STFRF_DELETECONFIGDATA DWFRF_DELETECONFIGDATA
  779. #undef INTERFACE
  780. #define INTERFACE IMultiMonitorDockingSite
  781. DECLARE_INTERFACE_(IMultiMonitorDockingSite, IUnknown)
  782. {
  783. // *** IUnknown methods ***
  784. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  785. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  786. STDMETHOD_(ULONG,Release) (THIS) PURE;
  787. // *** IMultiMonitorDockingSite methods ***
  788. STDMETHOD(GetMonitor) (THIS_ IUnknown* punkSrc, HMONITOR * phMon) PURE;
  789. STDMETHOD(RequestMonitor) (THIS_ IUnknown* punkSrc, HMONITOR * phMon) PURE;
  790. STDMETHOD(SetMonitor) (THIS_ IUnknown* punkSrc, HMONITOR hMonNew, HMONITOR *phMonOld) PURE;
  791. };
  792. #if (_WIN32_IE >= 0x0400)
  793. // Interface used to scale and sharpen images...
  794. // right now, always pass the palette from SHCreateShellPalette on a 256 colour machine...
  795. #undef INTERFACE
  796. #define INTERFACE IScaleAndSharpenImage2
  797. DECLARE_INTERFACE_ (IScaleAndSharpenImage2, IUnknown )
  798. {
  799. // *** IUnknown methods ***
  800. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  801. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  802. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  803. // *** IScaleAndSharpenImage methods ***
  804. STDMETHOD( ScaleSharpen2 ) ( THIS_ BITMAPINFO * pbi,
  805. void * pBits,
  806. HBITMAP * phBmpThumbnail,
  807. const SIZE * prgSize,
  808. DWORD dwRecClrDepth,
  809. HPALETTE hpal,
  810. UINT uiSharpPct,
  811. BOOL fOrigSize) PURE;
  812. };
  813. // IImageCache
  814. // Interface for controlling and accessing an imagecache of bitmaps for icons..
  815. // flags for the dwMask member of IMAGECACHEINFO
  816. #define ICIFLAG_LARGE 0x0001
  817. #define ICIFLAG_SMALL 0x0002
  818. #define ICIFLAG_BITMAP 0x0004
  819. #define ICIFLAG_ICON 0x0008
  820. #define ICIFLAG_INDEX 0x0010
  821. #define ICIFLAG_NAME 0x0020
  822. #define ICIFLAG_FLAGS 0x0040
  823. #define ICIFLAG_NOUSAGE 0x0080
  824. #define ICIFLAG_DATESTAMP 0x0100
  825. #define ICIFLAG_MIRROR 0x2000
  826. #if (_WIN32_IE >= 0x0501)
  827. #define ICIFLAG_SYSTEM 0x4000
  828. #endif
  829. typedef struct _tagImageCacheInfo
  830. {
  831. DWORD cbSize;
  832. DWORD dwMask;
  833. union
  834. {
  835. HBITMAP hBitmapLarge;
  836. HICON hIconLarge;
  837. };
  838. HBITMAP hMaskLarge;
  839. union
  840. {
  841. HBITMAP hBitmapSmall;
  842. HICON hIconSmall;
  843. };
  844. HBITMAP hMaskSmall;
  845. LPCWSTR pszName;
  846. int iIndex;
  847. DWORD dwFlags;
  848. #if (_WIN32_IE >= 0x0500)
  849. FILETIME ftDateStamp;
  850. #endif
  851. } IMAGECACHEINFO;
  852. typedef IMAGECACHEINFO * LPIMAGECACHEINFO;
  853. typedef const IMAGECACHEINFO * LPCIMAGECACHEINFO;
  854. #define ICIIFLAG_LARGE 0x0001
  855. #define ICIIFLAG_SMALL 0x0002
  856. #if (_WIN32_IE >= 0x0501)
  857. #define ICIIFLAG_SORTBYUSED 0x0004
  858. #endif
  859. typedef struct _tagImageCacheInitInfo
  860. {
  861. DWORD cbSize;
  862. DWORD dwMask;
  863. HIMAGELIST himlLarge;
  864. HIMAGELIST himlSmall;
  865. SIZEL rgSizeLarge;
  866. SIZEL rgSizeSmall;
  867. DWORD dwFlags;
  868. int iStart;
  869. int iGrow;
  870. }IMAGECACHEINITINFO;
  871. typedef IMAGECACHEINITINFO * LPIMAGECACHEINITINFO;
  872. #undef INTERFACE
  873. #define INTERFACE IImageCache
  874. DECLARE_INTERFACE_ ( IImageCache, IUnknown )
  875. {
  876. // *** IUnknown methods ***
  877. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  878. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  879. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  880. // *** IImageCache methods ***
  881. STDMETHOD ( AddImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  882. STDMETHOD ( FindImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  883. STDMETHOD ( FreeImage ) ( THIS_ UINT iImageIndex ) PURE;
  884. STDMETHOD ( Flush )( THIS_ BOOL fRelease ) PURE;
  885. STDMETHOD ( ChangeImageInfo ) ( THIS_ UINT IImageIndex, LPCIMAGECACHEINFO pInfo ) PURE;
  886. STDMETHOD ( GetCacheSize ) ( THIS_ UINT * puSize ) PURE;
  887. STDMETHOD ( GetUsage ) ( THIS_ UINT uIndex, UINT * puUsage ) PURE;
  888. STDMETHOD( GetImageList ) ( THIS_ LPIMAGECACHEINITINFO pInfo ) PURE;
  889. };
  890. typedef IImageCache * LPIMAGECACHE;
  891. #if (_WIN32_IE >= 0x0500)
  892. // IImageCache 2
  893. #undef INTERFACE
  894. #define INTERFACE IImageCache2
  895. DECLARE_INTERFACE_ ( IImageCache2, IImageCache )
  896. {
  897. // *** IUnknown methods ***
  898. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  899. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  900. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  901. // *** IImageCache methods ***
  902. STDMETHOD ( AddImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  903. STDMETHOD ( FindImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  904. STDMETHOD ( FreeImage ) ( THIS_ UINT iImageIndex ) PURE;
  905. STDMETHOD ( Flush )( THIS_ BOOL fRelease ) PURE;
  906. STDMETHOD ( ChangeImageInfo ) ( THIS_ UINT IImageIndex, LPCIMAGECACHEINFO pInfo ) PURE;
  907. STDMETHOD ( GetCacheSize ) ( THIS_ UINT * puSize ) PURE;
  908. STDMETHOD ( GetUsage ) ( THIS_ UINT uIndex, UINT * puUsage ) PURE;
  909. STDMETHOD( GetImageList ) ( THIS_ LPIMAGECACHEINITINFO pInfo ) PURE;
  910. // IImageCache2 methods
  911. STDMETHOD ( DeleteImage ) ( THIS_ UINT iImageIndex ) PURE;
  912. STDMETHOD ( GetImageInfo ) (THIS_ UINT iImageIndex, LPIMAGECACHEINFO pInfo ) PURE;
  913. };
  914. #endif
  915. #if (_WIN32_IE >= 0x0501)
  916. // These are values returned from IImageCache::GetUsage which correspond
  917. // to the state of the cache entry
  918. #define ICD_USAGE_NOUSAGE (UINT) -1
  919. #define ICD_USAGE_DELETED (UINT) -2
  920. #define ICD_USAGE_SYSTEM (UINT) -3
  921. // IImageCache 3
  922. #undef INTERFACE
  923. #define INTERFACE IImageCache3
  924. DECLARE_INTERFACE_ ( IImageCache3, IImageCache2 )
  925. {
  926. // *** IUnknown methods ***
  927. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  928. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  929. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  930. // *** IImageCache methods ***
  931. STDMETHOD ( AddImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  932. STDMETHOD ( FindImage ) ( THIS_ LPCIMAGECACHEINFO pInfo, UINT * puIndex ) PURE;
  933. STDMETHOD ( FreeImage ) ( THIS_ UINT iImageIndex ) PURE;
  934. STDMETHOD ( Flush )( THIS_ BOOL fRelease ) PURE;
  935. STDMETHOD ( ChangeImageInfo ) ( THIS_ UINT IImageIndex, LPCIMAGECACHEINFO pInfo ) PURE;
  936. STDMETHOD ( GetCacheSize ) ( THIS_ UINT * puSize ) PURE;
  937. STDMETHOD ( GetUsage ) ( THIS_ UINT uIndex, UINT * puUsage ) PURE;
  938. STDMETHOD ( GetImageList ) ( THIS_ LPIMAGECACHEINITINFO pInfo ) PURE;
  939. // *** IImageCache2 methods ***
  940. STDMETHOD ( DeleteImage ) ( THIS_ UINT iImageIndex ) PURE;
  941. STDMETHOD ( GetImageInfo ) (THIS_ UINT iImageIndex, LPIMAGECACHEINFO pInfo ) PURE;
  942. // *** IImageCache3 methods ***
  943. STDMETHOD ( GetImageIndexFromCacheIndex )( UINT iCacheIndex, UINT * puImageIndex ) PURE;
  944. };
  945. #endif
  946. //
  947. // Interface for interacting with the IE splash screen
  948. //
  949. #undef INTERFACE
  950. #define INTERFACE ISplashScreen
  951. DECLARE_INTERFACE_( ISplashScreen, IUnknown )
  952. {
  953. // *** IUnknown methods ***
  954. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  955. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  956. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  957. // *** ISplashScreen methods ***
  958. STDMETHOD ( Show ) ( THIS_ HINSTANCE hinst, UINT idResHi, UINT idResLow, HWND * phwnd ) PURE;
  959. STDMETHOD ( Dismiss ) (THIS) PURE;
  960. };
  961. typedef ISplashScreen * LPSPLASHSCREEN;
  962. //
  963. // Interface for Multiple Monitor Configurations
  964. //
  965. #define MD_PRIMARY 0x00000001
  966. #define MD_ATTACHED 0x00000002
  967. #include <pshpack8.h>
  968. typedef struct _MonitorData
  969. {
  970. DWORD dwSize;
  971. DWORD dwFlags;
  972. DWORD dwStatus;
  973. RECT rcPos;
  974. } MonitorData, * LPMONITORDATA;
  975. #include <poppack.h> /* Return to byte packing */
  976. #undef INTERFACE
  977. #define INTERFACE IMultiMonConfig
  978. DECLARE_INTERFACE_( IMultiMonConfig, IUnknown )
  979. {
  980. // *** IUnknown methods ***
  981. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  982. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  983. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  984. // *** IMultiMonConfig methods ***
  985. STDMETHOD ( Initialize ) ( THIS_ HWND hwndHost, WNDPROC WndProc, DWORD dwReserved) PURE;
  986. STDMETHOD ( GetNumberOfMonitors ) (THIS_ int * pCMon, DWORD dwReserved) PURE;
  987. STDMETHOD ( GetMonitorData) (THIS_ int iMonitor, MonitorData * pmd, DWORD dwReserved) PURE;
  988. STDMETHOD ( Paint) (THIS_ int iMonitor, DWORD dwReserved) PURE;
  989. };
  990. typedef IMultiMonConfig * LPMULTIMONCONFIG;
  991. #endif // _WIN32_IE > 0x0400
  992. //// IRestrict
  993. // For the pdwRestrictionResult out parameter in IRestrict::IsRestricted() for
  994. // all pguidIDs.
  995. typedef enum
  996. {
  997. RR_ALLOW = 1,
  998. RR_DISALLOW,
  999. RR_NOCHANGE,
  1000. } RESTRICTION_RESULT;
  1001. // IRestrict::IsRestricted() dwRestrictAction parameter values for
  1002. // the RID_RDeskBars pguidID.
  1003. typedef enum
  1004. {
  1005. RA_DRAG = 1,
  1006. RA_DROP,
  1007. RA_ADD,
  1008. RA_CLOSE,
  1009. RA_MOVE,
  1010. } RESTRICT_ACTIONS;
  1011. #undef INTERFACE
  1012. #define INTERFACE IRestrict
  1013. DECLARE_INTERFACE_(IRestrict, IUnknown)
  1014. {
  1015. // *** IUnknown methods ***
  1016. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1017. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1018. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1019. // *** IRestrict Methods ***
  1020. STDMETHOD(IsRestricted) (THIS_ const GUID * pguidID, DWORD dwRestrictAction, VARIANT * pvarArgs, OUT DWORD * pdwRestrictionResult) PURE;
  1021. };
  1022. //// IAddressBand
  1023. #define OLECMD_REFRESH_TOPMOST 0x00000000
  1024. #define OLECMD_REFRESH_ENTIRELIST 0x00000001
  1025. #undef INTERFACE
  1026. #define INTERFACE IAddressBand
  1027. DECLARE_INTERFACE_(IAddressBand, IUnknown)
  1028. {
  1029. // *** IUnknown methods ***
  1030. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1031. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1032. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1033. // *** IAddressBand Methods ***
  1034. STDMETHOD(FileSysChange) (THIS_ DWORD dwEvent, LPCITEMIDLIST * ppidl1) PURE;
  1035. STDMETHOD(Refresh) (THIS_ VARIANT * pvarType) PURE;
  1036. };
  1037. #undef INTERFACE
  1038. #define INTERFACE IAddressEditBox
  1039. // Init Flags
  1040. #define AEB_INIT_DEFAULT 0x00000000
  1041. #define AEB_INIT_NOSHELL 0x00000001
  1042. #define AEB_INIT_NOWEB 0x00000002
  1043. #define AEB_INIT_NOFILE 0x00000004
  1044. #define AEB_INIT_AUTOEXEC 0x00000008 // Set if you want the item Navigated/ShellExeced when ENTER occurs.
  1045. #define AEB_INIT_SUBCLASS 0x00000010 // If set parent needs to pass HWND events thru IWinEventHandler::OnWinEvent()
  1046. #define AEB_INIT_NOASYNC 0x00000020 // Set if you don't want/support async navigation (from a modal dlg for instance)
  1047. // Parse Flags for IAddressEditBox::ParseNow()
  1048. #define SHURL_FLAGS_NONE 0x00000000
  1049. #define SHURL_FLAGS_NOUI 0x00000001 // Don't display any UI.
  1050. #define SHURL_FLAGS_NOSNS 0x00000002 // Ignore SHELL URLs. (FILE and Internet URLs still work)
  1051. #define SHURL_FLAGS_NOWEB 0x00000004 // Ignore WEB URLs. (Don't successfully parse if not found in shell name space)
  1052. #define SHURL_FLAGS_NOPATHSEARCH 0x00000008 // don't search on dos paths or app path
  1053. #define SHURL_FLAGS_AUTOCORRECT 0x00000010 // Try to autocorrect WEB URLs
  1054. // Exec Flags for IAddressEditBox::Execute()
  1055. #define SHURL_EXECFLAGS_NONE 0x00000000
  1056. #define SHURL_EXECFLAGS_SEPVDM 0x00000001 // If ShellExec(), set SEE_MASK_FLAG_SEPVDM fMask.
  1057. #define SHURL_EXECFLAGS_DONTFORCEIE 0x00000002 // If some browser other than IE is associated with HTML files, allow them to launch.
  1058. DECLARE_INTERFACE_(IAddressEditBox, IUnknown)
  1059. {
  1060. // *** IUnknown methods ***
  1061. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1062. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1063. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1064. // *** IAddressEditBox Methods ***
  1065. STDMETHOD(Init) (THIS_ HWND hwnd, HWND hwndEditBox, DWORD dwFlags, IUnknown * punkParent) PURE;
  1066. STDMETHOD(SetCurrentDir) (THIS_ LPCOLESTR pwzDir) PURE;
  1067. STDMETHOD(ParseNow) (THIS_ DWORD dwParseFlags) PURE;
  1068. STDMETHOD(Execute) (THIS_ DWORD dwExecFlags) PURE;
  1069. STDMETHOD(Save) (THIS_ DWORD dwReserved) PURE;
  1070. };
  1071. #if (_WIN32_IE >= 0x0400)
  1072. #define ISFB_MASK_ALL 0x0000003F //
  1073. #define ISFB_MASK_INVALID (~(ISFB_MASK_ALL)) //
  1074. //#define ISFB_STATE_NOTITLE 0x00000008 // obsolete! (use cbs::SetBandState)
  1075. #define ISFB_STATE_ALL 0x000001FF //
  1076. //-------------------------------------------------------------------------
  1077. //
  1078. // IWinEventHandler interface
  1079. //
  1080. // An object that wants to send messages to another object (typically
  1081. // a sub-object) QI's for the sub-object's IWinEventHandler interface.
  1082. // Once the object determines the hwnd is owned by the sub-object (via
  1083. // IsWindowOwner), the object calls OnWinEvent for send the message.
  1084. //
  1085. //
  1086. // [Member functions]
  1087. //
  1088. // IWinEventHandler::IsWindowOwner(hwnd)
  1089. // Returns S_OK if the hwnd is owned by the object, S_FALSE if not.
  1090. //
  1091. // IWinEventHandler::OnWinEvent(hwnd, dwMsg, wParam, lParam, plRet)
  1092. // Sends a message to the object. The Win32 return value (i.e., the
  1093. // value returned by DefWindowProc) is returned in *plRet. Return
  1094. // S_OK if the message is handled, otherwise S_FALSE.
  1095. //
  1096. //-------------------------------------------------------------------------
  1097. #undef INTERFACE
  1098. #define INTERFACE IWinEventHandler
  1099. DECLARE_INTERFACE_(IWinEventHandler, IUnknown)
  1100. {
  1101. // *** IUnknown methods ***
  1102. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1103. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1104. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1105. // *** IWinEventHandler Methods ***
  1106. STDMETHOD(OnWinEvent) (THIS_ HWND hwnd, UINT dwMsg, WPARAM wParam, LPARAM lParam, LRESULT* plres) PURE;
  1107. STDMETHOD(IsWindowOwner) (THIS_ HWND hwnd) PURE;
  1108. };
  1109. #endif // _WIN32_IE > 0x0400
  1110. //==========================================================================
  1111. // IExplorerToolbar interfaces
  1112. //
  1113. // This is an interface to the shell toolbar which allows shell views
  1114. // to add buttons and process.
  1115. // See http://ohserv/users/satona/toolbar_extension.htm for spec.
  1116. //
  1117. //==========================================================================
  1118. // Bitmap types
  1119. #define BITMAP_NORMAL 0x1
  1120. #define BITMAP_HOT 0x2
  1121. #define BITMAP_DISABLED 0x3
  1122. // Band Visibility Flags
  1123. #define VBF_TOOLS 0x00000001
  1124. #define VBF_ADDRESS 0x00000002
  1125. #define VBF_LINKS 0x00000004
  1126. #define VBF_BRAND 0x00000008
  1127. #define VBF_MENU 0x00000010
  1128. #define VBF_ONELINETEXT 0x00000020
  1129. #define VBF_TWOLINESTEXT 0x00000040
  1130. #define VBF_NOCUSTOMIZE 0x00000080
  1131. #define VBF_EXTERNALBANDS 0xFFFF0000
  1132. #define VBF_VALID (VBF_TOOLS | VBF_ADDRESS | VBF_LINKS | VBF_BRAND | VBF_MENU | VBF_EXTERNALBANDS)
  1133. #undef INTERFACE
  1134. #define INTERFACE IExplorerToolbar
  1135. typedef enum {
  1136. ETCMDID_GETBUTTONS = 0x0001,
  1137. ETCMDID_NEWCOMMANDTARGET = 0x0002, // sent to the previous command target when a new one is coming in
  1138. #if (_WIN32_IE >= 0x500)
  1139. ETCMDID_RELOADBUTTONS = 0x0003, // command target needs to call AddButtons again
  1140. #endif
  1141. } ENUM_ETCMDID;
  1142. DECLARE_INTERFACE_(IExplorerToolbar, IUnknown)
  1143. {
  1144. // *** IUnknown methods ***
  1145. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1146. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1147. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1148. // *** IExplorerToolbar methods ***
  1149. STDMETHOD(SetCommandTarget) (THIS_ IUnknown* punkCmdTarget, const GUID* pguidCmdGrp, DWORD dwFlags) PURE;
  1150. STDMETHOD(AddStdBrowserButtons) (THIS) PURE;
  1151. // Wrap of the TB_* messages the messages that are implmented
  1152. // are just the ones to add delete and modify the buttons, and not
  1153. // the ones to manipulate the toolbar.
  1154. STDMETHOD(AddButtons) (THIS_ const GUID * pguidButtonGroup, UINT nButtons, const TBBUTTON * lpButtons) PURE;
  1155. STDMETHOD(AddString) (THIS_ const GUID * pguidButtonGroup, HINSTANCE hInst, UINT_PTR uiResID, LRESULT * pOffset) PURE;
  1156. STDMETHOD(GetButton) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, LPTBBUTTON lpButton) PURE;
  1157. STDMETHOD(GetState) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, UINT * pfState) PURE;
  1158. STDMETHOD(SetState) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, UINT fState) PURE;
  1159. STDMETHOD(AddBitmap) (THIS_ const GUID * pguidButtonGroup, UINT uiBMPType, UINT uiCount, TBADDBITMAP * ptb,
  1160. LRESULT * pOffset, COLORREF rgbMask) PURE;
  1161. STDMETHOD(GetBitmapSize) (THIS_ UINT * uiID) PURE;
  1162. STDMETHOD(SendToolbarMsg) (THIS_ const GUID * pguidButtonGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * plRes) PURE;
  1163. STDMETHOD(SetImageList) (THIS_ const GUID* pguidCmdGroup, HIMAGELIST himlNormal, HIMAGELIST himlHot, HIMAGELIST himlDisabled) PURE;
  1164. STDMETHOD(ModifyButton) (THIS_ const GUID * pguidButtonGroup, UINT uiCommand, LPTBBUTTON lpButton) PURE;
  1165. };
  1166. //==========================================================================
  1167. // DefView supports a private service id for extended views.
  1168. // DefView's IOleCommandTarget supports the below command group and ids too.
  1169. //==========================================================================
  1170. // SID_DefView and CGID_DefView are defined in shlguid.w
  1171. //
  1172. #define DVCMDID_GETTHISDIRPATH 1 // pvaOut = path to this directory (if in filesystem)
  1173. #define DVCMDID_GETTHISDIRNAME 2 // pvaOut = friendly name of this directory
  1174. #define DVCMDID_GETTEMPLATEDIRNAME 3 // pvaOut = webview template (.htt) dir
  1175. #define IS_ADJUSTLISTVIEW 0x80000000
  1176. #define IS_INTERNALDUMMYBIT 0x40000000
  1177. #define IS_VALIDINTERNALBITS (IS_ADJUSTLISTVIEW | IS_INTERNALDUMMYBIT)
  1178. #define CFSTR_SHELLIDLISTP TEXT("Shell IDLData Private")
  1179. #define CFSTR_SHELLCOPYDATA TEXT("Shell Copy Data")
  1180. #define CFSTR_DROPEFFECTFOLDERLIST TEXT("DropEffectFolderList")
  1181. //
  1182. // Win 3.1 style HDROP
  1183. //
  1184. // Notes: Our API works only if pFiles == sizeof(DROPFILES16)
  1185. //
  1186. typedef struct _DROPFILES16 {
  1187. WORD pFiles; // offset to double null list of files
  1188. POINTS pt; // drop point (client coords)
  1189. WORD fNC; // is it on non client area
  1190. // and pt is in screen coords
  1191. } DROPFILES16, * LPDROPFILES16;
  1192. //
  1193. // format of CF_SHELLCOPYDATA
  1194. //
  1195. typedef struct _SHELLCOPYDATA {
  1196. DWORD dwEffect; // Intended effect
  1197. } SHELLCOPYDATA;
  1198. //
  1199. // CFSTR_DROPEFFECTFOLDERLIST defines the drop effects to certain folders
  1200. // this is applied when dropping to a file system folder.
  1201. //
  1202. typedef struct {
  1203. DWORD dwDropEffect;
  1204. WCHAR wszPath[MAX_PATH];
  1205. } DROPEFFECTFOLDER;
  1206. typedef struct {
  1207. DWORD dwDefaultDropEffect; // default drop effect (==0 for current behaviour)
  1208. INT cFolders; // number of folders in the list
  1209. DROPEFFECTFOLDER aFolders[1];
  1210. } DROPEFFECTFOLDERLIST;
  1211. //------ See shelldll\fsnotify.c for function descriptions. ----------
  1212. //
  1213. // Definition of the function type to be called by the notification
  1214. // service when a file the client has registered to monitor changes.
  1215. //
  1216. // DOC'ed for DOJ compliance:
  1217. #define SHCNRF_InterruptLevel 0x0001
  1218. #define SHCNRF_ShellLevel 0x0002
  1219. // If the caller passes SHCNRF_RecursiveInterrupt (meaning that they want interrupt events on the whole
  1220. // subtree), then they must also pass SHCNRF_InterruptLevel flag (duh), and they must be a recursive (eg
  1221. // fRecursive == TRUE) type notification.
  1222. #define SHCNRF_RecursiveInterrupt 0x1000
  1223. #define SHCNRF_ResumeThread 0x2000
  1224. #define SHCNRF_CreateSuspended 0x4000
  1225. #define SHCNRF_NewDelivery 0x8000
  1226. // !! WARNING !!
  1227. // If you change/add any new SHCNE_ events, you will need
  1228. // to possibly modify the SHCNE_XXXXEVENTS masks that are
  1229. // defined below as well.
  1230. // NOTE: SHCNE_GLOBALEVENTS are typically used to pass
  1231. // non-pidl information (packed into pidl format). We cannot
  1232. // extend SHCNE_GLOBALEVENTS and expect clients of the new
  1233. // events to work on a down-level shell32. In fact, they
  1234. // may very well fault during psfDesktop->CompareIDs.
  1235. // So be careful when adding to this bitfield!
  1236. //
  1237. // Win95 and NT4 and IE4 shipped with 0x0C0581E0L.
  1238. // We use this event mask to tell if we need to possibly throw out a SHCNE_UPDATEDIR that was
  1239. // generated by the filesystem because we have a more specific event already in our queue.
  1240. // NOTE: only non-interrupt events could cause us to throw out a interrupt generated UPDATEDIR event.
  1241. #define SHCNE_UPDATEDIR_OVERRIDE_EVENTS 0x00023818L
  1242. // This event was defined early on in IE4 for the Theme Switcher to
  1243. // notify the shell that a system-wide update needed to happen.
  1244. // This has been removed but I don't want to re-use the id just yet...
  1245. // BUGBUG (scotth) 6/11/98: can we remove this yet??
  1246. //#define SHCNEE_THEMECHANGED 1L // The theme changed
  1247. #define SHCNEE_WININETCHANGED 3L // dwItem2 contains CACHE_NOTIFY_* bits
  1248. #if (_WIN32_IE >= 0x0500)
  1249. #define SHCNEE_PROMOTEDITEM 6L // pidl2 is the pidl of the Promoted item
  1250. #define SHCNEE_DEMOTEDITEM 7L // pidl2 is the pidl of the demoted item
  1251. #define SHCNEE_ALIASINUSE 8L // some alias style folder is now being used
  1252. #endif
  1253. #if (_WIN32_IE >= 0x0600)
  1254. #define SHCNEE_SHORTCUTINVOKE 9L // an app has been launched via a shortcut
  1255. // pidl1 = SHShortcutInvokeAsIDList, pidl2=unused
  1256. #define SHCNEE_PINLISTCHANGED 10L // a change was made to the pin list
  1257. // pidl1 = SHChangeDWORDAsIDList, pidl2=unused
  1258. #define SHCNEE_USERINFOCHANGED 11L // A user picture was updated. pidl1 = SHChangeDWORDAsIDList, pidl2=unused
  1259. #define SHCNEE_UPDATEFOLDERLOCATION 12L // a special folder changed pidl1 = {SHChangeDWORDAsIDList, csidlFolder}, pidl2=unused
  1260. #endif
  1261. // Update types for the UpdateEntryList api
  1262. #define SHCNNU_SET 1 // Set the notify list to passed in list
  1263. #define SHCNNU_ADD 2 // Add the items to the current list
  1264. #define SHCNNU_REMOVE 3 // Remove the items from the current list
  1265. #define SHCNF_PRINTJOBA 0x0004 // dwItem1: printer name
  1266. // dwItem2: SHCNF_PRINTJOB_DATA
  1267. #define SHCNF_PRINTJOBW 0x0007 // dwItem1: printer name
  1268. // dwItem2: SHCNF_PRINTJOB_DATA
  1269. #define SHCNF_INSTRUMENT 0x0080 // dwItem1: LPSHCNF_INSTRUMENT
  1270. #define SHCNF_TRANSLATEDALIAS 0x4000 // for internals to filter on
  1271. #define SHCNF_ONLYNOTIFYINTERNALS 0x8000 // only notify internal clients
  1272. #ifdef UNICODE
  1273. #define SHCNF_PRINTJOB SHCNF_PRINTJOBW
  1274. #else
  1275. #define SHCNF_PRINTJOB SHCNF_PRINTJOBA
  1276. #endif
  1277. typedef struct tagSHCNF_PRINTJOB_DATA {
  1278. DWORD JobId;
  1279. DWORD Status;
  1280. DWORD TotalPages;
  1281. DWORD Size;
  1282. DWORD PagesPrinted;
  1283. } SHCNF_PRINTJOB_DATA, *LPSHCNF_PRINTJOB_DATA;
  1284. //
  1285. // This is all the INSTRUMENTation stuff...
  1286. // make this look like an ITEMIDLIST (uOffset points to 0 uTerm)
  1287. #include <pshpack1.h>
  1288. typedef struct tagSHCNF_INSTRUMENT {
  1289. USHORT uOffset;
  1290. USHORT uAlign;
  1291. DWORD dwEventType;
  1292. DWORD dwEventStructure;
  1293. SYSTEMTIME st;
  1294. union tagEvents {
  1295. struct tagSTRING {
  1296. TCHAR sz[32];
  1297. } string;
  1298. struct tagHOTKEY {
  1299. WPARAM wParam;
  1300. } hotkey;
  1301. struct tagWNDPROC {
  1302. HWND hwnd;
  1303. UINT uMsg;
  1304. WPARAM wParam;
  1305. LPARAM lParam;
  1306. } wndproc;
  1307. struct tagCOMMAND {
  1308. HWND hwnd;
  1309. UINT idCmd;
  1310. } command;
  1311. struct tagDROP {
  1312. HWND hwnd;
  1313. UINT idCmd;
  1314. // TCHAR sz[32]; // convert pDataObject into something we can log
  1315. } drop;
  1316. } e;
  1317. USHORT uTerm;
  1318. } SHCNF_INSTRUMENT_INFO, * LPSHCNF_INSTRUMENT_INFO;
  1319. #include <poppack.h>
  1320. #define SHCNFI_EVENT_STATECHANGE 0 // dwEventType
  1321. #define SHCNFI_EVENT_STRING 1 // e.string
  1322. #define SHCNFI_EVENT_HOTKEY 2 // e.hotkey
  1323. #define SHCNFI_EVENT_WNDPROC 3 // e.wndproc
  1324. #define SHCNFI_EVENT_WNDPROC_HOOK 4 // e.wndproc
  1325. #define SHCNFI_EVENT_ONCOMMAND 5 // e.command
  1326. #define SHCNFI_EVENT_INVOKECOMMAND 6 // e.command
  1327. #define SHCNFI_EVENT_TRACKPOPUPMENU 7 // e.command
  1328. #define SHCNFI_EVENT_DROP 8 // e.drop
  1329. #define SHCNFI_EVENT_MAX 9
  1330. #define SHCNFI_STRING_SHOWEXTVIEW 0
  1331. #define SHCNFI_STATE_KEYBOARDACTIVE 0 // _KEYBOARDACTIVE or _MOUSEACTIVE
  1332. #define SHCNFI_STATE_MOUSEACTIVE 1 // _KEYBOARDACTIVE or _MOUSEACTIVE
  1333. #define SHCNFI_STATE_ACCEL_TRAY 2 // _ACCEL_TRAY or _ACCEL_DESKTOP
  1334. #define SHCNFI_STATE_ACCEL_DESKTOP 3 // _ACCEL_TRAY or _ACCEL_DESKTOP
  1335. #define SHCNFI_STATE_START_DOWN 4 // _START_DOWN or _START_UP
  1336. #define SHCNFI_STATE_START_UP 5 // _START_DOWN or _START_UP
  1337. #define SHCNFI_STATE_TRAY_CONTEXT 6
  1338. #define SHCNFI_STATE_TRAY_CONTEXT_CLOCK 7
  1339. #define SHCNFI_STATE_TRAY_CONTEXT_START 8
  1340. #define SHCNFI_STATE_DEFVIEWX_ALT_DBLCLK 9
  1341. #define SHCNFI_STATE_DEFVIEWX_SHIFT_DBLCLK 10
  1342. #define SHCNFI_STATE_DEFVIEWX_DBLCLK 11
  1343. #define SHCNFI_GLOBALHOTKEY 0
  1344. #define SHCNFI_CABINET_WNDPROC 0
  1345. #define SHCNFI_DESKTOP_WNDPROC 1
  1346. #define SHCNFI_PROXYDESKTOP_WNDPROC 2
  1347. #define SHCNFI_TRAY_WNDPROC 3
  1348. #define SHCNFI_DRIVES_WNDPROC 4
  1349. #define SHCNFI_ONETREE_WNDPROC 5
  1350. #define SHCNFI_MAIN_WNDPROC 6
  1351. #define SHCNFI_FOLDEROPTIONS_DLGPROC 7
  1352. #define SHCNFI_VIEWOPTIONS_DLGPROC 8
  1353. #define SHCNFI_FT_DLGPROC 9
  1354. #define SHCNFI_FTEdit_DLGPROC 10
  1355. #define SHCNFI_FTCmd_DLGPROC 11
  1356. #define SHCNFI_TASKMAN_DLGPROC 12
  1357. #define SHCNFI_TRAYVIEWOPTIONS_DLGPROC 13
  1358. #define SHCNFI_INITSTARTMENU_DLGPROC 14
  1359. #define SHCNFI_PRINTERQUEUE_DLGPROC 15
  1360. #define SHCNFI_CABINET_ONCOMMAND 0
  1361. #define SHCNFI_TRAYCOMMAND 1
  1362. #define SHCNFI_BITBUCKET_DFM_INVOKE 0
  1363. #define SHCNFI_BITBUCKET_FNV_INVOKE 1
  1364. #define SHCNFI_BITBUCKET_INVOKE 2
  1365. #define SHCNFI_BITBUCKETBG_DFM_INVOKE 3
  1366. #define SHCNFI_CONTROLS_DFM_INVOKE 4
  1367. #define SHCNFI_CONTROLS_FNV_INVOKE 5
  1368. #define SHCNFI_CONTROLSBG_DFM_INVOKE 6
  1369. #define SHCNFI_DEFFOLDER_DFM_INVOKE 7
  1370. #define SHCNFI_DEFFOLDER_INVOKE 8
  1371. #define SHCNFI_FINDEXT_INVOKE 9
  1372. #define SHCNFI_DEFFOLDER_FNV_INVOKE 10
  1373. #define SHCNFI_DRIVESBG_DFM_INVOKE 11
  1374. #define SHCNFI_DRIVES_FNV_INVOKE 12
  1375. #define SHCNFI_DRIVES_DFM_INVOKE 13
  1376. #define SHCNFI_FOLDERBG_DFM_INVOKE 14
  1377. #define SHCNFI_FOLDER_FNV_INVOKE 15
  1378. #define SHCNFI_FOLDER_DFM_INVOKE 16
  1379. #define SHCNFI_NETWORKBG_DFM_INVOKE 17
  1380. #define SHCNFI_NETWORK_FNV_INVOKE 18
  1381. #define SHCNFI_NETWORK_DFM_INVOKE 19
  1382. #define SHCNFI_NETWORKPRINTER_DFM_INVOKE 20
  1383. #define SHCNFI_DESKTOPBG_DFM_INVOKE 21
  1384. #define SHCNFI_DESKTOP_DFM_INVOKE 22
  1385. #define SHCNFI_DESKTOP_FNV_INVOKE 23
  1386. #define SHCNFI_PRINTERS_DFM_INVOKE 24
  1387. #define SHCNFI_PRINTERSBG_DFM_INVOKE 25
  1388. #define SHCNFI_PRINTERS_FNV_INVOKE 26
  1389. #define SHCNFI_DEFVIEWX_INVOKE 27
  1390. #define SHCNFI_FOLDER_DROP 0
  1391. #define SHCNFI_PRINTQUEUE_DROP 1
  1392. #define SHCNFI_DEFVIEWX_TPM 2
  1393. #define SHCNFI_DROP_EXE_TPM 3
  1394. #define SHCNFI_IDLDT_TPM 4
  1395. #define SHCNFI_DROP_BITBUCKET 0
  1396. #define SHCNFI_DROP_PRINTFOLDER 1
  1397. #define SHCNFI_DROP_PRINTER 2
  1398. #define SHCNFI_DROP_RUN 3
  1399. #define SHCNFI_DROP_SHELLLINK 4
  1400. #define SHCNFI_DROP_DRIVES 5
  1401. #define SHCNFI_DROP_FS 6
  1402. #define SHCNFI_DROP_EXE 7
  1403. #define SHCNFI_DROP_NETROOT 8
  1404. #define SHCNFI_DROP_PRINTQUEUE 9
  1405. #define SHCNFI_DROP_BRIEFCASE 10
  1406. #ifdef WANT_SHELL_INSTRUMENTATION
  1407. #define INSTRUMENT_STATECHANGE(t) \
  1408. { \
  1409. SHCNF_INSTRUMENT_INFO s; \
  1410. s.dwEventType=(t); \
  1411. s.dwEventStructure=SHCNFI_EVENT_STATECHANGE; \
  1412. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1413. }
  1414. #define INSTRUMENT_STRING(t,p) \
  1415. { \
  1416. SHCNF_INSTRUMENT_INFO s; \
  1417. s.dwEventType=(t); \
  1418. s.dwEventStructure=SHCNFI_EVENT_STRING; \
  1419. lstrcpyn(s.e.string.sz,(p),ARRAYSIZE(s.e.string.sz)); \
  1420. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1421. }
  1422. #define INSTRUMENT_HOTKEY(t,w) \
  1423. { \
  1424. SHCNF_INSTRUMENT_INFO s; \
  1425. s.dwEventType=(t); \
  1426. s.dwEventStructure=SHCNFI_EVENT_HOTKEY; \
  1427. s.e.hotkey.wParam=(w); \
  1428. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1429. }
  1430. #define INSTRUMENT_WNDPROC(t,h,u,w,l) \
  1431. { \
  1432. SHCNF_INSTRUMENT_INFO s; \
  1433. s.dwEventType=(t); \
  1434. s.dwEventStructure=SHCNFI_EVENT_WNDPROC; \
  1435. s.e.wndproc.hwnd=(h); \
  1436. s.e.wndproc.uMsg=(u); \
  1437. s.e.wndproc.wParam=(w); \
  1438. s.e.wndproc.lParam=(l); \
  1439. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1440. }
  1441. #define INSTRUMENT_WNDPROC_HOOK(h,u,w,l) \
  1442. { \
  1443. SHCNF_INSTRUMENT_INFO s; \
  1444. s.dwEventType=0; \
  1445. s.dwEventStructure=SHCNFI_EVENT_WNDPROC_HOOK; \
  1446. s.e.wndproc.hwnd=(h); \
  1447. s.e.wndproc.uMsg=(u); \
  1448. s.e.wndproc.wParam=(w); \
  1449. s.e.wndproc.lParam=(l); \
  1450. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1451. }
  1452. #define INSTRUMENT_ONCOMMAND(t,h,u) \
  1453. { \
  1454. SHCNF_INSTRUMENT_INFO s; \
  1455. s.dwEventType=(t); \
  1456. s.dwEventStructure=SHCNFI_EVENT_ONCOMMAND; \
  1457. s.e.command.hwnd=(h); \
  1458. s.e.command.idCmd=(u); \
  1459. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1460. }
  1461. #define INSTRUMENT_INVOKECOMMAND(t,h,u) \
  1462. { \
  1463. SHCNF_INSTRUMENT_INFO s; \
  1464. s.dwEventType=(t); \
  1465. s.dwEventStructure=SHCNFI_EVENT_INVOKECOMMAND; \
  1466. s.e.command.hwnd=(h); \
  1467. s.e.command.idCmd=(u); \
  1468. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1469. }
  1470. #define INSTRUMENT_TRACKPOPUPMENU(t,h,u) \
  1471. { \
  1472. SHCNF_INSTRUMENT_INFO s; \
  1473. s.dwEventType=(t); \
  1474. s.dwEventStructure=SHCNFI_EVENT_TRACKPOPUPMENU; \
  1475. s.e.command.hwnd=(h); \
  1476. s.e.command.idCmd=(u); \
  1477. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1478. }
  1479. #define INSTRUMENT_DROP(t,h,u,p) \
  1480. { \
  1481. SHCNF_INSTRUMENT_INFO s; \
  1482. s.dwEventType=(t); \
  1483. s.dwEventStructure=SHCNFI_EVENT_DROP; \
  1484. s.e.drop.hwnd=(h); \
  1485. s.e.drop.idCmd=(u); \
  1486. SHChangeNotify(SHCNE_INSTRUMENT,SHCNF_INSTRUMENT,&s,NULL); \
  1487. }
  1488. #else
  1489. #define INSTRUMENT_STATECHANGE(t)
  1490. #define INSTRUMENT_STRING(t,p)
  1491. #define INSTRUMENT_HOTKEY(t,w)
  1492. #define INSTRUMENT_WNDPROC(t,h,u,w,l)
  1493. #define INSTRUMENT_WNDPROC_HOOK(h,u,w,l)
  1494. #define INSTRUMENT_ONCOMMAND(t,h,u)
  1495. #define INSTRUMENT_INVOKECOMMAND(t,h,u)
  1496. #define INSTRUMENT_TRACKPOPUPMENU(t,h,u)
  1497. #define INSTRUMENT_DROP(t,h,u,p)
  1498. #endif //WANT_SHELL_INSTRUMENTATION
  1499. //
  1500. //
  1501. // IQueryCodePage
  1502. //
  1503. #undef INTERFACE
  1504. #define INTERFACE IQueryCodePage
  1505. DECLARE_INTERFACE_(IQueryCodePage, IUnknown)
  1506. {
  1507. // *** IUnknown methods ***
  1508. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  1509. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1510. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1511. // *** IQueryCodePage methods ***
  1512. STDMETHOD(GetCodePage)(THIS_ UINT * puiCodePage) PURE;
  1513. STDMETHOD(SetCodePage)(THIS_ UINT uiCodePage) PURE;
  1514. } ;
  1515. SHSTDAPI_(void) SHWaitOp_Operate(HANDLE hWaitOp, DWORD dwProcId);
  1516. // DOC'ed for DOJ compliance:
  1517. #if (_WIN32_IE >= 0x0400)
  1518. // Use this instead of SHChangeDWORDAsIDList for SHCNEE_ORDERCHANGED
  1519. // SHCNEE_PROMOTEDITEM and SHCNEE_DEMOTEDITEM
  1520. //
  1521. // When filling in the pSender, cast LPVOID directly to INT64.
  1522. // Do not cast through DWORD_PTR because that will not sign extend
  1523. // properly on Win32.
  1524. typedef struct _SHChangeMenuAsIDList {
  1525. USHORT cb;
  1526. DWORD dwItem1; // SHCNEE_EXTENDED_EVENT requires this
  1527. // pSender must appear immediately after dwItem1 for IE5.0 compat
  1528. INT64 pSender; // address of sender (64-bit for Win64)
  1529. DWORD dwProcessID; // pid of sender
  1530. USHORT cbZero;
  1531. } SHChangeMenuAsIDList, * LPSHChangeMenuAsIDList;
  1532. // DOC'ed for DOJ Compliance
  1533. typedef struct _SHShortcutInvokeAsIDList {
  1534. USHORT cb;
  1535. DWORD dwItem1; // SHCNEE_EXTENDED_EVENT requires this
  1536. DWORD dwPid; // PID of target application
  1537. WCHAR szShortcutName[MAX_PATH]; // Path to shortcut
  1538. WCHAR szTargetName[MAX_PATH]; // Path to target application
  1539. USHORT cbZero;
  1540. } SHShortcutInvokeAsIDList, *LPSHShortcutInvokeAsIDList;
  1541. #endif /* _WIN32_IE */
  1542. #define SHChangeNotifyHandleEvents() SHChangeNotify(0, SHCNF_FLUSH, NULL, NULL)
  1543. // DOC'ed for DOJ compliance
  1544. #define SHChangeNotifyRegisterORD 2
  1545. // DOC'ed for DOJ compliance
  1546. #define SHChangeNotifyDeregisterORD 4
  1547. SHSTDAPI_(BOOL) SHChangeNotifyUpdateEntryList(unsigned long ulID, int iUpdateType, int cEntries, SHChangeNotifyEntry *pshcne);
  1548. SHSTDAPI_(void) SHChangeNotifyReceive(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlExtra);
  1549. SHSTDAPI_(BOOL) SHChangeRegistrationReceive(HANDLE hChangeNotification, DWORD dwProcId);
  1550. SHSTDAPI_(void) SHChangeNotifyDeregisterWindow(HWND hwnd);
  1551. SHSTDAPI_(LRESULT) SHChangeNotifySuspendResumeReceive(WPARAM wParam, LPARAM lParam);
  1552. SHSTDAPI_(BOOL) SHChangeNotifySuspendResume(BOOL bSuspend, LPITEMIDLIST pidlSuspend, BOOL bRescursive, DWORD dwReserved);
  1553. typedef HANDLE LPSHChangeNotificationLock;
  1554. // DOC'ed for DOJ compliance
  1555. // END Internal SHChangeNotify HELPERS
  1556. // DOC'ed for DOJ compliance
  1557. #ifndef NOOCHOST // {
  1558. //
  1559. // ====== OCHOST CONTROL ==========================================
  1560. //
  1561. // The following are all definations of structures, windows messages needed for OCHOST,
  1562. // the window control you can use to host an OC.
  1563. // To use OCHOST, you must specify the window class as OCHOST_CLASS or "OCHOST"
  1564. // -- To Create and initialize OCHOST:
  1565. // 1. CreateWindow with window title = the string version of class id or the OC
  1566. // 2. CreateWindow with a pointer to the OCHINITSTRUCT structure as the last parameter
  1567. // you must allocate and initialize the OCHINITSTRUCT structure
  1568. // 3. CreateWindow with no title and the last param == NULL, then use the OCM_INITIALIZE message
  1569. // or the OCHost_InitOC macro to initialize it.
  1570. // 4. Use OCM_QUERYINTERFACE to QI an interface pointer from the OC.
  1571. // 5. Simply destroy the window when you exit.
  1572. // SHDRC -- Shell Doc Register Classes
  1573. typedef struct _SHDRC {
  1574. DWORD cbSize; // size of this structure in bytes
  1575. DWORD dwFlags; // SHDRCF_ flags
  1576. } SHDRC;
  1577. #define SHDRCF_OCHOST 0x0001 // Register the OCHOST_CLASS window
  1578. #define SHDRCF_ALL 0x0001 //
  1579. SHDOCAPI_(BOOL) DllRegisterWindowClasses(const SHDRC * pshdrc);
  1580. BROWSEUIAPI_(BOOL) InitOCHostClass(const SHDRC *pshdrc);
  1581. #define OCHOST_CLASSA "OCHost"
  1582. #define OCHOST_CLASSW L"OCHost"
  1583. #ifdef UNICODE
  1584. #define OCHOST_CLASS OCHOST_CLASSW
  1585. #else
  1586. #define OCHOST_CLASS OCHOST_CLASSA
  1587. #endif
  1588. // ------------------- Window messages for OC Host --------------------
  1589. // IUnknown::QueryInterface the hosted OC
  1590. typedef struct _QIMSG {
  1591. const IID * qiid;
  1592. void **ppvObject;
  1593. } QIMSG, *LPQIMSG;
  1594. // ................. Query Interface Message ..........
  1595. #define OCM_QUERYINTERFACE (WM_USER+0)
  1596. #ifdef __cplusplus
  1597. inline HRESULT OCHost_QueryInterface(HWND hwndOCH, REFIID riid, void **ppv) \
  1598. { QIMSG qimsg = {&riid, ppv}; \
  1599. return (HRESULT)SNDMSG((hwndOCH), OCM_QUERYINTERFACE, (WPARAM)sizeof(qimsg), (LPARAM)&qimsg); \
  1600. }
  1601. #else
  1602. #define OCHost_QueryInterface(hwndOCH, riid, ppv) \
  1603. { QIMSG qimsg = {&riid, ppv}; \
  1604. SNDMSG((hwndOCH), OCM_QUERYINTERFACE, (WPARAM)sizeof(qimsg), (LPARAM)&qimsg); \
  1605. }
  1606. #endif
  1607. // ------------------- OC Initialization Structure ---------------------
  1608. // This is intended to be passed in as the lParam of the OCM_INITOC message
  1609. typedef struct _OCHINITSTRUCT {
  1610. UINT cbSize; // size of this structure
  1611. CLSID clsidOC; // class ID of the OC
  1612. IUnknown * punkOwner; // owner of OCHOST
  1613. } OCHINITSTRUCT, *LPOCHINITSTRUCT;
  1614. //--------------------------------------------------------------------
  1615. // ................ Initialize and activate the OC ...............
  1616. #define OCM_INITIALIZE (WM_USER+1)
  1617. #define OCM_INITOC OCM_INITIALIZE
  1618. #define OCHost_InitOC(hwndOCH, lpOCS) \
  1619. (HRESULT)SNDMSG((hwndOCH), OCM_INITOC, 0, (LPARAM)lpOCS)
  1620. // ............... give ochost a parent IUnknown .......
  1621. #define OCM_SETOWNER (WM_USER+2)
  1622. #define OCHost_SetOwner(hwndOC, punk) \
  1623. (HRESULT)SNDMSG((hwndOC), OCM_SETOWNER, 0, (LPARAM)(IUnknown*)(punk))
  1624. // ............... DoVerb the OC .......
  1625. // n.b. iVerb is technically a long, WPARAM might truncate it
  1626. #define OCM_DOVERB (WM_USER+3)
  1627. #define OCHost_DoVerb(hwndOC, iVerb, lpMsg) \
  1628. (HRESULT)SNDMSG((hwndOC), OCM_DOVERB, (WPARAM)iVerb, (LPARAM)lpMsg)
  1629. //.................Enable/Disable OC event notifications
  1630. #define OCM_ENABLEEVENTS (WM_USER+4)
  1631. // WPARAM: TRUE to enable event notifications, FALSE to disable.
  1632. // returns: TRUE if successful, otherwise FALSE.
  1633. // Event notification is in the form of a WM_NOTIFY with
  1634. // code OCN_OCEVENT and an NMOCEVENT block.
  1635. #define OCHost_EnableEvents(hwndOC, bEnable) \
  1636. (BOOL)SNDMSG((hwndOC), OCM_ENABLEEVENTS, (WPARAM)bEnable, 0L)
  1637. #define OCM_SETSERVICEPROVIDER (WM_USER+5)
  1638. // LPARAM: IServiceProvider* pSP.
  1639. // This message sets a service provider for SID_OleClientSite delegation.
  1640. // Currently, OCHost will just call this guy with (SID_OleClientSite, IDispatch)
  1641. // and the client-implemented service provider can return an IDispatch to
  1642. // handle ambient properties.
  1643. #define OCHost_SetServiceProvider(hwndOC, pSP) \
  1644. (BOOL)SNDMSG((hwndOC), OCM_SETSERVICEPROVIDER, 0L, (LPARAM) pSP)
  1645. // ------------------ Window Notify messages from OC Host --------------
  1646. #define OCN_FIRST 0x1300
  1647. #define OCN_COCREATEINSTANCE (OCN_FIRST + 1)
  1648. typedef struct _OCNCOCREATEMSG {
  1649. NMHDR nmhdr;
  1650. CLSID clsidOC;
  1651. IUnknown ** ppunk;
  1652. } OCNCOCREATEMSG, *LPOCNCOCREATEMSG;
  1653. // NOTE: return values are defined as the following
  1654. // If the handler of OCN_COCREATEINSTANCE Notify message returns OCNCOCREATE_ALREADYCREATED,
  1655. // on return the (*ppvObj) is assumed to have the value of the OC's IUnkown pointer
  1656. #define OCNCOCREATE_CONTINUE 0
  1657. #define OCNCOCREATE_HANDLED -1
  1658. #define OCN_PERSISTINIT (OCN_FIRST + 2)
  1659. // NOTE: return values are defined as the following
  1660. // If the handler of OCN_PERSISTINIT Notify message returns OCNPERSIST_ABORT,
  1661. // the OCHOST will abort IPersist's initialization.
  1662. #define OCNPERSISTINIT_CONTINUE 0
  1663. #define OCNPERSISTINIT_HANDLED -1
  1664. // The return value on the following notify messages are ignored.
  1665. #define OCN_ACTIVATE (OCN_FIRST + 3)
  1666. #define OCN_DEACTIVATE (OCN_FIRST + 4)
  1667. #define OCN_EXIT (OCN_FIRST + 5)
  1668. #define OCN_ONPOSRECTCHANGE (OCN_FIRST + 6)
  1669. typedef struct _OCNONPOSRECTCHANGEMSG {
  1670. NMHDR nmhdr;
  1671. LPCRECT prcPosRect;
  1672. } OCNONPOSRECTCHANGEMSG, *LPOCNONPOSRECTCHANGEMSG;
  1673. #define OCN_ONUIACTIVATE (OCN_FIRST + 7)
  1674. typedef struct _OCNONUIACTIVATEMSG {
  1675. NMHDR nmhdr;
  1676. IUnknown *punk;
  1677. } OCNONUIACTIVATEMSG, *LPOCNONUIACTIVATEMSG;
  1678. #define OCNONUIACTIVATE_HANDLED -1
  1679. #define OCN_ONSETSTATUSTEXT (OCN_FIRST + 8)
  1680. typedef struct _OCNONSETSTATUSTEXT {
  1681. NMHDR nmhdr;
  1682. LPCOLESTR pwszStatusText;
  1683. } OCNONSETSTATUSTEXTMSG, *LPOCNONSETSTATUSTEXTMSG;
  1684. #define OCN_OCEVENT (OCN_FIRST + 9)
  1685. // OC event notification block.
  1686. // Recipient should return nonzero if any outbound parameters were modified
  1687. // and should be returned to the ActiveX control object; otherwse zero.
  1688. // NOTE: Structure is not properly aligned. Already shipped so too late to fix
  1689. typedef struct tagNMOCEVENT
  1690. {
  1691. IN NMHDR hdr ;
  1692. IN DISPID dispID ;
  1693. IN IID iid ;
  1694. IN LCID lcid ;
  1695. IN WORD wFlags ;
  1696. IN OUT DISPPARAMS *pDispParams ;
  1697. OUT VARIANT *pVarResult ;
  1698. OUT EXCEPINFO *pExepInfo ;
  1699. OUT UINT *puArgErr ;
  1700. } NMOCEVENT, *PNMOCEVENT, *LPNMOCEVENT ;
  1701. #endif // NOOCHOST // }
  1702. //
  1703. // Access to shdocvw's active session count
  1704. //
  1705. enum SessionOp {
  1706. SESSION_QUERY = 0,
  1707. SESSION_INCREMENT,
  1708. SESSION_DECREMENT,
  1709. SESSION_INCREMENT_NODEFAULTBROWSERCHECK
  1710. };
  1711. long SetQueryNetSessionCount(enum SessionOp Op);
  1712. SHDOCAPI_(void) IEWriteErrorLog(const EXCEPTION_RECORD* pexr);
  1713. //
  1714. // Internal APIs Follow. NOT FOR PUBLIC CONSUMPTION.
  1715. //
  1716. // Errors shared in the shell
  1717. #define E_FILE_NOT_FOUND MAKE_SCODE(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
  1718. #define E_PATH_NOT_FOUND MAKE_SCODE(SEVERITY_ERROR, FACILITY_WIN32, ERROR_PATH_NOT_FOUND)
  1719. // Useful macros
  1720. #define ResultFromShort(i) MAKE_HRESULT(SEVERITY_SUCCESS, 0, (USHORT)(i))
  1721. #define ShortFromResult(r) (short)HRESULT_CODE(r)
  1722. #if (defined(UNICODE) && !defined(_X86_)) // all non-x86 systems require alignment
  1723. #ifndef ALIGNMENT_SCENARIO
  1724. #define ALIGNMENT_SCENARIO
  1725. #endif
  1726. #endif
  1727. #ifndef LPNTSTR_DEFINED
  1728. #define LPNTSTR_DEFINED
  1729. typedef UNALIGNED const WCHAR * LPNCWSTR;
  1730. typedef UNALIGNED WCHAR * LPNWSTR;
  1731. #ifdef UNICODE
  1732. #define LPNCTSTR LPNCWSTR
  1733. #define LPNTSTR LPNWSTR
  1734. #else
  1735. #define LPNCTSTR LPCSTR
  1736. #define LPNTSTR LPSTR
  1737. #endif
  1738. #endif // LPNTSTR_DEFINED
  1739. #define RFN_FIRST (0U-510U) // run file dialog notify
  1740. #define RFN_LAST (0U-519U)
  1741. //=======================================================================
  1742. // String constants for
  1743. // 1. Registration database keywords (prefix STRREG_)
  1744. // 2. Exported functions from handler dlls (prefix STREXP_)
  1745. // 3. .INI file keywords (prefix STRINI_)
  1746. // 4. Others (prefix STR_)
  1747. //=======================================================================
  1748. #define STRREG_SHELLUI TEXT("ShellUIHandler")
  1749. #define STRREG_SHELL TEXT("Shell")
  1750. #define STRREG_DEFICON TEXT("DefaultIcon")
  1751. #define STRREG_SHEX TEXT("shellex")
  1752. #define STRREG_SHEX_PROPSHEET STRREG_SHEX TEXT("\\PropertySheetHandlers")
  1753. #define STRREG_SHEX_DDHANDLER STRREG_SHEX TEXT("\\DragDropHandlers")
  1754. #define STRREG_SHEX_MENUHANDLER STRREG_SHEX TEXT("\\ContextMenuHandlers")
  1755. #define STRREG_SHEX_COPYHOOK TEXT("Directory\\") STRREG_SHEX TEXT("\\CopyHookHandlers")
  1756. #define STRREG_SHEX_PRNCOPYHOOK TEXT("Printers\\") STRREG_SHEX TEXT("\\CopyHookHandlers")
  1757. #define STRREG_STARTMENU TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Start Menu")
  1758. #define STRREG_STARTMENU2 TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Start Menu2")
  1759. #define STRREG_FAVORITES TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Favorites")
  1760. #define STRREG_DISCARDABLE TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Discardable")
  1761. #define STRREG_POSTSETUP TEXT("\\PostSetup")
  1762. #define STREXP_CANUNLOAD "DllCanUnloadNow" // From OLE 2.0
  1763. #define STRINI_CLASSINFO TEXT(".ShellClassInfo") // secton name
  1764. #define STRINI_SHELLUI TEXT("ShellUIHandler")
  1765. #define STRINI_OPENDIRICON TEXT("OpenDirIcon")
  1766. #define STRINI_DIRICON TEXT("DirIcon")
  1767. #define STR_DESKTOPINI TEXT("desktop.ini")
  1768. #define STR_DESKTOPINIA "desktop.ini"
  1769. #define DRIVEID(path) ((*path - 'A') & 31)
  1770. #define PATH_CCH_EXT 64
  1771. // DOC'ed for DOJ Compliance
  1772. #ifndef NOUSER
  1773. typedef struct {
  1774. NMHDR hdr;
  1775. CHAR szCmd[MAX_PATH*2];
  1776. DWORD dwHotKey;
  1777. HMONITOR hMonitor;
  1778. } NMVIEWFOLDERA, *LPNMVIEWFOLDERA;
  1779. typedef struct {
  1780. NMHDR hdr;
  1781. WCHAR szCmd[MAX_PATH*2];
  1782. DWORD dwHotKey;
  1783. HMONITOR hMonitor;
  1784. } NMVIEWFOLDERW, *LPNMVIEWFOLDERW;
  1785. #ifdef UNICODE
  1786. typedef NMVIEWFOLDERW NMVIEWFOLDER;
  1787. typedef LPNMVIEWFOLDERW LPNMVIEWFOLDER;
  1788. #else
  1789. typedef NMVIEWFOLDERA NMVIEWFOLDER;
  1790. typedef LPNMVIEWFOLDERA LPNMVIEWFOLDER;
  1791. #endif // UNICODE
  1792. #endif
  1793. //
  1794. // DDE related APIs
  1795. //
  1796. SHSTDDOCAPI_(void) ShellDDEInit(BOOL fInit);
  1797. SHSTDDOCAPI_(BOOL) DDEHandleViewFolderNotify(IShellBrowser* psb, HWND hwnd, LPNMVIEWFOLDER lpnm);
  1798. SHSTDDOCAPI_(LPNMVIEWFOLDER) DDECreatePostNotify(LPNMVIEWFOLDER lpnm);
  1799. // DOC'ed for DOJ compliance
  1800. SHSTDAPI CIDLData_CreateFromIDArray(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[], IDataObject **ppdtobj);
  1801. SHSTDAPI SHCreateFileDataObject(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST *apidl, IDataObject *pdtInner, IDataObject **pdtobj);
  1802. // Common strings
  1803. #define STR_DESKTOPCLASS "Progman"
  1804. //
  1805. // Storage name of a scrap/bookmark item
  1806. //
  1807. #define WSTR_SCRAPITEM L"\003ITEM000"
  1808. // DOC'ed for DOJ Compliance
  1809. #ifdef RFN_FIRST
  1810. #define RFN_EXECUTE (RFN_FIRST - 0)
  1811. typedef struct {
  1812. NMHDR hdr;
  1813. LPCSTR lpszCmd;
  1814. LPCSTR lpszWorkingDir;
  1815. int nShowCmd;
  1816. } NMRUNFILEA, *LPNMRUNFILEA;
  1817. typedef struct {
  1818. NMHDR hdr;
  1819. LPCWSTR lpszCmd;
  1820. LPCWSTR lpszWorkingDir;
  1821. int nShowCmd;
  1822. } NMRUNFILEW, *LPNMRUNFILEW;
  1823. #ifdef UNICODE
  1824. typedef NMRUNFILEW NMRUNFILE;
  1825. typedef LPNMRUNFILEW LPNMRUNFILE;
  1826. #else
  1827. typedef NMRUNFILEA NMRUNFILE;
  1828. typedef LPNMRUNFILEA LPNMRUNFILE;
  1829. #endif // UNICODE
  1830. #endif
  1831. // DOC'ed for DOJ compliance
  1832. // Shell create link API
  1833. #define SHCL_USETEMPLATE 0x0001
  1834. #define SHCL_USEDESKTOP 0x0002
  1835. #define SHCL_CONFIRM 0x0004
  1836. #define SHCL_MAKEFOLDERSHORTCUT 0x0008
  1837. #if (_WIN32_IE >= 0x0600)
  1838. #define SHCL_NOUNIQUE 0x0010
  1839. #endif // _WIN2_IE >= 0x0600
  1840. SHSTDAPI SHCreateLinks(HWND hwnd, LPCTSTR pszDir, IDataObject *pDataObj, UINT fFlags, LPITEMIDLIST* ppidl);
  1841. SHSTDAPI SHRegisterDragDrop(HWND hwnd, IDropTarget *pdtgt);
  1842. SHSTDAPI SHRevokeDragDrop(HWND hwnd);
  1843. // DOC'ed for DOJ compliance
  1844. //===========================================================================
  1845. // office 9 pluggable UI
  1846. //===========================================================================
  1847. #define PUI_OFFICE_COMMAND (WM_USER + 0x901)
  1848. #define PLUGUI_CMD_SHUTDOWN 0 // wParam value
  1849. #define PLUGUI_CMD_QUERY 1 // wParam value
  1850. #define OFFICE_VERSION_9 9 // standardized value to return for Office 9 apps
  1851. typedef struct _PLUGUI_INFO
  1852. {
  1853. unsigned uMajorVersion : 8; // Used to indicate App's major version number
  1854. unsigned uOleServer : 1; // BOOL, TRUE if this is an OLE process
  1855. unsigned uUnused : 23; // not used
  1856. } PLUGUI_INFO;
  1857. typedef union _PLUGUI_QUERY
  1858. {
  1859. UINT uQueryVal;
  1860. PLUGUI_INFO PlugUIInfo;
  1861. } PLUGUI_QUERY;
  1862. //===========================================================================
  1863. // Image dragging API (definitely private)
  1864. //===========================================================================
  1865. // DOC'ed for DOJ Compliance
  1866. //Contains the drag context header.
  1867. // Must be pack1 since it's persisted into a stream that travels between
  1868. // processes.
  1869. typedef struct {
  1870. BOOL fImage;
  1871. BOOL fLayered;
  1872. POINT ptOffset;
  1873. } DragContextHeader;
  1874. #define DAD_InitScrollData(pad) (pad)->bFull = FALSE, (pad)->iNextSample = 0, (pad)->dwLastScroll = 0
  1875. // DOC'ed for DOJ Compliance
  1876. SHSTDAPI_(BOOL) DAD_DragEnter(HWND hwndTarget);
  1877. // DOC'ed for DOJ Compliance
  1878. SHSTDAPI_(BOOL) DAD_SetDragImageFromListView(HWND hwndLV, POINT ptOffset);
  1879. SHSTDAPI_(void) DAD_InvalidateCursors(void);
  1880. //----------------------------------------------------------------------------
  1881. // CABINETSTATE holds the global configuration for the Explorer and its cohorts.
  1882. //
  1883. // Originally the cLength was an 'int', it is now two words, allowing us to
  1884. // specify a version number.
  1885. //----------------------------------------------------------------------------
  1886. // DOC'ed for DOJ Compliance
  1887. // RUN FILE RETURN values from notify message
  1888. #define RFR_NOTHANDLED 0
  1889. #define RFR_SUCCESS 1
  1890. #define RFR_FAILURE 2
  1891. #define PathGetExtensionORD 158
  1892. SHSTDAPI_(LPTSTR) PathGetExtension(LPCTSTR pszPath, LPTSTR pszExtension, int cchExt);
  1893. // DOC'ed for DOJ Compliance
  1894. SHSTDAPI_(BOOL) PathGetShortName(LPCTSTR pszLongName, LPTSTR pszShortName, UINT cbShortName);
  1895. SHSTDAPI_(BOOL) PathGetLongName(LPCTSTR pszShortName, LPTSTR pszLongName, UINT cbLongName);
  1896. SHSTDAPI_(BOOL) PathDirectoryExists(LPCTSTR pszDir);
  1897. // DOC'ed for DOJ Compliance
  1898. SHSTDAPI_(LPTSTR) PathGetNextComponent(LPCTSTR pszPath, LPTSTR pszComponent);
  1899. // DOC'ed for DOJ Compliance
  1900. SHSTDAPI_(BOOL) PathIsEqualOrSubFolder(LPCTSTR pszFolder, LPCTSTR pszSubFolder);
  1901. // DOC'ed for DOJ Compliance
  1902. SHSTDAPI_(BOOL) PathIsTemporaryA(LPCSTR pszPath);
  1903. SHSTDAPI_(BOOL) PathIsTemporaryW(LPCWSTR pszPath);
  1904. #ifdef UNICODE
  1905. #define PathIsTemporary PathIsTemporaryW
  1906. #else
  1907. #define PathIsTemporary PathIsTemporaryA
  1908. #endif // !UNICODE
  1909. // DOC'ed for DOJ Compliance
  1910. SHSTDAPI_(int) PathCleanupSpecEx(LPCTSTR pszDir, LPTSTR pszSpec);
  1911. // DOC'ed for DOJ Compliance
  1912. SHSTDAPI_(BOOL) ParseField(LPCTSTR szData, int n, LPTSTR szBuf, int iBufLen);
  1913. // Needed for RunFileDlg
  1914. #define RFD_NOBROWSE 0x00000001
  1915. #define RFD_NODEFFILE 0x00000002
  1916. #define RFD_USEFULLPATHDIR 0x00000004
  1917. #define RFD_NOSHOWOPEN 0x00000008
  1918. #define RFD_WOW_APP 0x00000010
  1919. #define RFD_NOSEPMEMORY_BOX 0x00000020
  1920. SHSTDAPI_(int) RunFileDlg(HWND hwnd, HICON hIcon, LPCTSTR pszWorkingDir, LPCTSTR pszTitle,
  1921. LPCTSTR pszPrompt, DWORD dwFlags);
  1922. // DOC'ed for DOJ Compliance
  1923. SHSTDAPI_(int) RealDriveTypeFlags(int iDrive, BOOL fOKToHitNet);
  1924. // DOC'ed for DOJ compliance
  1925. SHSTDAPI_(void) InvalidateDriveType(int iDrive);
  1926. // DOC'ed for DOJ Compliance
  1927. //
  1928. // Constants used for dwNumFmtFlags argument in Int64ToString and LargeIntegerToString.
  1929. //
  1930. #define NUMFMT_IDIGITS 0x00000001
  1931. #define NUMFMT_ILZERO 0x00000002
  1932. #define NUMFMT_SGROUPING 0x00000004
  1933. #define NUMFMT_SDECIMAL 0x00000008
  1934. #define NUMFMT_STHOUSAND 0x00000010
  1935. #define NUMFMT_INEGNUMBER 0x00000020
  1936. #define NUMFMT_ALL 0xFFFFFFFF
  1937. SHSTDAPI_(int) LargeIntegerToString(LARGE_INTEGER *pN, LPTSTR szOutStr, UINT nSize, BOOL bFormat, NUMBERFMT *pFmt, DWORD dwNumFmtFlags);
  1938. SHSTDAPI_(int) Int64ToString(_int64 n, LPTSTR szOutStr, UINT nSize, BOOL bFormat, NUMBERFMT *pFmt, DWORD dwNumFmtFlags);
  1939. //-------- drive type identification --------------
  1940. // iDrive drive index (0=A, 1=B, ...)
  1941. //
  1942. #define DRIVE_CDROM 5 // extended DriveType() types
  1943. #define DRIVE_RAMDRIVE 6
  1944. #define DRIVE_TYPE 0x000F // type masek
  1945. #define DRIVE_SLOW 0x0010 // drive is on a slow link
  1946. #define DRIVE_LFN 0x0020 // drive supports LFNs
  1947. #define DRIVE_AUTORUN 0x0040 // drive has AutoRun.inf in root.
  1948. #define DRIVE_AUDIOCD 0x0080 // drive is a AudioCD
  1949. #define DRIVE_AUTOOPEN 0x0100 // should *always* auto open on insert
  1950. #define DRIVE_NETUNAVAIL 0x0200 // Network drive that is not available
  1951. #define DRIVE_SHELLOPEN 0x0400 // should auto open on insert, if shell has focus
  1952. #define DRIVE_SECURITY 0x0800 // Supports ACLs
  1953. #define DRIVE_COMPRESSED 0x1000 // Root of volume is compressed
  1954. #define DRIVE_ISCOMPRESSIBLE 0x2000 // Drive supports compression (not nescesarrily compressed)
  1955. #define DRIVE_DVD 0x4000 // drive is a DVD
  1956. #define DriveTypeFlags(iDrive) DriveType('A' + (iDrive))
  1957. #define DriveIsSlow(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_SLOW)
  1958. #define DriveIsLFN(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_LFN)
  1959. #define DriveIsAutoRun(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_AUTORUN)
  1960. #define DriveIsAutoOpen(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_AUTOOPEN)
  1961. #define DriveIsShellOpen(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_SHELLOPEN)
  1962. #define DriveIsAudioCD(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_AUDIOCD)
  1963. #define DriveIsNetUnAvail(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_NETUNAVAIL)
  1964. #define DriveIsSecure(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_SECURITY)
  1965. #define DriveIsCompressed(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_COMPRESSED)
  1966. #define DriveIsCompressible(iDrive) (RealDriveTypeFlags(iDrive, TRUE) & DRIVE_ISCOMPRESSIBLE)
  1967. #define DriveIsDVD(iDrive) (RealDriveTypeFlags(iDrive, FALSE) & DRIVE_DVD)
  1968. #define IsCDRomDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_CDROM)
  1969. #define IsRamDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_RAMDRIVE)
  1970. #define IsRemovableDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_REMOVABLE)
  1971. #define IsRemoteDrive(iDrive) (RealDriveType(iDrive, FALSE) == DRIVE_REMOTE)
  1972. //
  1973. // For SHCreateDefClassObject
  1974. //
  1975. typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown *pUnkOuter, REFIID riid, void **ppvObject);
  1976. SHSTDAPI SHCreateDefClassObject(REFIID riid, void **ppv, LPFNCREATEINSTANCE lpfn, UINT *pcRefDll, REFIID riidInstance);
  1977. // DOC'ed for DOJ compliance
  1978. typedef HANDLE HNRES; // for SHGetNetResource
  1979. SHSTDAPI_(UINT) SHGetNetResource(HNRES hnres, UINT iItem, LPNETRESOURCE pnres, UINT cbMax);
  1980. #define SHOP_TYPEMASK 0x00000007
  1981. #define SHOP_MODAL 0x80000000
  1982. SHSTDAPI_(DWORD) SHChkDskDrive(HWND hwnd, UINT drive);
  1983. // DOC'ed for DOJ compliance
  1984. //====== SEMI-PRIVATE API ===============================
  1985. // DOC'ed for DOJ compliance
  1986. WINSHELLAPI HPSXA SHCreatePropSheetExtArrayEx( HKEY hKey, LPCTSTR pszSubKey, UINT max_iface, IDataObject * pdo );
  1987. //====== SEMI-PRIVATE API ORDINALS ===============================
  1988. // This is the list of semi-private ordinals we semi-publish.
  1989. #define SHGetNetResourceORD 69
  1990. #define SHObjectPropertiesORD 178
  1991. #define SHAddFromPropSheetExtArrayORD 167
  1992. #define SHCreatePropSheetExtArrayORD 168
  1993. #define SHDestroyPropSheetExtArrayORD 169
  1994. #define SHReplaceFromPropSheetExtArrayORD 170
  1995. #define SHCreateDefClassObjectORD 70
  1996. #define SHEXP_SHGETNETRESOURCE MAKEINTRESOURCE(SHGetNetResourceORD)
  1997. #define SHEXP_SHADDFROMPROPSHEETEXTARRAY MAKEINTRESOURCE(SHAddFromPropSheetExtArrayORD)
  1998. #define SHEXP_SHCREATEPROPSHEETEXTARRAY MAKEINTRESOURCE(SHCreatePropSheetExtArrayORD)
  1999. #define SHEXP_SHDESTROYPROPSHEETEXTARRAY MAKEINTRESOURCE(SHDestroyPropSheetExtArrayORD)
  2000. #define SHEXP_SHREPLACEFROMPROPSHEETEXTARRAY MAKEINTRESOURCE(SHReplaceFromPropSheetExtArrayORD)
  2001. #define SHEXP_SHCREATEDEFCLASSOBJECT MAKEINTRESOURCE(SHCreateDefClassObjectORD)
  2002. // This avoids duplicate definition problems in the net\config project
  2003. // which defines *some* of its own PIDL utility functions, but depends on
  2004. // us for others (ILClone())
  2005. // DOC'ed for DOJ Compliance
  2006. #ifndef AVOID_NET_CONFIG_DUPLICATES
  2007. //===========================================================================
  2008. // ITEMIDLIST
  2009. //===========================================================================
  2010. // flags for ILGetDisplayNameEx
  2011. #define ILGDN_FULLNAME 0
  2012. #define ILGDN_ITEMONLY 1
  2013. #define ILGDN_INFOLDER 2
  2014. // DOC'ed for DOJ Compliance
  2015. #define ILIsEmpty(pidl) ((pidl) == NULL || (pidl)->mkid.cb==0)
  2016. SHSTDAPI_(LPITEMIDLIST) ILCreate(void);
  2017. // DOC'ed for DOJ Compliance
  2018. SHSTDAPI_(void) ILGlobalFree(LPITEMIDLIST pidl);
  2019. SHSTDAPI_(BOOL) ILGetDisplayName(LPCITEMIDLIST pidl, LPTSTR pszName);
  2020. SHSTDAPI_(BOOL) ILGetDisplayNameEx(IShellFolder *psfRoot, LPCITEMIDLIST pidl, LPTSTR pszName, int fType);
  2021. // DOC'ed for DOJ Compliance
  2022. SHSTDAPI_(LPITEMIDLIST) ILGlobalClone(LPCITEMIDLIST pidl);
  2023. // DOC'ed for DOJ Compliance
  2024. SHSTDAPI ILLoadFromFile(HFILE hfile, LPITEMIDLIST *pidl);
  2025. SHSTDAPI ILSaveToFile(HFILE hfile, LPCITEMIDLIST pidl);
  2026. // DOC'ed for DOJ Compliance
  2027. // helper macros
  2028. #define ILCreateFromID(pmkid) ILAppendID(NULL, pmkid, TRUE)
  2029. #endif // AVOID_NET_CONFIG_DUPLICATES
  2030. // WARNING: this interface is not supported on the current platform, just downlevel
  2031. #undef INTERFACE
  2032. #define INTERFACE IWebViewOCWinMan
  2033. DECLARE_INTERFACE_(IWebViewOCWinMan, IUnknown)
  2034. {
  2035. // *** IUnknown methods ***
  2036. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2037. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2038. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2039. // *** IWebViewOCWinMan methods ***
  2040. STDMETHOD(SwapWindow) (THIS_ HWND hwndLV, IWebViewOCWinMan **pocWinMan) PURE;
  2041. };
  2042. // DOC'ed for DOJ compliance
  2043. // Classic Win95 policy bits. Do NOT add any more bits in
  2044. // this range. See the ranges below to add new policies.
  2045. // | |
  2046. // v v
  2047. // Values starting at 4000001 are treated as raw INTs. New
  2048. // *shell-specific* policies (NOT browser policies) should
  2049. // be added in this range. Use SHRestricted() with these bits.
  2050. // | |
  2051. // v v
  2052. //--- UNUSED -- USE THIS SPACE --- 0x4000006C to 0x4000006E
  2053. // Browser restrictions (parameter for SHRestricted2)
  2054. //
  2055. // The browser restrictions are divided into two ranges, "explorer restrictions" and
  2056. // "infodelivery restrictions". Explorer restrictions are kept under "Software\\Microsoft\\
  2057. // Windows\\CurrentVersion\\Policies\\Explorer," while infodelivery restrictions are kept
  2058. // under "Software\\Policies\\Microsoft\\Internet Explorer\\Infodelivery\\Restrictions."
  2059. //
  2060. // **NOTE**: SHRestricted2 assumes each range is continuous.
  2061. typedef enum {
  2062. // explorer restrictions
  2063. REST_BROWSER_NONE = 0x00000000, // REST_EXPLORER_FIRST
  2064. REST_NOTOOLBARCUSTOMIZE = 0x00000001,
  2065. REST_NOBANDCUSTOMIZE = 0x00000002,
  2066. REST_SMALLICONS = 0x00000003,
  2067. REST_LOCKICONSIZE = 0x00000004,
  2068. REST_SPECIFYDEFAULTBUTTONS = 0x00000005,
  2069. REST_BTN_BACK = 0x00000006,
  2070. REST_BTN_FORWARD = 0x00000007,
  2071. REST_BTN_STOPDOWNLOAD = 0x00000008,
  2072. REST_BTN_REFRESH = 0x00000009,
  2073. REST_BTN_HOME = 0x0000000A,
  2074. REST_BTN_SEARCH = 0x0000000B,
  2075. REST_BTN_HISTORY = 0x0000000C,
  2076. REST_BTN_FAVORITES = 0x0000000D,
  2077. REST_BTN_ALLFOLDERS = 0x0000000E,
  2078. REST_BTN_THEATER = 0x0000000F,
  2079. REST_BTN_TOOLS = 0x00000010,
  2080. REST_BTN_MAIL = 0x00000011,
  2081. REST_BTN_FONTS = 0x00000012,
  2082. REST_BTN_PRINT = 0x00000013,
  2083. REST_BTN_EDIT = 0x00000014,
  2084. REST_BTN_DISCUSSIONS = 0x00000015,
  2085. REST_BTN_CUT = 0x00000016,
  2086. REST_BTN_COPY = 0x00000017,
  2087. REST_BTN_PASTE = 0x00000018,
  2088. REST_BTN_ENCODING = 0x00000019,
  2089. REST_NoUserAssist = 0x0000001A,
  2090. REST_NoWindowsUpdate = 0x0000001B,
  2091. REST_NoExpandedNewMenu = 0x0000001C,
  2092. REST_NOFILEURL = 0x0000001D,
  2093. REST_BTN_PRINTPREVIEW = 0X0000001E,
  2094. REST_BTN_MEDIABAR = 0x0000001F, // REST_EXPLORER_LAST
  2095. // infodelivery restrictions
  2096. REST_NoChannelUI = 0x50000001, // REST_INFO_FIRST
  2097. REST_NoAddingChannels = 0x50000002,
  2098. REST_NoEditingChannels = 0x50000003,
  2099. REST_NoRemovingChannels = 0x50000004,
  2100. REST_NoAddingSubscriptions = 0x50000005,
  2101. REST_NoEditingSubscriptions = 0x50000006,
  2102. REST_NoRemovingSubscriptions = 0x50000007,
  2103. REST_NoChannelLogging = 0x50000008,
  2104. REST_NoManualUpdates = 0x50000009,
  2105. REST_NoScheduledUpdates = 0x5000000A,
  2106. REST_NoUnattendedDialing = 0x5000000B,
  2107. REST_NoChannelContent = 0x5000000C,
  2108. REST_NoSubscriptionContent = 0x5000000D,
  2109. REST_NoEditingScheduleGroups = 0x5000000E,
  2110. REST_MaxChannelSize = 0x5000000F,
  2111. REST_MaxSubscriptionSize = 0x50000010,
  2112. REST_MaxChannelCount = 0x50000011,
  2113. REST_MaxSubscriptionCount = 0x50000012,
  2114. REST_MinUpdateInterval = 0x50000013,
  2115. REST_UpdateExcludeBegin = 0x50000014,
  2116. REST_UpdateExcludeEnd = 0x50000015,
  2117. REST_UpdateInNewProcess = 0x50000016,
  2118. REST_MaxWebcrawlLevels = 0x50000017,
  2119. REST_MaxChannelLevels = 0x50000018,
  2120. REST_NoSubscriptionPasswords = 0x50000019,
  2121. REST_NoBrowserSaveWebComplete = 0x5000001A,
  2122. REST_NoSearchCustomization = 0x5000001B,
  2123. REST_NoSplash = 0x5000001C, // REST_INFO_LAST
  2124. // restrictions ported from SP2
  2125. REST_NoFileOpen = 0x60000001, // REST_BROWSER_FIRST
  2126. REST_NoFileNew = 0x60000002,
  2127. REST_NoBrowserSaveAs = 0x60000003,
  2128. REST_NoBrowserOptions = 0x60000004,
  2129. REST_NoFavorites = 0x60000005,
  2130. REST_NoSelectDownloadDir = 0x60000006,
  2131. REST_NoBrowserContextMenu = 0x60000007,
  2132. REST_NoBrowserClose = 0x60000008,
  2133. REST_NoOpeninNewWnd = 0x60000009,
  2134. REST_NoTheaterMode = 0x6000000A,
  2135. REST_NoFindFiles = 0x6000000B,
  2136. REST_NoViewSource = 0x6000000C,
  2137. REST_GoMenu = 0x6000000D,
  2138. REST_NoToolbarOptions = 0x6000000E,
  2139. REST_NoHelpItem_TipOfTheDay = 0x6000000F,
  2140. REST_NoHelpItem_NetscapeHelp = 0x60000010,
  2141. REST_NoHelpItem_Tutorial = 0x60000011,
  2142. REST_NoHelpItem_SendFeedback = 0x60000012,
  2143. REST_AlwaysPromptWhenDownload = 0x60000013,
  2144. REST_NoNavButtons = 0x60000014,
  2145. REST_NoHelpMenu = 0x60000015,
  2146. REST_NoBrowserBars = 0x60000016,
  2147. REST_NoToolBar = 0x60000017,
  2148. REST_NoAddressBar = 0x60000018,
  2149. REST_NoLinksBar = 0x60000019,
  2150. REST_NoPrinting = 0x60000020,
  2151. REST_No_LaunchMediaBar = 0x60000021,
  2152. REST_No_MediaBarOnlineContent = 0x60000022, // REST_BROWSER_LAST
  2153. } BROWSER_RESTRICTIONS;
  2154. #define REST_EXPLORER_FIRST REST_BROWSER_NONE
  2155. #define REST_EXPLORER_LAST REST_BTN_MEDIABAR
  2156. #define REST_INFO_FIRST REST_NoChannelUI
  2157. #define REST_INFO_LAST REST_NoSplash
  2158. #define REST_BROWSER_FIRST REST_NoFileOpen
  2159. #define REST_BROWSER_LAST REST_No_MediaBarOnlineContent
  2160. // codes for REST_BTN policies
  2161. #define RESTOPT_BTN_STATE_DEFAULT 0 // must be zero, else break browseui\itbar.cpp assumption
  2162. #define RESTOPT_BTN_STATE_VISIBLE 1
  2163. #define RESTOPT_BTN_STATE_HIDDEN 2
  2164. // REST_INTELLIMENUS
  2165. #define RESTOPT_INTELLIMENUS_USER 0
  2166. #define RESTOPT_INTELLIMENUS_DISABLED 1 // Match Restriction assumption: 1 == Off
  2167. #define RESTOPT_INTELLIMENUS_ENABLED 2
  2168. // FTP Exports
  2169. STDAPI IsIEDefautlFTPClient(void);
  2170. STDAPI MakeIEDefautlFTPClient(void);
  2171. STDAPI RestoreFTPClient(void);
  2172. SHSTDAPI_(void) SHSettingsChanged(WPARAM wParam, LPARAM lParam);
  2173. SHSTDAPI_(BOOL) SHIsBadInterfacePtr(LPCVOID pv, UINT cbVtbl);
  2174. // DOC'ed for DOJ Compliance
  2175. SHSTDAPI_(void) SHHandleDiskFull(HWND hwnd, int idDrive);
  2176. // DOC'ed for DOJ compliance
  2177. SHSTDAPI_(BOOL) SHFindComputer(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlSaveFile);
  2178. // DOC'ed for DOJ Compliance
  2179. SHSTDAPI_(BOOL) Win32CreateDirectory(LPCTSTR pszPath, SECURITY_ATTRIBUTES *psa);
  2180. SHSTDAPI_(BOOL) Win32RemoveDirectory(LPCTSTR pszPath);
  2181. // DOC'ed for DOJ Compliance
  2182. SHSTDAPI_(void) SHUpdateRecycleBinIcon();
  2183. // DOC'ed for DOJ Compliance
  2184. SHSTDAPI_(LPITEMIDLIST) SHLogILFromFSIL(LPCITEMIDLIST pidlFS);
  2185. SHSTDAPI_(BOOL) StrRetToStrN(LPTSTR szOut, UINT uszOut, STRRET *pStrRet, LPCITEMIDLIST pidl);
  2186. SHSTDAPI_(DWORD) SHWaitForFileToOpen(LPCITEMIDLIST pidl, UINT uOptions, DWORD dwtimeout);
  2187. SHSTDAPI_(void) SetAppStartingCursor(HWND hwnd, BOOL fSet);
  2188. // DOC'ed for DOJ compliance
  2189. SHSTDAPI_(void *) SHGetHandlerEntry(LPCTSTR szHandler, LPCSTR szProcName, HINSTANCE *lpModule);
  2190. // This is sent to a browser windows letting them know that we have
  2191. // opened a folder, i.e. the folder open operation is done.
  2192. // Call RegisterWindowMessage to get the ID
  2193. #define SH_FILEOPENED TEXT("ShellFileOpened")
  2194. // DOC'ed for DOJ compliance
  2195. SHSTDAPI SHCreatePropertyBag(REFIID riid, void **ppv);
  2196. SHSTDAPI_(DWORD) SHNetConnectionDialog(HWND hwnd, LPTSTR pszRemoteName, DWORD dwType);
  2197. // DOC'ed for DOJ Compliance
  2198. SHSTDAPI_(int) SHLookupIconIndexA(LPCSTR pszFile, int iIconIndex, UINT uFlags);
  2199. // DOC'ed for DOJ Compliance
  2200. SHSTDAPI_(int) SHLookupIconIndexW(LPCWSTR pszFile, int iIconIndex, UINT uFlags);
  2201. #ifdef UNICODE
  2202. #define SHLookupIconIndex SHLookupIconIndexW
  2203. #else
  2204. #define SHLookupIconIndex SHLookupIconIndexA
  2205. #endif // !UNICODE
  2206. SHSTDAPI_(UINT) SHExtractIconsA(LPCSTR pszFileName, int nIconIndex, int cxIcon, int cyIcon,
  2207. HICON *phicon, UINT *piconid, UINT nIcons, UINT flags);
  2208. SHSTDAPI_(UINT) SHExtractIconsW(LPCWSTR pszFileName, int nIconIndex, int cxIcon, int cyIcon,
  2209. HICON *phicon, UINT *piconid, UINT nIcons, UINT flags);
  2210. #ifdef UNICODE
  2211. #define SHExtractIcons SHExtractIconsW
  2212. #else
  2213. #define SHExtractIcons SHExtractIconsA
  2214. #endif // !UNICODE
  2215. SHSTDAPI SHGetAssociations(LPCITEMIDLIST pidl, void **ppvQueryAssociations);
  2216. #define SHLookupIconIndexAORD 7
  2217. #define SHLookupIconIndexWORD 8
  2218. #ifdef UNICODE
  2219. #define SHLookupIconIndexORD SHLookupIconIndexWORD
  2220. #else
  2221. #define SHDefExtractIcon SHDefExtractIconA
  2222. #endif
  2223. // BUGBUG (scotth): temporary. move to shdocvw.
  2224. // OpenAsInfo flags
  2225. #define OAIF_ALLOW_REGISTRATION 0x00000001 // enable the "always use this file" checkbox (NOTE if you dont pass this, it will be disabled)
  2226. #define OAIF_REGISTER_EXT 0x00000002 // do the registration after the user hits "ok"
  2227. #define OAIF_EXEC 0x00000004 // execute file after registering
  2228. #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)
  2229. #define OAIF_ALL (OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC | OAIF_FORCE_REGISTRATION) //
  2230. #include <pshpack8.h>
  2231. typedef struct _openasinfo
  2232. {
  2233. LPCTSTR pcszFile; // [in] file name
  2234. LPCTSTR pcszClass; // [in] file class description. NULL means
  2235. // use pcszFile's extension
  2236. DWORD dwInFlags; // [in] input flags from OAIF_*
  2237. TCHAR szApp[MAX_PATH]; // [out] application selected
  2238. } OPENASINFO, * POPENASINFO;
  2239. #include <poppack.h> /* Return to byte packing */
  2240. SHSTDAPI OpenAsDialog(HWND hwnd, POPENASINFO poainfo);
  2241. //
  2242. // Interface pointer validation
  2243. //
  2244. #define IsBadInterfacePtr(pitf, ITF) SHIsBadInterfacePtr(pitf, sizeof(ITF##Vtbl))
  2245. //===========================================================================
  2246. // Another block of private API
  2247. //===========================================================================
  2248. // indexes into the shell image lists (Shell_GetImageList) for default images
  2249. // If you add to this list, you also need to update II_LASTSYSICON!
  2250. #define II_DOCNOASSOC 0 // document (blank page) (not associated)
  2251. #define II_DOCUMENT 1 // document (with stuff on the page)
  2252. #define II_APPLICATION 2 // application (exe, com, bat)
  2253. #define II_FOLDER 3 // folder (plain)
  2254. #define II_FOLDEROPEN 4 // folder (open)
  2255. #define II_DRIVE525 5
  2256. #define II_DRIVE35 6
  2257. #define II_DRIVEREMOVE 7
  2258. #define II_DRIVEFIXED 8
  2259. #define II_DRIVENET 9
  2260. #define II_DRIVENETDISABLED 10
  2261. #define II_DRIVECD 11
  2262. #define II_DRIVERAM 12
  2263. #define II_WORLD 13
  2264. #define II_NETWORK 14
  2265. #define II_SERVER 15
  2266. #define II_PRINTER 16
  2267. #define II_MYNETWORK 17
  2268. #define II_GROUP 18
  2269. // Startmenu images.
  2270. #define II_STPROGS 19
  2271. #define II_STDOCS 20
  2272. #define II_STSETNGS 21
  2273. #define II_STFIND 22
  2274. #define II_STHELP 23
  2275. #define II_STRUN 24
  2276. #define II_STSUSPEND 25
  2277. #define II_STEJECT 26
  2278. #define II_STSHUTD 27
  2279. #define II_SHARE 28
  2280. #define II_LINK 29
  2281. #define II_SLOWFILE 30
  2282. #define II_RECYCLER 31
  2283. #define II_RECYCLERFULL 32
  2284. #define II_RNA 33
  2285. #define II_DESKTOP 34
  2286. // More startmenu image.
  2287. #define II_STCPANEL 35
  2288. #define II_STSPROGS 36
  2289. #define II_STPRNTRS 37
  2290. #define II_STFONTS 38
  2291. #define II_STTASKBR 39
  2292. #define II_CDAUDIO 40
  2293. #define II_TREE 41
  2294. #define II_STCPROGS 42
  2295. #define II_STFAVORITES 43
  2296. #define II_STLOGOFF 44
  2297. #define II_STFLDRPROP 45
  2298. #define II_WINUPDATE 46
  2299. #define II_MU_STSECURITY 47
  2300. #define II_MU_STDISCONN 48
  2301. #ifdef WINNT // hydra specific id
  2302. #define II_LASTSYSICON II_MU_STDISCONN
  2303. #else
  2304. // Last system image list icon index - used by icon cache manager
  2305. #define II_LASTSYSICON II_WINUPDATE
  2306. #endif
  2307. // Overlay indexes
  2308. #define II_OVERLAYFIRST II_SHARE
  2309. #define II_OVERLAYLAST II_SLOWFILE
  2310. #define II_NDSCONTAINER 72
  2311. #define II_SERVERSHARE 73
  2312. SHSTDAPI_(BOOL) FileIconInit( BOOL fRestoreCache );
  2313. // DOC'ed for DOJ compliance
  2314. SHSTDAPI_(void) Shell_SysColorChange(void);
  2315. // DOC'ed for DOJ compliance
  2316. //
  2317. // OLE string
  2318. //
  2319. SHSTDAPI_(int) OleStrToStrN(LPTSTR, int, LPCOLESTR, int);
  2320. SHSTDAPI_(int) StrToOleStrN(LPOLESTR, int, LPCTSTR, int);
  2321. SHSTDAPI_(int) OleStrToStr(LPTSTR, LPCOLESTR);
  2322. SHSTDAPI_(int) StrToOleStr(LPOLESTR, LPCTSTR);
  2323. #define LIPF_ENABLE 0x00000001 // create the object (vs release the object)
  2324. #define LIPF_HOLDREF 0x00000002 // hold ref on object after creation (vs release immediately)
  2325. typedef struct
  2326. {
  2327. CLSID clsid;
  2328. DWORD dwFlags;
  2329. } LOADINPROCDATA, *PLOADINPROCDATA;
  2330. // Tray CopyData Messages
  2331. #define TCDM_APPBAR 0x00000000
  2332. #define TCDM_NOTIFY 0x00000001
  2333. #define TCDM_LOADINPROC 0x00000002
  2334. //
  2335. // Private QueryContextMenuFlag passed from Bands
  2336. //
  2337. #define CMF_BANDCMD 0x00020000 // Install Band Context menu commands
  2338. //
  2339. // Functions to help the cabinets sync to each other
  2340. // uOptions parameter to SHWaitForFileOpen
  2341. //
  2342. #define WFFO_WAITTIME 10000L
  2343. #define WFFO_ADD 0x0001
  2344. #define WFFO_REMOVE 0x0002
  2345. #define WFFO_WAIT 0x0004
  2346. #define WFFO_SIGNAL 0x0008
  2347. //
  2348. // NOTES: IShellService is used when we share a service component
  2349. // (which implements a certain interface) among multiple clients
  2350. // (such as IE 3.0 and Explorer). The client always CoCreateInstance
  2351. // it and call SetOwner(this). When the client is going away
  2352. // (typically when the window is closed), it calls SetOwner(NULL)
  2353. // to let the service object releases the reference to the owner
  2354. // object.
  2355. //
  2356. #undef INTERFACE
  2357. #define INTERFACE IShellService
  2358. DECLARE_INTERFACE_(IShellService, IUnknown)
  2359. {
  2360. // *** IUnknown methods ***
  2361. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2362. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2363. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2364. // *** IShellService specific methods ***
  2365. STDMETHOD(SetOwner)(THIS_ struct IUnknown* punkOwner) PURE;
  2366. };
  2367. //
  2368. // NOTES: IHistSFPrivate is used when manipulating a history IShellFolder object
  2369. // It includes methods for pointing the shell folder at the correct virtual
  2370. // directory. QIing for IHistSFPrivate also guarantees the pidl format can
  2371. // safely be delved into to access the INTERNET_CACHE_ENTRY_INFO structure
  2372. //
  2373. #undef INTERFACE
  2374. #define INTERFACE IHistSFPrivate
  2375. DECLARE_INTERFACE_(IHistSFPrivate, IUnknown)
  2376. {
  2377. // *** IUnknown methods ***
  2378. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2379. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2380. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2381. // *** IHistPrivate specific methods ***
  2382. STDMETHOD(SetCachePrefix)(THIS_ LPCWSTR pszCachePrefix) PURE;
  2383. STDMETHOD(SetDomain)(THIS_ LPCWSTR pszDomain) PURE;
  2384. STDMETHOD(WriteHistory)(THIS_ LPCWSTR pszPrefixedUrl, FILETIME ftExpires, FILETIME ftModified, LPITEMIDLIST * ppidlSelect) PURE;
  2385. STDMETHOD(ClearHistory) (THIS) PURE;
  2386. };
  2387. //
  2388. // NOTES: IShellFolderViewType lets a shell folder support different "views" on
  2389. // its contents (meaning different hierarchical layouts of its data) with
  2390. // the default "view" being the one the shell folder displays normally.
  2391. // This enumerator returns pidls that are special hidden folders at the
  2392. // top level of the shell folder (which are not otherwise enumerated).
  2393. #undef INTERFACE
  2394. #define INTERFACE IShellFolderViewType
  2395. DECLARE_INTERFACE_(IShellFolderViewType, IUnknown)
  2396. {
  2397. // *** IUnknown methods ***
  2398. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2399. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2400. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2401. // *** IShellFolderViewType Methods ***
  2402. // NOTE: "Views" are seen by the user as hidden folders off the
  2403. // root (represented by pidls). Whenever appropriate, the
  2404. // default view (coming off the root folder) is represented
  2405. // as the NULL *or* empty pidl.
  2406. // EnumViews:
  2407. // Return an enumerator which will give out one pidl for every extended view.
  2408. STDMETHOD(EnumViews)(THIS_ ULONG grfFlags, IEnumIDList **ppenum) PURE;
  2409. // GetDefaultViewName:
  2410. // Return the name of the default view. The names of the other views
  2411. // can be retrieved by calling GetDisplayNameOf.
  2412. STDMETHOD(GetDefaultViewName)(THIS_ DWORD uFlags, LPWSTR *ppwszName) PURE;
  2413. STDMETHOD(GetViewTypeProperties)(THIS_ LPCITEMIDLIST pidl, DWORD *pdwFlags) PURE;
  2414. // TranslateViewPidl:
  2415. // Attempt to take a pidl represented in one heirarchical representation of
  2416. // the shell folder, and find it in a different representation.
  2417. // pidl should be relative to the root folder.
  2418. // Remember to ILFree ppidlOut
  2419. STDMETHOD(TranslateViewPidl)(THIS_ LPCITEMIDLIST pidl, LPCITEMIDLIST pidlView, LPITEMIDLIST *ppidlOut) PURE;
  2420. };
  2421. #define SFVTFLAG_NOTIFY_CREATE 0x00000001
  2422. #define SFVTFLAG_NOTIFY_RESORT 0x00000002
  2423. //
  2424. // NOTES: IShellFolderSearchableCallback allows the searcher to provide
  2425. // callback routines that moniter the search process
  2426. //
  2427. #undef INTERFACE
  2428. #define INTERFACE IShellFolderSearchableCallback
  2429. DECLARE_INTERFACE_(IShellFolderSearchableCallback, IUnknown)
  2430. {
  2431. // *** IUnknown methods ***
  2432. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2433. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2434. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2435. // *** IShellFolderSearchableCallback Methods ***
  2436. // NOTE: Caller may pass NULL for pVar or pdwFlags as a legal value
  2437. STDMETHOD(RunBegin)(THIS_ DWORD dwReserved) PURE;
  2438. STDMETHOD(RunEnd)(THIS_ DWORD dwReserved) PURE;
  2439. };
  2440. //
  2441. // NOTES: IShellFolderSearchable allows a shell extension to provide a searchable
  2442. // namespace.
  2443. #undef INTERFACE
  2444. #define INTERFACE IShellFolderSearchable
  2445. DECLARE_INTERFACE_(IShellFolderSearchable, IUnknown)
  2446. {
  2447. // *** IUnknown methods ***
  2448. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2449. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2450. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2451. // *** IShellFolderSearchable methods ***
  2452. // FindString -
  2453. // The returned shell folder's enumerator will have any
  2454. // search hits for the given search string.
  2455. // As no flags are currently defined, we suggest you pass
  2456. // NULL as lpdword
  2457. // punkOnAsyncSearch will be QI'd for IShellFolderSearchableCallback
  2458. STDMETHOD(FindString)(THIS_ LPCWSTR pwszTarget, DWORD *pdwFlags,
  2459. IUnknown *punkOnAsyncSearch, LPITEMIDLIST *ppidlOut) PURE;
  2460. // CancelAsyncSearch -
  2461. // Begins the process of cancelling any pending
  2462. // asynchronous search from this pidl.
  2463. // When the search is actually cancelled, RunEnd will be called
  2464. // Returns: S_OK => cancelling, S_FALSE => not running
  2465. STDMETHOD(CancelAsyncSearch) (THIS_ LPCITEMIDLIST pidlSearch, DWORD *pdwFlags) PURE;
  2466. // InvalidateSearch -
  2467. // Makes this pidl no longer a valid portion of the shell folder
  2468. // also does some cleanup of any databases used in the search and
  2469. // will cause the eventual release of the IRunHook callback
  2470. // May cause async search to be cancelled
  2471. STDMETHOD(InvalidateSearch) (THIS_ LPCITEMIDLIST pidlSearch, DWORD *pdwFlags) PURE;
  2472. };
  2473. //
  2474. // NOTES: IBandSiteHelper is used to let explorer's BandSite implementation,
  2475. // which aggregates shdocvw's BandSite, provide callback hooks for shdocvw
  2476. // to call.
  2477. //
  2478. #undef INTERFACE
  2479. #define INTERFACE IBandSiteHelper
  2480. DECLARE_INTERFACE_(IBandSiteHelper, IUnknown)
  2481. {
  2482. // *** IUnknown methods ***
  2483. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2484. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2485. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2486. // *** IBandSiteHelper specific methods ***
  2487. STDMETHOD(LoadFromStreamBS)(THIS_ struct IStream* pstm, REFIID riid, void **ppv) PURE;
  2488. STDMETHOD(SaveToStreamBS)(THIS_ struct IUnknown* punk, struct IStream* pstm) PURE;
  2489. };
  2490. // This private interface is added such that some of the support features that is in
  2491. // SHDocvw's Internet explorer frame automation code, that is not part of publicly
  2492. // defined interfaces can be used in the Explorer code...
  2493. //
  2494. // Note: FindCIE4ConnectionPoint was a hack for IE4. New code should use
  2495. // shlwapi helper functions like IConnectionPoint_Invoke instead.
  2496. //
  2497. #ifdef __cplusplus
  2498. class CIE4ConnectionPoint;
  2499. #else
  2500. typedef struct CIE4ConnectionPoint CIE4ConnectionPoint;
  2501. #endif
  2502. #undef INTERFACE
  2503. #define INTERFACE IExpDispSupport
  2504. DECLARE_INTERFACE_(IExpDispSupport, IUnknown)
  2505. {
  2506. // *** IUnknown methods ***
  2507. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2508. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2509. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2510. // *** IExpDispSupport specific methods ***
  2511. STDMETHOD(FindCIE4ConnectionPoint)(THIS_ REFIID riid, CIE4ConnectionPoint **ppccp) PURE;
  2512. STDMETHOD(OnTranslateAccelerator)(THIS_ MSG *pMsg, DWORD grfModifiers) PURE;
  2513. STDMETHOD(OnInvoke)(THIS_ DISPID dispidMember, REFIID iid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams,
  2514. VARIANT *pVarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr) PURE;
  2515. };
  2516. //
  2517. // This interface is related to the above. It contains functions
  2518. // that would only be implemented on the WebBrowserOC version if IExpDispSupport.
  2519. //
  2520. #undef INTERFACE
  2521. #define INTERFACE IExpDispSupportOC
  2522. DECLARE_INTERFACE_(IExpDispSupportOC, IUnknown)
  2523. {
  2524. // *** IUnknown methods ***
  2525. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2526. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2527. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2528. // *** IExpDispSupportOC specific methods ***
  2529. STDMETHOD(OnOnControlInfoChanged)(THIS) PURE;
  2530. STDMETHOD(GetDoVerbMSG)(THIS_ MSG *pMsg) PURE;
  2531. };
  2532. //===========================================================================
  2533. // IConnectionPointCB interface
  2534. #undef INTERFACE
  2535. #define INTERFACE IConnectionPointCB
  2536. DECLARE_INTERFACE_(IConnectionPointCB, IUnknown)
  2537. {
  2538. // *** IUnknown methods ***
  2539. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2540. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2541. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2542. // *** IConnectionPointCB Methods ***
  2543. STDMETHOD(OnAdvise) (THIS_ REFIID iid, DWORD cSinks, ULONG_PTR dwCookie) PURE;
  2544. STDMETHOD(OnUnadvise) (THIS_ REFIID iid, DWORD cSinks, ULONG_PTR dwCookie) PURE;
  2545. };
  2546. //===========================================================================
  2547. // IDelegateDropTargetCB interface
  2548. //
  2549. // This interface is used by CDelegateDropTarget implementation in shdocvw
  2550. // to generate an IDropTarget implementation that delegates to different
  2551. // IDropTarget implementations depending on the point currently over. The
  2552. // implementor of IDelegateDropTargetCB can handle feedback, scrolling,
  2553. // hit testing, and returning interfaces for ids returned from hit testing.
  2554. //
  2555. // GetWindows returns the hwnd to lock and the hwnd to scroll (not necesarily
  2556. // the same window, as you often want to lock the parent of the window
  2557. // you want to scroll)
  2558. //
  2559. // HitTest should return an id of the object over as well as
  2560. // uptate UI (highlights, etc). if ppt is NULL
  2561. // that means remove any UI as the drag is terminating.
  2562. // this should be able to handle hittesting on points not
  2563. // even inside hwndScroll.
  2564. //
  2565. // GetObject returns an interface for an id returned from HitTest
  2566. //
  2567. // OnDrop gives the CB a chance to take action on the drop.
  2568. // returning S_FALSE from this function prevents
  2569. // CDelegateDropTarget from calling pdt->Drop(...).
  2570. //
  2571. #undef INTERFACE
  2572. #define INTERFACE IDelegateDropTargetCB
  2573. DECLARE_INTERFACE_(IDelegateDropTargetCB, IUnknown)
  2574. {
  2575. // *** IUnknown methods ***
  2576. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2577. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2578. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2579. // *** IDelegateDropTargetCB Methods ***
  2580. STDMETHOD(GetWindows) (THIS_ HWND * phwndLock, HWND * phwndScroll) PURE;
  2581. STDMETHOD(HitTest) (THIS_ LPPOINT ppt, DWORD * pdwId) PURE;
  2582. STDMETHOD(GetObject) (THIS_ DWORD dwId, REFIID riid, void **ppv) PURE;
  2583. STDMETHOD(OnDrop) (THIS_ IDropTarget *pdt, IDataObject *pdtobj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) PURE;
  2584. };
  2585. #ifdef __COMMCTRL_DA_DEFINED__ // we need HDPAs for this interface
  2586. //
  2587. // IOrderList - for ordering info in favorites/channels
  2588. //
  2589. // Typical usage is: GetOrderList, AllocOrderItem, insert into correct
  2590. // position, SetOrderList, and then FreeOrderList.
  2591. //
  2592. typedef struct
  2593. {
  2594. LPITEMIDLIST pidl; // IDlist for this item
  2595. int nOrder; // Ordinal indicating user preference
  2596. DWORD lParam; // store custom order info.
  2597. } ORDERITEM, * PORDERITEM;
  2598. // Values for SortOrderList
  2599. #define OI_SORTBYNAME 0
  2600. #define OI_SORTBYORDINAL 1
  2601. #define OI_MERGEBYNAME 2
  2602. #undef INTERFACE
  2603. #define INTERFACE IOrderList
  2604. DECLARE_INTERFACE_(IOrderList, IUnknown)
  2605. {
  2606. // *** IUnknown methods ***
  2607. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2608. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2609. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2610. // *** IOrderList Methods ***
  2611. STDMETHOD(GetOrderList)(THIS_ HDPA * phdpa) PURE;
  2612. STDMETHOD(SetOrderList)(THIS_ HDPA hdpa, IShellFolder *psf) PURE;
  2613. STDMETHOD(FreeOrderList)(THIS_ HDPA hdpa) PURE;
  2614. STDMETHOD(SortOrderList)(THIS_ HDPA hdpa, DWORD dw) PURE;
  2615. STDMETHOD(AllocOrderItem)(THIS_ PORDERITEM * ppoi, LPCITEMIDLIST pidl) PURE;
  2616. STDMETHOD(FreeOrderItem)(THIS_ PORDERITEM poi) PURE;
  2617. };
  2618. #undef INTERFACE
  2619. #define INTERFACE IOrderList2
  2620. DECLARE_INTERFACE_(IOrderList2, IOrderList)
  2621. {
  2622. // *** IUnknown methods ***
  2623. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  2624. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2625. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2626. // *** IOrderList Methods ***
  2627. STDMETHOD(GetOrderList)(THIS_ HDPA * phdpa) PURE; // BUGBUG (lamadio): This assumes Favorites Menu
  2628. STDMETHOD(SetOrderList)(THIS_ HDPA hdpa, IShellFolder *psf) PURE; // BUGBUG (lamadio): This assumes Favorites Menu
  2629. STDMETHOD(FreeOrderList)(THIS_ HDPA hdpa) PURE;
  2630. STDMETHOD(SortOrderList)(THIS_ HDPA hdpa, DWORD dw) PURE;
  2631. STDMETHOD(AllocOrderItem)(THIS_ PORDERITEM * ppoi, LPCITEMIDLIST pidl) PURE;
  2632. STDMETHOD(FreeOrderItem)(THIS_ PORDERITEM poi) PURE;
  2633. // *** IOrderList2
  2634. STDMETHOD(LoadFromStream)(THIS_ IStream* pstm, HDPA* phdpa, IShellFolder* psf) PURE;
  2635. STDMETHOD(SaveToStream)(THIS_ IStream* pstm, HDPA hdpa) PURE;
  2636. };
  2637. #endif
  2638. //===========================================================================
  2639. // IShellHTMLWindowSupport private COmWindow interface. This should never be exposed.
  2640. typedef struct IHTMLElement IHTMLElement;
  2641. #undef INTERFACE
  2642. #define INTERFACE IShellHTMLWindowSupport
  2643. DECLARE_INTERFACE_(IShellHTMLWindowSupport, IUnknown)
  2644. {
  2645. // *** IUnknown methods ***
  2646. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2647. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2648. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2649. STDMETHOD(ViewReleaseIntelliForms)(THIS) PURE;
  2650. STDMETHOD(ViewReleased)(THIS) PURE;
  2651. STDMETHOD(ViewActivated)(THIS) PURE;
  2652. STDMETHOD(ReadyStateChangedTo)(THIS_ long, IShellView* ) PURE;
  2653. STDMETHOD(CanNavigate)(THIS) PURE;
  2654. STDMETHOD(ActiveElementChanged)(THIS_ IHTMLElement * pHTMLElement) PURE;
  2655. };
  2656. //===========================================================================
  2657. // IShellHTMLWindowSupport2 private COmWindow interface. This should never be exposed.
  2658. #undef INTERFACE
  2659. #define INTERFACE IShellHTMLWindowSupport2
  2660. DECLARE_INTERFACE_(IShellHTMLWindowSupport2, IShellHTMLWindowSupport)
  2661. {
  2662. STDMETHOD(IsGalleryMeta)(THIS_ BOOL bFlag) PURE;
  2663. };
  2664. //===========================================================================
  2665. // IBandProxy private COmWindow interface. This should never be exposed.
  2666. #undef INTERFACE
  2667. #define INTERFACE IBandProxy
  2668. DECLARE_INTERFACE_(IBandProxy, IUnknown)
  2669. {
  2670. // *** IUnknown methods ***
  2671. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2672. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2673. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2674. // *** IBandProxy Methods ***
  2675. STDMETHOD(SetSite) (THIS_ IUnknown* punkSite) PURE;
  2676. STDMETHOD(CreateNewWindow) (THIS_ IUnknown** ppunk) PURE;
  2677. STDMETHOD(GetBrowserWindow) (THIS_ IUnknown** ppunk) PURE;
  2678. STDMETHOD(IsConnected) (THIS) PURE;
  2679. STDMETHOD(NavigateToPIDL) (THIS_ LPCITEMIDLIST pidl) PURE;
  2680. STDMETHOD(NavigateToURL) (THIS_ LPCWSTR wzUrl, VARIANT * Flags) PURE;
  2681. };
  2682. //===========================================================================
  2683. //
  2684. // Make it sure that we include ole2x.h and shlobj.h
  2685. //
  2686. #if defined(__IOleInPlaceSite_FWD_DEFINED__) && defined(FCIDM_SHVIEWFIRST)
  2687. #ifdef HLINK_H
  2688. #include <pshpack8.h>
  2689. typedef struct {
  2690. HWND _hwnd;
  2691. ITravelLog *_ptl;
  2692. IHlinkFrame *_phlf;
  2693. IWebBrowser2 *_pautoWB2; // use this to reference _pauto's IWebBrowser2 functions
  2694. IExpDispSupport *_pautoEDS; // use this to reference _pauto's IExpDispSupport functions
  2695. IShellService *_pautoSS; // use this to reference _pauto's IShellService functions
  2696. int _eSecureLockIcon;
  2697. DWORD _fCreatingViewWindow :1;
  2698. UINT _uActivateState; // this is the state we should use when we go active..
  2699. // this is here so that derived classes can set us for UI or non-UI active
  2700. // The following pidl is used in CBaseBrowser2::GetViewStateStream because
  2701. // at that time, neither _pidlCur nor _pidlPending are initialized.
  2702. LPCITEMIDLIST _pidlNewShellView;
  2703. IOleCommandTarget* _pctView;
  2704. LPITEMIDLIST _pidlCur;
  2705. IShellView *_psv;
  2706. IShellFolder *_psf; // IShellFolder for _psv (used in CVOCBrowser)
  2707. HWND _hwndView;
  2708. LPWSTR _pszTitleCur;
  2709. LPITEMIDLIST _pidlPending;
  2710. IShellView *_psvPending;
  2711. IShellFolder *_psfPending;
  2712. HWND _hwndViewPending;
  2713. LPWSTR _pszTitlePending;
  2714. BOOL _fIsViewMSHTML;
  2715. BOOL _fPrivacyImpacted;
  2716. } BASEBROWSERDATA, *LPBASEBROWSERDATA;
  2717. typedef const BASEBROWSERDATA *LPCBASEBROWSERDATA;
  2718. #include <poppack.h>
  2719. #else
  2720. // so (unref'ed) ifaces will compile (?)
  2721. typedef LPVOID BASEBROWSERDATA;
  2722. typedef LPCVOID *LPBASEBROWSERDATA; // BUGBUG LPVOID?
  2723. typedef LPCVOID *LPCBASEBROWSERDATA;
  2724. #endif // hlink_h
  2725. typedef struct _travellog * PTRAVELLOG;
  2726. #undef INTERFACE
  2727. #define INTERFACE IBrowserService
  2728. DECLARE_INTERFACE_(IBrowserService, IUnknown)
  2729. {
  2730. // *** IUnknown methods ***
  2731. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2732. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2733. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2734. // *** IBrowserService specific methods ***
  2735. STDMETHOD(GetParentSite)(THIS_ struct IOleInPlaceSite** ppipsite) PURE;
  2736. STDMETHOD(SetTitle)(THIS_ IShellView* psv, LPCWSTR pszName) PURE;
  2737. STDMETHOD(GetTitle)(THIS_ IShellView* psv, LPWSTR pszName, DWORD cchName) PURE;
  2738. STDMETHOD(GetOleObject)(THIS_ struct IOleObject** ppobjv) PURE;
  2739. // think about this one.. I'm not sure we want to expose this -- Chee
  2740. // BUGBUG:: Yep soon we should have interface instead.
  2741. // My impression is that we won't document this whole interface???
  2742. STDMETHOD(GetTravelLog)(THIS_ ITravelLog** pptl) PURE;
  2743. STDMETHOD(ShowControlWindow)(THIS_ UINT id, BOOL fShow) PURE;
  2744. STDMETHOD(IsControlWindowShown)(THIS_ UINT id, BOOL *pfShown) PURE;
  2745. STDMETHOD(IEGetDisplayName)(THIS_ LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) PURE;
  2746. STDMETHOD(IEParseDisplayName)(THIS_ UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST * ppidlOut) PURE;
  2747. STDMETHOD(DisplayParseError)(THIS_ HRESULT hres, LPCWSTR pwszPath) PURE;
  2748. STDMETHOD(NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF) PURE;
  2749. STDMETHOD (SetNavigateState)(THIS_ BNSTATE bnstate) PURE;
  2750. STDMETHOD (GetNavigateState) (THIS_ BNSTATE *pbnstate) PURE;
  2751. STDMETHOD (NotifyRedirect) (THIS_ struct IShellView* psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) PURE;
  2752. STDMETHOD (UpdateWindowList) (THIS) PURE;
  2753. STDMETHOD (UpdateBackForwardState) (THIS) PURE;
  2754. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags, DWORD dwFlagMask) PURE;
  2755. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  2756. // Tells if it can navigate now or not.
  2757. STDMETHOD (CanNavigateNow) (THIS) PURE;
  2758. STDMETHOD (GetPidl) (THIS_ LPITEMIDLIST *ppidl) PURE;
  2759. STDMETHOD (SetReferrer) (THIS_ LPITEMIDLIST pidl) PURE;
  2760. STDMETHOD_(DWORD, GetBrowserIndex)(THIS) PURE;
  2761. STDMETHOD (GetBrowserByIndex)(THIS_ DWORD dwID, IUnknown **ppunk) PURE;
  2762. STDMETHOD (GetHistoryObject)(THIS_ IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) PURE;
  2763. STDMETHOD (SetHistoryObject)(THIS_ IOleObject *pole, BOOL fIsLocalAnchor) PURE;
  2764. STDMETHOD (CacheOLEServer)(THIS_ IOleObject *pole) PURE;
  2765. STDMETHOD (GetSetCodePage)(THIS_ VARIANT* pvarIn, VARIANT* pvarOut) PURE;
  2766. STDMETHOD (OnHttpEquiv)(THIS_ IShellView* psv, BOOL fDone, VARIANT* pvarargIn, VARIANT* pvarargOut) PURE;
  2767. STDMETHOD (GetPalette)( THIS_ HPALETTE * hpal ) PURE;
  2768. STDMETHOD (RegisterWindow)(THIS_ BOOL fUnregister, int swc) PURE;
  2769. // Warning! Do not add any new methods to this interface
  2770. // because IE4 shell32.dll uses it, so changing the interface
  2771. // breaks IE4 interop.
  2772. };
  2773. #define BSF_REGISTERASDROPTARGET 0x00000001
  2774. #define BSF_THEATERMODE 0x00000002
  2775. #define BSF_NOLOCALFILEWARNING 0x00000010
  2776. #define BSF_UISETBYAUTOMATION 0x00000100
  2777. #define BSF_RESIZABLE 0x00000200
  2778. #define BSF_CANMAXIMIZE 0x00000400
  2779. #define BSF_TOPBROWSER 0x00000800
  2780. #define BSF_NAVNOHISTORY 0x00001000
  2781. #define BSF_HTMLNAVCANCELED 0x00002000
  2782. #define BSF_DONTSHOWNAVCANCELPAGE 0x00004000
  2783. #define BSF_SETNAVIGATABLECODEPAGE 0x00008000
  2784. #define BSF_DELEGATEDNAVIGATION 0x00010000
  2785. #define TRAVELLOG_LOCALANCHOR 0x00000001
  2786. #define TRAVELLOG_FORCEUPDATE 0x00000002
  2787. #include <pshpack8.h>
  2788. typedef struct SToolbarItem {
  2789. IDockingWindow * ptbar;
  2790. BORDERWIDTHS rcBorderTool;
  2791. LPWSTR pwszItem;
  2792. BOOL fShow;
  2793. HMONITOR hMon;
  2794. } TOOLBARITEM, *LPTOOLBARITEM;
  2795. #define ITB_VIEW ((UINT)-1) // view
  2796. #include <poppack.h> /* Assume byte packing throughout */
  2797. struct tagFolderSetData;
  2798. // TEMPORARY. this is so that we don't have to keep writing dummy subs in basesb as we're
  2799. // building basesb2
  2800. DECLARE_INTERFACE_(IBrowserService2, IBrowserService)
  2801. {
  2802. // *** IUnknown methods ***
  2803. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2804. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2805. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2806. // *** IBrowserService specific methods ***
  2807. // TODO: break into 3 sections (outer, inner, and both/inherit)
  2808. STDMETHOD(GetParentSite)(THIS_ struct IOleInPlaceSite** ppipsite) PURE;
  2809. STDMETHOD(SetTitle)(THIS_ IShellView* psv, LPCWSTR pszName) PURE;
  2810. STDMETHOD(GetTitle)(THIS_ IShellView* psv, LPWSTR pszName, DWORD cchName) PURE;
  2811. STDMETHOD(GetOleObject)(THIS_ struct IOleObject** ppobjv) PURE;
  2812. // think about this one.. I'm not sure we want to expose this -- Chee
  2813. // BUGBUG:: Yep soon we should have interface instead.
  2814. // My impression is that we won't document this whole interface???
  2815. STDMETHOD(GetTravelLog)(THIS_ ITravelLog** pptl) PURE;
  2816. STDMETHOD(ShowControlWindow)(THIS_ UINT id, BOOL fShow) PURE;
  2817. STDMETHOD(IsControlWindowShown)(THIS_ UINT id, BOOL *pfShown) PURE;
  2818. STDMETHOD(IEGetDisplayName)(THIS_ LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) PURE;
  2819. STDMETHOD(IEParseDisplayName)(THIS_ UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST * ppidlOut) PURE;
  2820. STDMETHOD(DisplayParseError)(THIS_ HRESULT hres, LPCWSTR pwszPath) PURE;
  2821. STDMETHOD(NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF) PURE;
  2822. STDMETHOD (SetNavigateState)(THIS_ BNSTATE bnstate) PURE;
  2823. STDMETHOD (GetNavigateState) (THIS_ BNSTATE *pbnstate) PURE;
  2824. STDMETHOD (NotifyRedirect) (THIS_ struct IShellView* psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) PURE;
  2825. STDMETHOD (UpdateWindowList) (THIS) PURE;
  2826. STDMETHOD (UpdateBackForwardState) (THIS) PURE;
  2827. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags, DWORD dwFlagMask) PURE;
  2828. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  2829. // Tells if it can navigate now or not.
  2830. STDMETHOD (CanNavigateNow) (THIS) PURE;
  2831. STDMETHOD (GetPidl) (THIS_ LPITEMIDLIST *ppidl) PURE;
  2832. STDMETHOD (SetReferrer) (THIS_ LPITEMIDLIST pidl) PURE;
  2833. STDMETHOD_(DWORD, GetBrowserIndex)(THIS) PURE;
  2834. STDMETHOD (GetBrowserByIndex)(THIS_ DWORD dwID, IUnknown **ppunk) PURE;
  2835. STDMETHOD (GetHistoryObject)(THIS_ IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) PURE;
  2836. STDMETHOD (SetHistoryObject)(THIS_ IOleObject *pole, BOOL fIsLocalAnchor) PURE;
  2837. STDMETHOD (CacheOLEServer)(THIS_ IOleObject *pole) PURE;
  2838. STDMETHOD (GetSetCodePage)(THIS_ VARIANT* pvarIn, VARIANT* pvarOut) PURE;
  2839. STDMETHOD (OnHttpEquiv)(THIS_ IShellView* psv, BOOL fDone, VARIANT* pvarargIn, VARIANT* pvarargOut) PURE;
  2840. STDMETHOD (GetPalette)( THIS_ HPALETTE * hpal ) PURE;
  2841. STDMETHOD (RegisterWindow)(THIS_ BOOL fUnregister, int swc) PURE;
  2842. // Stuff added for shbrowse->shbrows2 split
  2843. // These remove "friend" functions and classes
  2844. //
  2845. STDMETHOD_(LRESULT, WndProcBS)(THIS_ HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  2846. STDMETHOD (SetAsDefFolderSettings)(THIS) PURE;
  2847. STDMETHOD (GetViewRect)(THIS_ RECT * prc) PURE;
  2848. STDMETHOD (OnSize)(THIS_ WPARAM wParam) PURE;
  2849. STDMETHOD (OnCreate)(THIS_ LPCREATESTRUCT pcs) PURE;
  2850. STDMETHOD_(LRESULT, OnCommand)(THIS_ WPARAM wParam, LPARAM lParam) PURE;
  2851. STDMETHOD (OnDestroy)(THIS ) PURE;
  2852. STDMETHOD_(LRESULT, OnNotify)(THIS_ NMHDR * pnm) PURE;
  2853. STDMETHOD (OnSetFocus)(THIS ) PURE;
  2854. STDMETHOD (OnFrameWindowActivateBS)(THIS_ BOOL fActive) PURE;
  2855. STDMETHOD (ReleaseShellView)(THIS ) PURE;
  2856. STDMETHOD (ActivatePendingView)(THIS ) PURE;
  2857. STDMETHOD (CreateViewWindow)(THIS_ IShellView* psvNew, IShellView* psvOld, LPRECT prcView, HWND* phwnd) PURE;
  2858. STDMETHOD (CreateBrowserPropSheetExt)(THIS_ REFIID riid, void **ppv) PURE;
  2859. // these could be base browser only interfaces
  2860. // they are not overridden by anyone, and perhaps only there for the aggregators to get info from the
  2861. // aggregatee. NOTE: where basesb calls these,
  2862. // it does NOT go through _pbsOuter
  2863. STDMETHOD (GetViewWindow)(THIS_ HWND * phwndView) PURE;
  2864. STDMETHOD (GetBaseBrowserData)(THIS_ LPCBASEBROWSERDATA * pbbd) PURE;
  2865. STDMETHOD_(LPBASEBROWSERDATA, PutBaseBrowserData)(THIS) PURE;
  2866. STDMETHOD (InitializeTravelLog)(THIS_ ITravelLog* ptl, DWORD dw) PURE;
  2867. STDMETHOD (SetTopBrowser)(THIS) PURE;
  2868. STDMETHOD (Offline)(THIS_ int iCmd) PURE;
  2869. STDMETHOD (AllowViewResize)(THIS_ BOOL f) PURE;
  2870. STDMETHOD (SetActivateState)(THIS_ UINT u) PURE;
  2871. STDMETHOD (UpdateSecureLockIcon)(THIS_ int eSecureLock) PURE;
  2872. STDMETHOD (InitializeDownloadManager)(THIS) PURE;
  2873. STDMETHOD (InitializeTransitionSite)(THIS) PURE;
  2874. STDMETHOD (_Initialize)(THIS_ HWND hwnd, IUnknown *pauto) PURE;
  2875. // BEGIN REVIEW: review names and need of each.
  2876. //
  2877. // this first set could be basebrowser only members. no one overrides
  2878. // NOTE: where basesb calls these, it does NOT go throug _pbsOuter
  2879. STDMETHOD (_CancelPendingNavigationAsync)(THIS) PURE;
  2880. STDMETHOD (_CancelPendingView)(THIS) PURE;
  2881. STDMETHOD (_MaySaveChanges)(THIS) PURE;
  2882. STDMETHOD (_PauseOrResumeView)(THIS_ BOOL fPaused) PURE;
  2883. STDMETHOD (_DisableModeless)(THIS) PURE;
  2884. // rethink these... are all of these necessary?
  2885. STDMETHOD (_NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags)PURE;
  2886. STDMETHOD (_TryShell2Rename)(THIS_ IShellView* psv, LPCITEMIDLIST pidlNew)PURE;
  2887. STDMETHOD (_SwitchActivationNow)(THIS )PURE;
  2888. // this set is overridden and called thru _pbsOuter (and SUPER:_pbsInner)
  2889. STDMETHOD (_ExecChildren)(THIS_ IUnknown *punkBar, BOOL fBroadcast,
  2890. const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt,
  2891. VARIANTARG *pvarargIn, VARIANTARG *pvarargOut)PURE;
  2892. STDMETHOD (_SendChildren)(THIS_ HWND hwndBar, BOOL fBroadcast,
  2893. UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  2894. //END REVIEW:
  2895. // querying from the outer.
  2896. STDMETHOD (GetFolderSetData)(THIS_ struct tagFolderSetData* pfsd) PURE;
  2897. // Toolbar stuff is here temporarily. Eventually it will move out
  2898. // of basesb into commonsb, so I'm keeping the underscore "_"
  2899. // Except those noted below, none of these are overridden by
  2900. // outer guys, so no calls are made through _pbsOuter
  2901. STDMETHOD (_OnFocusChange)(THIS_ UINT itb) PURE;
  2902. STDMETHOD (v_ShowHideChildWindows)(THIS_ BOOL fChildOnly) PURE; // NOTE: overridden and called thru _pbsOuter
  2903. STDMETHOD_(UINT,_get_itbLastFocus)(THIS) PURE;
  2904. STDMETHOD (_put_itbLastFocus)(THIS_ UINT itbLastFocus) PURE;
  2905. STDMETHOD (_UIActivateView)(THIS_ UINT uState) PURE;
  2906. // Check the following functions
  2907. STDMETHOD (_GetViewBorderRect)(THIS_ RECT* prc) PURE;
  2908. STDMETHOD (_UpdateViewRectSize)(THIS) PURE;
  2909. STDMETHOD (_ResizeNextBorder)(THIS_ UINT itb) PURE;
  2910. STDMETHOD (_ResizeView)(THIS) PURE;
  2911. STDMETHOD (_GetEffectiveClientArea)(THIS_ LPRECT lprectBorder, HMONITOR hmon) PURE;
  2912. // Desktop needs to override this from commonsb
  2913. STDMETHOD_(IStream*,v_GetViewStream)(THIS_ LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName) PURE;
  2914. // Desktop needs access to these commonsb functions, they are not overridden:
  2915. STDMETHOD_(LRESULT,ForwardViewMsg)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  2916. STDMETHOD (SetAcceleratorMenu)(THIS_ HACCEL hacc) PURE;
  2917. STDMETHOD_(int,_GetToolbarCount)(THIS) PURE;
  2918. STDMETHOD_(LPTOOLBARITEM,_GetToolbarItem)(THIS_ int itb) PURE;
  2919. STDMETHOD (_SaveToolbars)(THIS_ IStream* pstm) PURE;
  2920. STDMETHOD (_LoadToolbars)(THIS_ IStream* pstm) PURE;
  2921. STDMETHOD (_CloseAndReleaseToolbars)(THIS_ BOOL fClose) PURE;
  2922. STDMETHOD (v_MayGetNextToolbarFocus)(THIS_ LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM * pptbi, HWND * phwnd) PURE;
  2923. STDMETHOD (_ResizeNextBorderHelper)(THIS_ UINT itb, BOOL bUseHmonitor) PURE;
  2924. STDMETHOD_(UINT,_FindTBar)(THIS_ IUnknown* punkSrc) PURE;
  2925. STDMETHOD (_SetFocus)(THIS_ LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg) PURE;
  2926. STDMETHOD (v_MayTranslateAccelerator)(THIS_ MSG* pmsg) PURE;
  2927. STDMETHOD (_GetBorderDWHelper)(THIS_ IUnknown* punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor) PURE;
  2928. // Shell browser needs to override this from basesb.
  2929. STDMETHOD (v_CheckZoneCrossing)(THIS_ LPCITEMIDLIST pidl) PURE;
  2930. };
  2931. DECLARE_INTERFACE_(IBrowserService3, IBrowserService2)
  2932. {
  2933. // *** IUnknown methods ***
  2934. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  2935. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  2936. STDMETHOD_(ULONG,Release) (THIS) PURE;
  2937. // *** IBrowserService specific methods ***
  2938. // TODO: break into 3 sections (outer, inner, and both/inherit)
  2939. STDMETHOD(GetParentSite)(THIS_ struct IOleInPlaceSite** ppipsite) PURE;
  2940. STDMETHOD(SetTitle)(THIS_ IShellView* psv, LPCWSTR pszName) PURE;
  2941. STDMETHOD(GetTitle)(THIS_ IShellView* psv, LPWSTR pszName, DWORD cchName) PURE;
  2942. STDMETHOD(GetOleObject)(THIS_ struct IOleObject** ppobjv) PURE;
  2943. // think about this one.. I'm not sure we want to expose this -- Chee
  2944. // BUGBUG:: Yep soon we should have interface instead.
  2945. // My impression is that we won't document this whole interface???
  2946. STDMETHOD(GetTravelLog)(THIS_ ITravelLog** pptl) PURE;
  2947. STDMETHOD(ShowControlWindow)(THIS_ UINT id, BOOL fShow) PURE;
  2948. STDMETHOD(IsControlWindowShown)(THIS_ UINT id, BOOL *pfShown) PURE;
  2949. STDMETHOD(IEGetDisplayName)(THIS_ LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) PURE;
  2950. STDMETHOD(IEParseDisplayName)(THIS_ UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST * ppidlOut) PURE;
  2951. STDMETHOD(DisplayParseError)(THIS_ HRESULT hres, LPCWSTR pwszPath) PURE;
  2952. STDMETHOD(NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF) PURE;
  2953. STDMETHOD (SetNavigateState)(THIS_ BNSTATE bnstate) PURE;
  2954. STDMETHOD (GetNavigateState) (THIS_ BNSTATE *pbnstate) PURE;
  2955. STDMETHOD (NotifyRedirect) (THIS_ struct IShellView* psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) PURE;
  2956. STDMETHOD (UpdateWindowList) (THIS) PURE;
  2957. STDMETHOD (UpdateBackForwardState) (THIS) PURE;
  2958. STDMETHOD(SetFlags)(THIS_ DWORD dwFlags, DWORD dwFlagMask) PURE;
  2959. STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
  2960. // Tells if it can navigate now or not.
  2961. STDMETHOD (CanNavigateNow) (THIS) PURE;
  2962. STDMETHOD (GetPidl) (THIS_ LPITEMIDLIST *ppidl) PURE;
  2963. STDMETHOD (SetReferrer) (THIS_ LPITEMIDLIST pidl) PURE;
  2964. STDMETHOD_(DWORD, GetBrowserIndex)(THIS) PURE;
  2965. STDMETHOD (GetBrowserByIndex)(THIS_ DWORD dwID, IUnknown **ppunk) PURE;
  2966. STDMETHOD (GetHistoryObject)(THIS_ IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) PURE;
  2967. STDMETHOD (SetHistoryObject)(THIS_ IOleObject *pole, BOOL fIsLocalAnchor) PURE;
  2968. STDMETHOD (CacheOLEServer)(THIS_ IOleObject *pole) PURE;
  2969. STDMETHOD (GetSetCodePage)(THIS_ VARIANT* pvarIn, VARIANT* pvarOut) PURE;
  2970. STDMETHOD (OnHttpEquiv)(THIS_ IShellView* psv, BOOL fDone, VARIANT* pvarargIn, VARIANT* pvarargOut) PURE;
  2971. STDMETHOD (GetPalette)( THIS_ HPALETTE * hpal ) PURE;
  2972. STDMETHOD (RegisterWindow)(THIS_ BOOL fUnregister, int swc) PURE;
  2973. // Stuff added for shbrowse->shbrows2 split
  2974. // These remove "friend" functions and classes
  2975. //
  2976. STDMETHOD_(LRESULT, WndProcBS)(THIS_ HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  2977. STDMETHOD (SetAsDefFolderSettings)(THIS) PURE;
  2978. STDMETHOD (GetViewRect)(THIS_ RECT * prc) PURE;
  2979. STDMETHOD (OnSize)(THIS_ WPARAM wParam) PURE;
  2980. STDMETHOD (OnCreate)(THIS_ LPCREATESTRUCT pcs) PURE;
  2981. STDMETHOD_(LRESULT, OnCommand)(THIS_ WPARAM wParam, LPARAM lParam) PURE;
  2982. STDMETHOD (OnDestroy)(THIS ) PURE;
  2983. STDMETHOD_(LRESULT, OnNotify)(THIS_ NMHDR * pnm) PURE;
  2984. STDMETHOD (OnSetFocus)(THIS ) PURE;
  2985. STDMETHOD (OnFrameWindowActivateBS)(THIS_ BOOL fActive) PURE;
  2986. STDMETHOD (ReleaseShellView)(THIS ) PURE;
  2987. STDMETHOD (ActivatePendingView)(THIS ) PURE;
  2988. STDMETHOD (CreateViewWindow)(THIS_ IShellView* psvNew, IShellView* psvOld, LPRECT prcView, HWND* phwnd) PURE;
  2989. STDMETHOD (CreateBrowserPropSheetExt)(THIS_ REFIID riid, void **ppv) PURE;
  2990. // these could be base browser only interfaces
  2991. // they are not overridden by anyone, and perhaps only there for the aggregators to get info from the
  2992. // aggregatee. NOTE: where basesb calls these,
  2993. // it does NOT go through _pbsOuter
  2994. STDMETHOD (GetViewWindow)(THIS_ HWND * phwndView) PURE;
  2995. STDMETHOD (GetBaseBrowserData)(THIS_ LPCBASEBROWSERDATA * pbbd) PURE;
  2996. STDMETHOD_(LPBASEBROWSERDATA, PutBaseBrowserData)(THIS) PURE;
  2997. STDMETHOD (InitializeTravelLog)(THIS_ ITravelLog* ptl, DWORD dw) PURE;
  2998. STDMETHOD (SetTopBrowser)(THIS) PURE;
  2999. STDMETHOD (Offline)(THIS_ int iCmd) PURE;
  3000. STDMETHOD (AllowViewResize)(THIS_ BOOL f) PURE;
  3001. STDMETHOD (SetActivateState)(THIS_ UINT u) PURE;
  3002. STDMETHOD (UpdateSecureLockIcon)(THIS_ int eSecureLock) PURE;
  3003. STDMETHOD (InitializeDownloadManager)(THIS) PURE;
  3004. STDMETHOD (InitializeTransitionSite)(THIS) PURE;
  3005. STDMETHOD (_Initialize)(THIS_ HWND hwnd, IUnknown *pauto) PURE;
  3006. // BEGIN REVIEW: review names and need of each.
  3007. //
  3008. // this first set could be basebrowser only members. no one overrides
  3009. // NOTE: where basesb calls these, it does NOT go throug _pbsOuter
  3010. STDMETHOD (_CancelPendingNavigationAsync)(THIS) PURE;
  3011. STDMETHOD (_CancelPendingView)(THIS) PURE;
  3012. STDMETHOD (_MaySaveChanges)(THIS) PURE;
  3013. STDMETHOD (_PauseOrResumeView)(THIS_ BOOL fPaused) PURE;
  3014. STDMETHOD (_DisableModeless)(THIS) PURE;
  3015. // rethink these... are all of these necessary?
  3016. STDMETHOD (_NavigateToPidl)(THIS_ LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags)PURE;
  3017. STDMETHOD (_TryShell2Rename)(THIS_ IShellView* psv, LPCITEMIDLIST pidlNew)PURE;
  3018. STDMETHOD (_SwitchActivationNow)(THIS )PURE;
  3019. // this set is overridden and called thru _pbsOuter (and SUPER:_pbsInner)
  3020. STDMETHOD (_ExecChildren)(THIS_ IUnknown *punkBar, BOOL fBroadcast,
  3021. const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt,
  3022. VARIANTARG *pvarargIn, VARIANTARG *pvarargOut)PURE;
  3023. STDMETHOD (_SendChildren)(THIS_ HWND hwndBar, BOOL fBroadcast,
  3024. UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  3025. //END REVIEW:
  3026. // querying from the outer.
  3027. STDMETHOD (GetFolderSetData)(THIS_ struct tagFolderSetData* pfsd) PURE;
  3028. // Toolbar stuff is here temporarily. Eventually it will move out
  3029. // of basesb into commonsb, so I'm keeping the underscore "_"
  3030. // Except those noted below, none of these are overridden by
  3031. // outer guys, so no calls are made through _pbsOuter
  3032. STDMETHOD (_OnFocusChange)(THIS_ UINT itb) PURE;
  3033. STDMETHOD (v_ShowHideChildWindows)(THIS_ BOOL fChildOnly) PURE; // NOTE: overridden and called thru _pbsOuter
  3034. STDMETHOD_(UINT,_get_itbLastFocus)(THIS) PURE;
  3035. STDMETHOD (_put_itbLastFocus)(THIS_ UINT itbLastFocus) PURE;
  3036. STDMETHOD (_UIActivateView)(THIS_ UINT uState) PURE;
  3037. // Check the following functions
  3038. STDMETHOD (_GetViewBorderRect)(THIS_ RECT* prc) PURE;
  3039. STDMETHOD (_UpdateViewRectSize)(THIS) PURE;
  3040. STDMETHOD (_ResizeNextBorder)(THIS_ UINT itb) PURE;
  3041. STDMETHOD (_ResizeView)(THIS) PURE;
  3042. STDMETHOD (_GetEffectiveClientArea)(THIS_ LPRECT lprectBorder, HMONITOR hmon) PURE;
  3043. // Desktop needs to override this from commonsb
  3044. STDMETHOD_(IStream*,v_GetViewStream)(THIS_ LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName) PURE;
  3045. // Desktop needs access to these commonsb functions, they are not overridden:
  3046. STDMETHOD_(LRESULT,ForwardViewMsg)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE;
  3047. STDMETHOD (SetAcceleratorMenu)(THIS_ HACCEL hacc) PURE;
  3048. STDMETHOD_(int,_GetToolbarCount)(THIS) PURE;
  3049. STDMETHOD_(LPTOOLBARITEM,_GetToolbarItem)(THIS_ int itb) PURE;
  3050. STDMETHOD (_SaveToolbars)(THIS_ IStream* pstm) PURE;
  3051. STDMETHOD (_LoadToolbars)(THIS_ IStream* pstm) PURE;
  3052. STDMETHOD (_CloseAndReleaseToolbars)(THIS_ BOOL fClose) PURE;
  3053. STDMETHOD (v_MayGetNextToolbarFocus)(THIS_ LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM * pptbi, HWND * phwnd) PURE;
  3054. STDMETHOD (_ResizeNextBorderHelper)(THIS_ UINT itb, BOOL bUseHmonitor) PURE;
  3055. STDMETHOD_(UINT,_FindTBar)(THIS_ IUnknown* punkSrc) PURE;
  3056. STDMETHOD (_SetFocus)(THIS_ LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg) PURE;
  3057. STDMETHOD (v_MayTranslateAccelerator)(THIS_ MSG* pmsg) PURE;
  3058. STDMETHOD (_GetBorderDWHelper)(THIS_ IUnknown* punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor) PURE;
  3059. // Shell browser needs to override this from basesb.
  3060. STDMETHOD (v_CheckZoneCrossing)(THIS_ LPCITEMIDLIST pidl) PURE;
  3061. // IBrowserService3
  3062. STDMETHOD (_PositionViewWindow)(THIS_ HWND hwnd, LPRECT prc) PURE; // this was virtual in basesb/shbrowse, but missed this interface!
  3063. };
  3064. typedef enum
  3065. {
  3066. NAVDATA_DONTUPDATETRAVELLOG = 0x00000001,
  3067. NAVDATA_FRAMEWINDOW = 0x00000002,
  3068. NAVDATA_FRAMECREATION = 0x00000004,
  3069. NAVDATA_RESTARTLOAD = 0x00000008,
  3070. } ENUMNAVDATA;
  3071. typedef struct IHTMLWindow2 IHTMLWindow2;
  3072. #undef INTERFACE
  3073. #define INTERFACE ITridentService
  3074. DECLARE_INTERFACE_(ITridentService, IUnknown)
  3075. {
  3076. // *** IUnknown methods ***
  3077. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3078. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3079. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3080. // *** ITridentService specific methods ***
  3081. STDMETHOD(FireBeforeNavigate2)(THIS_
  3082. IDispatch * pDispatch,
  3083. LPCTSTR lpszUrl,
  3084. DWORD dwFlags,
  3085. LPCTSTR lpszFrameName,
  3086. LPBYTE pPostData,
  3087. DWORD cbPostData,
  3088. LPCTSTR lpszHeaders,
  3089. BOOL fPlayNavSound,
  3090. BOOL * pfCancel) PURE;
  3091. STDMETHOD(FireNavigateComplete2)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  3092. DWORD dwFlags) PURE;
  3093. STDMETHOD(FireDownloadBegin)(THIS) PURE;
  3094. STDMETHOD(FireDownloadComplete)(THIS) PURE;
  3095. STDMETHOD(FireDocumentComplete)(THIS_
  3096. IHTMLWindow2 * pHTMLWindow,
  3097. DWORD dwFlags) PURE;
  3098. STDMETHOD(UpdateDesktopComponent)(THIS_ IHTMLWindow2 * pHTMLWindow) PURE;
  3099. STDMETHOD(GetPendingUrl)(THIS_ BSTR * pbstrPendingUrl) PURE;
  3100. STDMETHOD(ActiveElementChanged)(THIS_ IHTMLElement * pHTMLElement) PURE;
  3101. STDMETHOD(GetUrlSearchComponent)(THIS_ BSTR * pbstrSearch) PURE;
  3102. STDMETHOD(IsErrorUrl)(THIS_ LPCTSTR lpszUrl, BOOL *pfIsError) PURE;
  3103. };
  3104. #undef INTERFACE
  3105. #define INTERFACE ITridentService2
  3106. DECLARE_INTERFACE_(ITridentService2, ITridentService)
  3107. {
  3108. // *** ITridentService2 methods ***
  3109. STDMETHOD(AttachMyPics)(THIS_ void *pDoc2, void **ppMyPics) PURE;
  3110. STDMETHOD_(BOOL,ReleaseMyPics)(THIS_ void *pMyPics) PURE;
  3111. STDMETHOD(IsGalleryMeta)(THIS_ BOOL bFlag, void *pMyPics) PURE;
  3112. STDMETHOD(EmailPicture)(THIS_ BSTR bstrURL) PURE;
  3113. STDMETHOD(FireNavigateError)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  3114. BSTR bstrURL,
  3115. BSTR bstrTargetFrameName,
  3116. DWORD dwStatusCode,
  3117. BOOL * pfCancel) PURE;
  3118. STDMETHOD(FirePrintTemplateEvent)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  3119. DISPID dispidPrintEvent) PURE;
  3120. STDMETHOD(FireUpdatePageStatus)(THIS_ IHTMLWindow2 * pHTMLWindow2,
  3121. DWORD nPage,
  3122. BOOL fDone) PURE;
  3123. STDMETHOD(FirePrivacyImpactedStateChange)(THIS_ BOOL bPrivacyImpacted) PURE;
  3124. STDMETHOD(InitAutoImageResize)(THIS) PURE;
  3125. STDMETHOD(UnInitAutoImageResize)(THIS) PURE;
  3126. };
  3127. #undef INTERFACE
  3128. #define INTERFACE IWebBrowserPriv
  3129. DECLARE_INTERFACE_(IWebBrowserPriv, IUnknown)
  3130. {
  3131. // *** IUnknown methods ***
  3132. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3133. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3134. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3135. // *** IWebBrowserPriv specific methods ***
  3136. STDMETHOD(NavigateWithBindCtx)(THIS_ VARIANT *pvarUrl,
  3137. VARIANT *pvarFlags,
  3138. VARIANT *pvarTargetFrameName,
  3139. VARIANT *pvarPostData,
  3140. VARIANT *pvarHeaders,
  3141. IBindCtx * pBindCtx,
  3142. BSTR bstrLocation) PURE;
  3143. STDMETHOD(OnClose)(THIS) PURE;
  3144. };
  3145. // these MUST be listed in the same order a c_szPropNames in deskbar.cpp
  3146. typedef enum {
  3147. PROPDATA_SIDE = 0,
  3148. PROPDATA_MODE,
  3149. PROPDATA_LEFT,
  3150. PROPDATA_TOP,
  3151. PROPDATA_RIGHT,
  3152. PROPDATA_BOTTOM,
  3153. PROPDATA_DELETEABLE,
  3154. PROPDATA_X,
  3155. PROPDATA_Y,
  3156. PROPDATA_CX,
  3157. PROPDATA_CY,
  3158. PROPDATA_COUNT
  3159. } ENUMPROPDATA ;
  3160. // PROPDATA_MODE values:
  3161. // (aka. WBM_* -- webbar modes (_eMode))
  3162. #define WBM_BOTTOMMOST ((UINT) 0x0) // bottommost
  3163. #define WBM_TOPMOST ((UINT) 0x1) // topmost
  3164. #define WBM_FLOATING ((UINT) 0x2) // floating
  3165. #define WBM_NIL ((UINT) 0x7) // nil
  3166. #undef INTERFACE
  3167. #define INTERFACE IDockingBarPropertyBagInit
  3168. DECLARE_INTERFACE_(IDockingBarPropertyBagInit, IUnknown)
  3169. {
  3170. // *** IUnknown methods ***
  3171. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3172. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  3173. STDMETHOD_(ULONG,Release)(THIS) PURE;
  3174. // *** IDockingBarPropertyBag ***
  3175. STDMETHOD(SetDataDWORD)(THIS_ ENUMPROPDATA e, DWORD dwData) PURE;
  3176. } ;
  3177. #if (_WIN32_IE) >= 0x0400
  3178. //===========================================================================
  3179. // IAddressList private COmWindow interface. This should never be exposed.
  3180. #undef INTERFACE
  3181. #define INTERFACE IAddressList
  3182. DECLARE_INTERFACE_(IAddressList, IWinEventHandler)
  3183. {
  3184. // *** IUnknown methods ***
  3185. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3186. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3187. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3188. // *** IWinEventHandler Methods ***
  3189. STDMETHOD(OnWinEvent) (THIS_ HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* plres) PURE;
  3190. STDMETHOD(IsWindowOwner) (THIS_ HWND hwnd) PURE;
  3191. // *** IAddressList Methods ***
  3192. STDMETHOD(Connect) (THIS_ BOOL fConnect, HWND hwnd, IBrowserService* pbs, IBandProxy* pbp, IAutoComplete * pac) PURE;
  3193. STDMETHOD(NavigationComplete) (THIS_ void *pvCShellUrl) PURE;
  3194. STDMETHOD(Refresh) (THIS_ DWORD dwType) PURE;
  3195. STDMETHOD(Load) (THIS) PURE;
  3196. STDMETHOD(Save) (THIS) PURE;
  3197. STDMETHOD(SetToListIndex) (THIS_ int nIndex, void *pvShelLUrl) PURE;
  3198. STDMETHOD(FileSysChangeAL) (THIS_ DWORD dw, LPCITEMIDLIST *ppidl) PURE;
  3199. };
  3200. #endif
  3201. // DOC'ed for DOJ compliance
  3202. #endif
  3203. //===========================================================================
  3204. // IDwnCodePage: This is a private interface to pass codepage info.
  3205. #undef INTERFACE
  3206. #define INTERFACE IDwnCodePage
  3207. DECLARE_INTERFACE_(IDwnCodePage, IUnknown)
  3208. {
  3209. // *** IUnknown methods ***
  3210. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3211. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3212. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3213. // *** IDwnCodePage Methods ***
  3214. STDMETHOD_(UINT,GetCodePage) (THIS) PURE;
  3215. STDMETHOD(SetCodePage) (THIS_ UINT uiCP) PURE;
  3216. };
  3217. SHSTDAPI SHDllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv);
  3218. //===========================================================================
  3219. //----------------------------------------------------------------------------
  3220. #define IsLFNDriveORD 119
  3221. SHSTDAPI_(int) SHOutOfMemoryMessageBox(HWND hwndOwner, LPTSTR pszTitle, UINT fuStyle);
  3222. SHSTDAPI_(BOOL) SHWinHelp(HWND hwndMain, LPCTSTR pszHelp, UINT usCommand, ULONG_PTR ulData);
  3223. SHSTDAPI_(BOOL) RLBuildListOfPaths(void);
  3224. #ifdef WINNT
  3225. SHSTDAPI_(BOOL) RegenerateUserEnvironment(void **pPrevEnv, BOOL bSetCurrentEnv);
  3226. #endif
  3227. #define SHValidateUNCORD 173
  3228. // DOC'ed for DOJ compliance
  3229. //----------------------------------------------------------------------------
  3230. #define OleStrToStrNORD 78
  3231. #define SHCloneSpecialIDListORD 89
  3232. #define SHDllGetClassObjectORD 128
  3233. #define SHLogILFromFSILORD 95
  3234. #define SHMapPIDLToSystemImageListIndexORD 77
  3235. #define SHShellFolderView_MessageORD 73
  3236. #define Shell_GetImageListsORD 71
  3237. #define SHGetSpecialFolderPathORD 175
  3238. #define StrToOleStrNORD 79
  3239. #define ILCloneORD 18
  3240. #define ILCloneFirstORD 19
  3241. #define ILCombineORD 25
  3242. #define ILCreateFromPathORD 157
  3243. #define ILFindChildORD 24
  3244. #define ILFreeORD 155
  3245. #define ILGetNextORD 153
  3246. #define ILGetSizeORD 152
  3247. #define ILIsEqualORD 21
  3248. #define ILRemoveLastIDORD 17
  3249. #define PathAddBackslashORD 32
  3250. #define PathCombineORD 37
  3251. #define PathIsExeORD 43
  3252. #define PathMatchSpecORD 46
  3253. #define SHGetSetSettingsORD 68
  3254. #define SHILCreateFromPathORD 28
  3255. #define SHFreeORD 195
  3256. #define CheckWinIniForAssocsORD 711
  3257. // DOC'ed for DOJ Compliance
  3258. #ifndef WINNT
  3259. // Always usr TerminateThreadEx.
  3260. BOOL APIENTRY TerminateThreadEx(HANDLE hThread, DWORD dwExitCode, BOOL bCleanupFlag);
  3261. #define TerminateThread(hThread, dwExitCode) TerminateThreadEx(hThread, dwExitCode, TRUE)
  3262. #endif
  3263. // DOC'ed for DOJ Compliance
  3264. SHSTDAPI SHCreateSessionKey(REGSAM sam, HKEY *phkOut);
  3265. // Sortof Gross but if we pass this flag in with STGM_CREATE we will fail if file already exists
  3266. // with ERROR_ALREADY_EXISTS
  3267. #define CSOF_FAILIFTHERE 0x80000000L
  3268. //===========================================================================
  3269. // Structure for covert communication
  3270. // between shdocvw's CShellBrowser::Exec()
  3271. // and shell32's DefView WM_COMMAND handler
  3272. // NOTE: this structure is revealed in the KB
  3273. // (articles Q252610 and Q216954). So even though
  3274. // it's in a private section, treat it as public.
  3275. struct _DFVCMDDATA
  3276. {
  3277. HWND hwnd; // Browser hwnd
  3278. VARIANTARG *pva; // Args passed to Exec()
  3279. DWORD nCmdIDTranslated; // Replacement OLECMDID_* value
  3280. };
  3281. typedef struct _DFVCMDDATA DFVCMDDATA;
  3282. typedef struct _DFVCMDDATA *LPDFVCMDDATA;
  3283. typedef const struct _DFVCMDDATA *LPCDFVCMDDATA;
  3284. SHSTDAPI_(DWORD) SHGetProcessDword(DWORD idProcess, LONG iIndex);
  3285. SHSTDAPI_(BOOL) SHSetShellWindowEx(HWND hwnd, HWND hwndChild);
  3286. #define CCH_MENUMAX 80 // DOC: max size of a menu string
  3287. // WinEventHandler message ranges
  3288. #define MBHM_FIRST (0x00000001) // MenuBandHandler
  3289. #define MBHM_LAST (0x000000ff)
  3290. #define MSFM_FIRST (0x00000100) // MenuShellFolder
  3291. #define MSFM_LAST (0x000001ff)
  3292. #define FSFM_FIRST (0x00000200) // FileShellFolder
  3293. #define FSFM_LAST (0x000002ff)
  3294. //-------------------------------------------------------------------------
  3295. //
  3296. // SID_SMenuBandHandler
  3297. //
  3298. // The menuband calls QueryService(SID_SMenuBandHandler, IID_IWinEventHandler)
  3299. // on its shellfolder. If the shellfolder supports this service, the
  3300. // menuband will call the event handler on certain menu events. These
  3301. // events and messages are as follows:
  3302. //
  3303. // MBHM_INITMENUPOPUP sent when a drop-down menu or submenu is
  3304. // about to become active.
  3305. //
  3306. //
  3307. // File-system ShellFolder events:
  3308. //
  3309. // FSFM_COMMAND sent when a file-system item is executed
  3310. //
  3311. //-------------------------------------------------------------------------
  3312. typedef struct tagMBINITMENUPOPUP
  3313. {
  3314. DWORD dwMask; // MBIMP_*
  3315. IShellFolder * psf;
  3316. LPCITEMIDLIST pidl;
  3317. HMENU hmenu;
  3318. int iPos;
  3319. } MBINITMENUPOPUP;
  3320. #define MBIMP_HMENU 0x00000001 // hmenu and iPos are set
  3321. // Messages sent to the WinEventHandler wParam lParam *plRet
  3322. // ------ ------ ---
  3323. #define MBHM_INITMENUPOPUP (MBHM_FIRST+0) // 0 MBINITMENUPOPUP *
  3324. // Messages sent to the WinEventHandler wParam lParam *plRet
  3325. // ------ ------ ------
  3326. #define FSFM_COMMAND (FSFM_FIRST+0) // cmd ID pidl
  3327. //-------------------------------------------------------------------------
  3328. //
  3329. // IAugmentedShellFolder interface
  3330. //
  3331. // This provides methods to add multiple Shell Folder objects to a
  3332. // single augmented object (CLSID_AugmentedShellFolder), which will
  3333. // enumerate them as if they were in a single namespace.
  3334. //
  3335. //
  3336. // [Member functions]
  3337. //
  3338. // IAugmentedShellFolder::AddNameSpace(rguidObject, psf, pidl)
  3339. // Add the object represented by the IShellFolder interface to
  3340. // the augmented list. The rguidObject is used to identify the
  3341. // given object. It may be NULL. The optional pidl refers to
  3342. // the location of the psf.
  3343. //
  3344. // IAugmentedShellFolder::GetNameSpaceID(pidl, rguidOut)
  3345. // This method returns the rguidObject associated with the given
  3346. // pidl. This is how a caller can identify which namespace the
  3347. // pidl resides, given the list of IShellFolder objects that were
  3348. // added to this augmented object.
  3349. //
  3350. // IAugmentedShellFolder::QueryNameSpace(dwNameSpaceID, pguidOut, ppsf)
  3351. // Returns the shellfolder and guid associated with the given ID.
  3352. //
  3353. // IAugmentedShellFolder::EnumNameSpace(uNameSpace, pdwNameSpaceID)
  3354. // Enumerates the namespace shellfolders. If uNameSpace is -1,
  3355. // pdwNameSpaceID is ignored and this method returns the count of
  3356. // shellfolders in the augmented namespace. Call this method with
  3357. // uNameSpace starting at 0 to begin enumerating. Returns S_OK and
  3358. // and namespace ID in *pdwNameSpaceID.
  3359. //
  3360. //-------------------------------------------------------------------------
  3361. // IAugmentedShellFolder::AddNameSpace flags
  3362. enum
  3363. {
  3364. ASFF_DEFAULT = 0x00000000, // There are no applicable Flags
  3365. ASFF_SORTDOWN = 0x00000001, // Sort the items in this ISF to the bottom.
  3366. ASFF_MERGESAMEGUID = 0x00000002, // Merge only namespaces with the same pguidObjects
  3367. ASFF_COMMON = 0x00000004, // this is a "Common" or "All Users" folder
  3368. // the following should all be collapsed to one ASFF_DEFNAMESPACE
  3369. ASFF_DEFNAMESPACE_BINDSTG = 0x00000100, // The namespace is the default handler for BindToStorage() for merged child items.
  3370. ASFF_DEFNAMESPACE_COMPARE = 0x00000200, // The namespace is the default handler for CompareIDs() for merged child items.
  3371. ASFF_DEFNAMESPACE_VIEWOBJ = 0x00000400, // The namespace is the default handler for CreateViewObject() for merged child items.
  3372. ASFF_DEFNAMESPACE_ATTRIB = 0x00001800, // The namespace is the default handler for GetAttributesOf() for merged child items.
  3373. ASFF_DEFNAMESPACE_DISPLAYNAME = 0x00001000, // The namespace is the default handler for GetDisplayNameOf(), SetNameOf() and ParseDisplayName() for merged child items.
  3374. ASFF_DEFNAMESPACE_UIOBJ = 0x00002000, // The namespace is the default handler for GetUIObjectOf() for merged child items.
  3375. ASFF_DEFNAMESPACE_ITEMDATA = 0x00004000, // The namespace is the default handler for GetItemData() for merged child items.
  3376. ASFF_DEFNAMESPACE_ALL = 0x0000FF00 // The namespace is the primary handler for all IShellFolder operations on merged child items.
  3377. };
  3378. enum QUERYNAMESPACEINFO_MASK
  3379. {
  3380. ASFQNSI_FLAGS = 0x00000001,
  3381. ASFQNSI_FOLDER = 0x00000002,
  3382. ASFQNSI_GUID = 0x00000004,
  3383. ASFQNSI_PIDL = 0x00000008,
  3384. };
  3385. #include <pshpack8.h>
  3386. typedef struct QUERYNAMESPACEINFO
  3387. {
  3388. DWORD cbSize;
  3389. DWORD dwMask;
  3390. DWORD dwFlags; // ASFF_*
  3391. IShellFolder *psf;
  3392. GUID guidObject;
  3393. LPITEMIDLIST pidl;
  3394. } QUERYNAMESPACEINFO;
  3395. #include <poppack.h> /* Return to byte packing */
  3396. #undef INTERFACE
  3397. #define INTERFACE IAugmentedShellFolder
  3398. DECLARE_INTERFACE_(IAugmentedShellFolder, IShellFolder)
  3399. {
  3400. // *** IUnknown methods ***
  3401. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3402. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3403. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3404. // *** IShellFolder methods ***
  3405. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner,LPBC pbc, LPOLESTR pszDisplayName,
  3406. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  3407. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  3408. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3409. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3410. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  3411. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  3412. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl, ULONG * rgfInOut) PURE;
  3413. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  3414. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  3415. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  3416. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  3417. LPCOLESTR pszName, DWORD uFlags,
  3418. LPITEMIDLIST * ppidlOut) PURE;
  3419. // *** IAugmentedShellFolder methods ***
  3420. STDMETHOD(AddNameSpace) (THIS_ const GUID * pguidObject, IShellFolder * psf,
  3421. LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  3422. STDMETHOD(GetNameSpaceID) (THIS_ LPCITEMIDLIST pidl, GUID * pguidOut) PURE;
  3423. STDMETHOD(QueryNameSpace) (THIS_ DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf) PURE;
  3424. STDMETHOD(EnumNameSpace) (THIS_ DWORD uNameSpace, DWORD * pdwID) PURE;
  3425. };
  3426. #undef INTERFACE
  3427. #define INTERFACE IAugmentedShellFolder2
  3428. DECLARE_INTERFACE_(IAugmentedShellFolder2, IAugmentedShellFolder)
  3429. {
  3430. // *** IUnknown methods ***
  3431. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3432. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3433. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3434. // *** IShellFolder methods ***
  3435. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  3436. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  3437. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  3438. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3439. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3440. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  3441. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  3442. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  3443. ULONG * rgfInOut) PURE;
  3444. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  3445. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  3446. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  3447. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  3448. LPCOLESTR pszName, DWORD uFlags,
  3449. LPITEMIDLIST * ppidlOut) PURE;
  3450. // *** IAugmentedShellFolder methods ***
  3451. STDMETHOD(AddNameSpace) (THIS_ const GUID * pguidObject, IShellFolder * psf,
  3452. LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  3453. STDMETHOD(GetNameSpaceID) (THIS_ LPCITEMIDLIST pidl, GUID * pguidOut) PURE;
  3454. STDMETHOD(QueryNameSpace) (THIS_ DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf) PURE;
  3455. STDMETHOD(EnumNameSpace) (THIS_ DWORD uNameSpace, DWORD * pdwID) PURE;
  3456. // *** IAugmentedShellFolder2 methods ***
  3457. STDMETHOD(UnWrapIDList) (THIS_ LPCITEMIDLIST pidlWrap, LONG cPidls, IShellFolder ** apsf, LPITEMIDLIST * apidlFolder, LPITEMIDLIST * apidlItems, LONG * pcFetched ) PURE ;
  3458. };
  3459. #undef INTERFACE
  3460. #define INTERFACE IAugmentedShellFolder3
  3461. DECLARE_INTERFACE_(IAugmentedShellFolder3, IAugmentedShellFolder2)
  3462. {
  3463. // *** IUnknown methods ***
  3464. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3465. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3466. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3467. // *** IShellFolder methods ***
  3468. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  3469. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  3470. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  3471. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3472. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3473. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  3474. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  3475. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  3476. ULONG * rgfInOut) PURE;
  3477. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  3478. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  3479. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  3480. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  3481. LPCOLESTR pszName, DWORD uFlags,
  3482. LPITEMIDLIST * ppidlOut) PURE;
  3483. // *** IAugmentedShellFolder methods ***
  3484. STDMETHOD(AddNameSpace) (THIS_ const GUID * pguidObject, IShellFolder * psf,
  3485. LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  3486. STDMETHOD(GetNameSpaceID) (THIS_ LPCITEMIDLIST pidl, GUID * pguidOut) PURE;
  3487. STDMETHOD(QueryNameSpace) (THIS_ DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf) PURE;
  3488. STDMETHOD(EnumNameSpace) (THIS_ DWORD uNameSpace, DWORD * pdwID) PURE;
  3489. // *** IAugmentedShellFolder2 methods ***
  3490. STDMETHOD(UnWrapIDList) (THIS_ LPCITEMIDLIST pidlWrap, LONG cPidls, IShellFolder ** apsf, LPITEMIDLIST * apidlFolder, LPITEMIDLIST * apidlItems, LONG * pcFetched ) PURE ;
  3491. // *** IAugmentedShellFolder3 methods ***
  3492. STDMETHOD(QueryNameSpace2) (THIS_ DWORD dwID, QUERYNAMESPACEINFO *pqnsi) PURE;
  3493. };
  3494. //-------------------------------------------------------------------------
  3495. //
  3496. // IProxyShellFolder interface
  3497. //
  3498. // This provides methods to set a proxy object which can respond
  3499. // to GetUIObjectOf instead of or in addition to the hosted object
  3500. // the supports IShellFolder. All other methods are forwarded onto
  3501. // the hosted object. The CLSID_HostProxyShellFolder object implements
  3502. // this interface.
  3503. //
  3504. // The Win95 shell does not support aggregation, so this object
  3505. // must be extra careful that it follows the rules of COM.
  3506. //
  3507. // This interface is implemented by an object that wishes to provide
  3508. // more support for GetUIObjectOf on behalf of another object that
  3509. // implements an original IShellFolder.
  3510. //
  3511. // [Member functions]
  3512. //
  3513. // IProxyShellFolder::InitHostProxy(psf, pidl, punk, dwFlags)
  3514. // Set the object that implements IProxyShellFolder. Depending
  3515. // on dwFlags, this object will be called instead of or in addition
  3516. // to the host's method.
  3517. //
  3518. // SPF_PRIORITY - call the proxy's method instead of
  3519. // the host's method.
  3520. // SPF_SECONDARY - call the proxy's method only if the
  3521. // host's method doesn't support it.
  3522. // SPF_INHERIT - create a new object of this class and
  3523. // hand it back for BindToObject.
  3524. // SPF_FOLDERPRECEDENCE - have the proxy give folders priority
  3525. // over files in a call to CompareIDs.
  3526. // SPF_HAVECALLBACK - have the proxy call the owner's
  3527. // IOleCommandTarget on each enumerated
  3528. // object, for filtering.
  3529. //
  3530. // Also sets as the host the given object which fully implements
  3531. // IShellFolder. pidl refers to the shell folder.
  3532. //
  3533. // IProxyShellFolder::CloneProxyPSF(riid, ppv)
  3534. // Tells the object to clone itself. The host proxy will call this
  3535. // whenever IShellFolder::BindToObject is called.
  3536. //
  3537. // IProxyShellFolder::GetUIObjectOfPSF(hwndOwner, cidl, apidl, riid, prgfInOut, ppv)
  3538. // Called by CLSID_HostProxyShellFolder to allow the proxy object
  3539. // an opportunity to respond.
  3540. //
  3541. // IProxyShellFolder::CreateViewObjectPSF(hwndOwner, riid, ppv)
  3542. // Called by CLSID_HostProxyShellFolder to allow the proxy object
  3543. // an opportunity to respond.
  3544. //
  3545. //-------------------------------------------------------------------------
  3546. // SetProxyObject flags
  3547. #define SPF_PRIORITY 0x00000001 // This is mutually exclusive w/ SPF_SECONDARY
  3548. #define SPF_SECONDARY 0x00000002
  3549. #define SPF_INHERIT 0x00000004
  3550. #define SPF_FOLDERPRECEDENCE 0x00000008
  3551. #define SPF_HAVECALLBACK 0x00000010
  3552. //For filtering of Pidls
  3553. #define PHID_FilterOutPidl 0
  3554. #undef INTERFACE
  3555. #define INTERFACE IProxyShellFolder
  3556. DECLARE_INTERFACE_(IProxyShellFolder, IShellFolder)
  3557. {
  3558. // *** IUnknown methods ***
  3559. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3560. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3561. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3562. // *** IShellFolder methods ***
  3563. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  3564. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  3565. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  3566. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3567. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3568. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  3569. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  3570. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  3571. ULONG * rgfInOut) PURE;
  3572. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  3573. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  3574. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  3575. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  3576. LPCOLESTR pszName, DWORD uFlags,
  3577. LPITEMIDLIST * ppidlOut) PURE;
  3578. // *** IProxyShellFolder methods ***
  3579. STDMETHOD(InitHostProxy) (THIS_ IShellFolder * psf, LPCITEMIDLIST pidl, DWORD dwFlags) PURE;
  3580. STDMETHOD(CloneProxyPSF) (THIS_ REFIID riid, void **ppv) PURE;
  3581. STDMETHOD(GetUIObjectOfPSF) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  3582. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  3583. STDMETHOD(CreateViewObjectPSF) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  3584. };
  3585. //-------------------------------------------------------------------------
  3586. //
  3587. // BUGBUG (scotth): I don't think we're using this anymore.
  3588. //
  3589. // ISetWinHandler interface
  3590. //
  3591. // [Member functions]
  3592. //
  3593. // ISetWinHandler::SetWindow(hwndOwner)
  3594. // Specifies the window owner. This may be NULL.
  3595. //
  3596. // ISetWinHandler::SetWinHandler(punk)
  3597. // Gives a pointer to an object which supports IWinEventHandler. The
  3598. // hwnd will be the window handle set by the SetWindow method. The
  3599. // handler should return S_OK if the message is handled, otherwise S_FALSE.
  3600. //
  3601. //-------------------------------------------------------------------------
  3602. #undef INTERFACE
  3603. #define INTERFACE ISetWinHandler
  3604. DECLARE_INTERFACE_(ISetWinHandler, IUnknown)
  3605. {
  3606. // *** IUnknown methods ***
  3607. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3608. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3609. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3610. // *** ISetWinHandler methods ***
  3611. STDMETHOD(SetWindow) (THIS_ HWND hwndOwner) PURE;
  3612. STDMETHOD(SetWinHandler) (THIS_ IUnknown * punk) PURE;
  3613. };
  3614. //-------------------------------------------------------------------------
  3615. //
  3616. // IMenuShellFolder interface
  3617. //
  3618. // This wraps a static HMENU with an IShellFolder interface.
  3619. //
  3620. //
  3621. // [Member functions]
  3622. //
  3623. // IMenuShellFolder::SetMenu(hmenu)
  3624. // Specifies the hmenu to wrap. This may be NULL.
  3625. //
  3626. // BUGBUG (scotth): does this copy or not?
  3627. //
  3628. // IMenuShellFolder::GetMenu(phmenu)
  3629. // Returns the current menu in *phmenu. Returns S_FALSE if no menu is
  3630. // set (*phmenu will be NULL).
  3631. //
  3632. // IMenuShellFolder::SetWindow(hwndOwner)
  3633. // Specifies the window owner. This may be NULL.
  3634. //
  3635. //-------------------------------------------------------------------------
  3636. // Messages sent to the WinEventHandler wParam lParam *plRet
  3637. // ------ ------ ---
  3638. #define MSFM_COMMAND (MSFM_FIRST+0) // cmd ID 0
  3639. #define MSFM_ISDROPTARGET (MSFM_FIRST+1) // id 0 1 if yes
  3640. #undef INTERFACE
  3641. #define INTERFACE IMenuShellFolder
  3642. DECLARE_INTERFACE_(IMenuShellFolder, IShellFolder)
  3643. {
  3644. // *** IUnknown methods ***
  3645. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3646. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3647. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3648. // *** IShellFolder methods ***
  3649. STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner, LPBC pbc, LPOLESTR pszDisplayName,
  3650. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
  3651. STDMETHOD(EnumObjects) (THIS_ HWND hwndOwner, DWORD grfFlags, IEnumIDList ** ppenumIDList) PURE;
  3652. STDMETHOD(BindToObject) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3653. STDMETHOD(BindToStorage) (THIS_ LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) PURE;
  3654. STDMETHOD(CompareIDs) (THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  3655. STDMETHOD(CreateViewObject) (THIS_ HWND hwndOwner, REFIID riid, void **ppv) PURE;
  3656. STDMETHOD(GetAttributesOf) (THIS_ UINT cidl, LPCITEMIDLIST * apidl,
  3657. ULONG * rgfInOut) PURE;
  3658. STDMETHOD(GetUIObjectOf) (THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  3659. REFIID riid, UINT * prgfInOut, void **ppv) PURE;
  3660. STDMETHOD(GetDisplayNameOf) (THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
  3661. STDMETHOD(SetNameOf) (THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,
  3662. LPCOLESTR pszName, DWORD uFlags,
  3663. LPITEMIDLIST * ppidlOut) PURE;
  3664. // *** IMenuShellFolder methods ***
  3665. STDMETHOD(SetMenu) (THIS_ HMENU hmenu) PURE;
  3666. STDMETHOD(GetMenu) (THIS_ HMENU * phmenu) PURE;
  3667. STDMETHOD(SetWindow) (THIS_ HWND hwndOwner) PURE;
  3668. STDMETHOD(GetWindow) (THIS_ HWND *phwndOwner) PURE;
  3669. STDMETHOD(GetIDPosition) (THIS_ LPCITEMIDLIST pidl, int * pnPos) PURE;
  3670. };
  3671. //-------------------------------------------------------------------------
  3672. //
  3673. // ITranslateShellChangeNotify interface
  3674. //
  3675. // This interface allows an object to translate the pidls that are
  3676. // passed to it.
  3677. //
  3678. // Note: IE4 had an interface of the same name but with a different IID,
  3679. // so there is no conflict.
  3680. //
  3681. // [Member functions]
  3682. //
  3683. // ITranslateShellChangeNotify::TranslateIDs(&lEvent, pidl1, pidl2, ppidlOut1, ppidlOut2)
  3684. // Return converted pidls given the event. it also can change the event if appropriate
  3685. //
  3686. //-------------------------------------------------------------------------
  3687. #undef INTERFACE
  3688. #define INTERFACE ITranslateShellChangeNotify
  3689. DECLARE_INTERFACE_(ITranslateShellChangeNotify, IUnknown)
  3690. {
  3691. // *** IUnknown methods ***
  3692. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3693. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3694. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3695. // *** ITranslateShellChangeNotify methods ***
  3696. STDMETHOD(TranslateIDs) (THIS_ LONG *plEvent , LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, LPITEMIDLIST * ppidlOut1, LPITEMIDLIST * ppidlOut2,
  3697. LONG *plEvent2, LPITEMIDLIST * ppidlOut1Event2, LPITEMIDLIST * ppidlOut2Event2) PURE;
  3698. STDMETHOD(IsChildID)(THIS_ LPCITEMIDLIST pidlKid, BOOL fImmediate) PURE;
  3699. STDMETHOD(IsEqualID)(THIS_ LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
  3700. STDMETHOD(Register)(THIS_ HWND hwnd, UINT uMsg, long lEvents) PURE;
  3701. STDMETHOD(Unregister)(THIS) PURE;
  3702. };
  3703. ////////////////////////////////////////////////////
  3704. //
  3705. // IRegTreeOptions
  3706. //
  3707. typedef enum tagBUTTON_STATES
  3708. {
  3709. IDCHECKED,
  3710. IDUNCHECKED,
  3711. IDRADIOON,
  3712. IDRADIOOFF,
  3713. IDUNKNOWN
  3714. } BUTTON_STATES;
  3715. //
  3716. // Avoid conflicts in the windows\shell project
  3717. //
  3718. #ifndef NO_SHELL_TREE_TYPE
  3719. typedef enum tagTREE_TYPE
  3720. {
  3721. TREE_CHECKBOX,
  3722. TREE_RADIO,
  3723. TREE_GROUP,
  3724. TREE_UNKNOWN
  3725. } TREE_TYPE;
  3726. #endif // NO_SHELL_TREE_TYPE
  3727. typedef enum tagWALK_TREE_CMD
  3728. {
  3729. WALK_TREE_SAVE,
  3730. WALK_TREE_DELETE,
  3731. WALK_TREE_RESTORE,
  3732. WALK_TREE_REFRESH
  3733. } WALK_TREE_CMD;
  3734. enum REG_CMD
  3735. {
  3736. REG_SET,
  3737. REG_GET,
  3738. REG_GETDEFAULT
  3739. };
  3740. #undef INTERFACE
  3741. #define INTERFACE IRegTreeOptions
  3742. DECLARE_INTERFACE_(IRegTreeOptions, IUnknown)
  3743. {
  3744. // *** IUnknown methods ***
  3745. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3746. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3747. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3748. // *** IRegTreeOptions specific methods ***
  3749. STDMETHOD(InitTree)(THIS_ HWND hwndTree, HKEY hkeyRoot, LPCSTR pszRegKey, LPCSTR pszParam) PURE;
  3750. STDMETHOD(WalkTree)(THIS_ WALK_TREE_CMD cmd ) PURE;
  3751. STDMETHOD(ToggleItem)(THIS_ HTREEITEM hti ) PURE;
  3752. STDMETHOD(ShowHelp)(THIS_ HTREEITEM hti , DWORD dwFlags ) PURE;
  3753. };
  3754. //
  3755. // Interface: IShellHotKey
  3756. //
  3757. #undef INTERFACE
  3758. #define INTERFACE IShellHotKey
  3759. DECLARE_INTERFACE_(IShellHotKey, IUnknown)
  3760. {
  3761. // *** IUnknown methods ***
  3762. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3763. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3764. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3765. // *** IShellHotKey methods ***
  3766. STDMETHOD(RegisterHotKey)(THIS_ IShellFolder * psf, LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidl) PURE;
  3767. };
  3768. //
  3769. // Interface: ITrayPriv
  3770. //
  3771. // Purpose: Talks to the new Start Menu code in Shdocvw from explorer.exe
  3772. //
  3773. // For flags on ShowFolder see inc\IETHREAD.H
  3774. //
  3775. #undef INTERFACE
  3776. #define INTERFACE ITrayPriv
  3777. DECLARE_INTERFACE_(ITrayPriv, IOleWindow)
  3778. {
  3779. // *** IUnknown methods ***
  3780. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3781. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3782. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3783. // *** IOleWindow methods ***
  3784. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  3785. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  3786. // *** ITrayPriv methods ***
  3787. STDMETHOD(ExecItem)(THIS_ IShellFolder* psf, LPCITEMIDLIST pidl) PURE;
  3788. STDMETHOD(GetFindCM)(THIS_ HMENU hmenu, UINT idFirst, UINT idLast, IContextMenu** ppcmFind) PURE;
  3789. STDMETHOD(GetStaticStartMenu)(THIS_ HMENU* phmenu) PURE;
  3790. };
  3791. // ITrayPriv2 - new for Whistler
  3792. //
  3793. // Purpose: Allows Explorer Start Menu object to participate in customdraw.
  3794. //
  3795. #undef INTERFACE
  3796. #define INTERFACE ITrayPriv2
  3797. DECLARE_INTERFACE_(ITrayPriv2, ITrayPriv)
  3798. {
  3799. // *** IUnknown methods ***
  3800. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3801. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3802. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3803. // *** IOleWindow methods ***
  3804. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  3805. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  3806. // *** ITrayPriv methods ***
  3807. STDMETHOD(ExecItem)(THIS_ IShellFolder* psf, LPCITEMIDLIST pidl) PURE;
  3808. STDMETHOD(GetFindCM)(THIS_ HMENU hmenu, UINT idFirst, UINT idLast, IContextMenu** ppcmFind) PURE;
  3809. STDMETHOD(GetStaticStartMenu)(THIS_ HMENU* phmenu) PURE;
  3810. // *** ITrayPriv2 methods ***
  3811. STDMETHOD(ModifySMInfo)(THIS_ IN LPSMDATA psmd, IN OUT SMINFO *psminfo) PURE;
  3812. };
  3813. //
  3814. // Interface: IFolderShortcutConvert
  3815. //
  3816. // Purpose: Converts between FolderShortcuts and links
  3817. //
  3818. #undef INTERFACE
  3819. #define INTERFACE IFolderShortcutConvert
  3820. DECLARE_INTERFACE_(IFolderShortcutConvert, IUnknown)
  3821. {
  3822. // *** IUnknown methods ***
  3823. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3824. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  3825. STDMETHOD_(ULONG,Release)(THIS) PURE;
  3826. //*** IFolderShortcutConvert methods ***
  3827. STDMETHOD(ConvertToLink)(THIS_ LPCOLESTR pszFSPath, DWORD fFlags) PURE;
  3828. STDMETHOD(ConvertToFolderShortcut)(THIS_ LPCOLESTR pszLinkPath, DWORD fFlags) PURE;
  3829. };
  3830. //
  3831. // Interface: IShellFolderTask
  3832. //
  3833. // Purpose: Initializes a task that does something by enumerating a shellfolder
  3834. //
  3835. #undef INTERFACE
  3836. #define INTERFACE IShellFolderTask
  3837. DECLARE_INTERFACE_(IShellFolderTask, IUnknown)
  3838. {
  3839. // *** IUnknown methods ***
  3840. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3841. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  3842. STDMETHOD_(ULONG,Release)(THIS) PURE;
  3843. // *** IShellFolderTask methods ***
  3844. STDMETHOD(InitTaskSFT)(THIS_ IShellFolder *psfParent, LPITEMIDLIST pidlFull,
  3845. LONG nMaxRecursionLevel, DWORD dwFlags, DWORD dwTaskPriority) PURE;
  3846. };
  3847. // Flags for InitTaskSFT
  3848. #define ITSFT_RECURSE 0x00000001 // recurse into subfolders
  3849. //
  3850. // Interface: IStartMenuTask
  3851. //
  3852. // Purpose: Initializes a task that does something for the start menu
  3853. //
  3854. #undef INTERFACE
  3855. #define INTERFACE IStartMenuTask
  3856. DECLARE_INTERFACE_(IStartMenuTask, IShellFolderTask)
  3857. {
  3858. // *** IUnknown methods ***
  3859. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  3860. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  3861. STDMETHOD_(ULONG,Release)(THIS) PURE;
  3862. // *** IShellFolderTask methods ***
  3863. STDMETHOD(InitTaskSFT)(THIS_ IShellFolder *psfParent, LPITEMIDLIST pidlFull,
  3864. LONG nMaxRecursionLevel, DWORD dwFlags, DWORD dwTaskPriority) PURE;
  3865. // *** IStartMenuTask methods ***
  3866. STDMETHOD(InitTaskSMT)(THIS_ IShellHotKey * photkey, int iThreadPriority) PURE;
  3867. };
  3868. //
  3869. // Interface: IContextMenuCB
  3870. //
  3871. // Purpose: A call defview context menu callback object
  3872. //
  3873. #undef INTERFACE
  3874. #define INTERFACE IContextMenuCB
  3875. DECLARE_INTERFACE_(IContextMenuCB, IUnknown)
  3876. {
  3877. // *** IUnknown methods ***
  3878. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3879. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3880. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3881. // *** IContextMenuCB methods ***
  3882. STDMETHOD(CallBack) (THIS_ IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg,
  3883. WPARAM wParam, LPARAM lParam) PURE;
  3884. };
  3885. //
  3886. // Possible underline settings for shell icons.
  3887. //
  3888. enum
  3889. {
  3890. ICON_YES,
  3891. ICON_NO,
  3892. ICON_HOVER,
  3893. ICON_IE // Use IE hyperlink settings
  3894. };
  3895. //-----------------------------------------------
  3896. // IOleCommand Target Command IDs
  3897. // CGID_BandHandler
  3898. // Get the order stream from parent.
  3899. #define BHCMDID_GetOrderStream 0x00000001
  3900. // CGID_Persist
  3901. // Set the storage key.
  3902. #define MCBID_SetKey 0x00000001
  3903. // CGID_MenuBandItem
  3904. #define MBICMDID_IsVisible 0x00000001
  3905. // CGID_MenuBand
  3906. #define MBANDCID_REFRESH 0x10000000
  3907. //
  3908. // Interface: IShellMallocSpy
  3909. //
  3910. // Purpose: Facilitate IMallocSpy in the shell
  3911. //
  3912. #undef INTERFACE
  3913. #define INTERFACE IShellMallocSpy
  3914. DECLARE_INTERFACE_(IShellMallocSpy, IUnknown)
  3915. {
  3916. // *** IUnknown methods ***
  3917. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3918. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3919. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3920. // *** IShellMallocSpy methods ***
  3921. STDMETHOD(RegisterSpy) (THIS) PURE;
  3922. STDMETHOD(RevokeSpy) (THIS) PURE;
  3923. STDMETHOD(SetTracking) (THIS_ BOOL bTrack) PURE;
  3924. STDMETHOD(AddToList) (THIS_ void *pv, SIZE_T cb) PURE;
  3925. STDMETHOD(RemoveFromList) (THIS_ void *pv) PURE;
  3926. };
  3927. #undef INTERFACE
  3928. #define INTERFACE ISearchProvider
  3929. DECLARE_INTERFACE_(ISearchProvider, IUnknown)
  3930. {
  3931. // *** IUnknown methods ***
  3932. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3933. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3934. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3935. // *** ISearchObject methods ***
  3936. STDMETHOD(GetSearchGUID)(THIS_ LPGUID lpGuid) PURE;
  3937. };
  3938. #undef INTERFACE
  3939. #define INTERFACE ISearchItems
  3940. DECLARE_INTERFACE_(ISearchItems, IUnknown)
  3941. {
  3942. // *** IUnknown methods ***
  3943. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3944. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3945. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3946. // *** ISearchItems methods ***
  3947. //used by CSearchBand
  3948. STDMETHOD(GetDefaultSearchUrl) (THIS_ LPWSTR pwzUrl, UINT cch) PURE;
  3949. };
  3950. #undef INTERFACE
  3951. #define INTERFACE ISearchBandTBHelper50
  3952. DECLARE_INTERFACE_(ISearchBandTBHelper50, IUnknown)
  3953. {
  3954. // *** IUnknown methods ***
  3955. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3956. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3957. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3958. // *** ISearchBandTBHelper50 methods ***
  3959. // implemented by CSearchBand
  3960. STDMETHOD(AddNextMenuItem) (THIS_ LPCWSTR pwszText, int idItem) PURE;
  3961. STDMETHOD(SetOCCallback) (THIS_ IOleCommandTarget *pOleCmdTarget) PURE;
  3962. STDMETHOD(ResetNextMenu) (THIS) PURE;
  3963. };
  3964. #undef INTERFACE
  3965. #define INTERFACE ISearchBandTBHelper
  3966. DECLARE_INTERFACE_(ISearchBandTBHelper, IUnknown)
  3967. {
  3968. // *** IUnknown methods ***
  3969. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  3970. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3971. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3972. // *** ISearchBandTBHelper methods ***
  3973. // implemented by CSearchBand
  3974. STDMETHOD(AddNextMenuItem) (THIS_ LPCWSTR pwszText, int idItem) PURE;
  3975. STDMETHOD(SetOCCallback) (THIS_ IOleCommandTarget *pOleCmdTarget) PURE;
  3976. STDMETHOD(ResetNextMenu) (THIS) PURE;
  3977. STDMETHOD(NavigateToPidl) (THIS_ LPCITEMIDLIST pidl) PURE;
  3978. };
  3979. #undef INTERFACE
  3980. #define INTERFACE IEnumUrlSearch
  3981. #include <pshpack8.h>
  3982. typedef struct
  3983. {
  3984. GUID guid;
  3985. WCHAR wszName[80];
  3986. WCHAR wszUrl[2048];
  3987. } URLSEARCH, *LPURLSEARCH;
  3988. #include <poppack.h> /* Return to byte packing */
  3989. DECLARE_INTERFACE_(IEnumUrlSearch, IUnknown)
  3990. {
  3991. // *** IUnknown methods ***
  3992. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  3993. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  3994. STDMETHOD_(ULONG,Release) (THIS) PURE;
  3995. // *** IEnumUrlSearch methods ***
  3996. STDMETHOD(Next)(THIS_ ULONG celt, LPURLSEARCH rgelt, ULONG *pceltFetched) PURE;
  3997. STDMETHOD(Skip)(THIS_ ULONG celt) PURE;
  3998. STDMETHOD(Reset)(THIS) PURE;
  3999. STDMETHOD(Clone)(THIS_ IEnumUrlSearch **ppenum) PURE;
  4000. };
  4001. #undef INTERFACE
  4002. #define INTERFACE IFolderSearches
  4003. DECLARE_INTERFACE_(IFolderSearches, IUnknown)
  4004. {
  4005. // *** IUnknown methods ***
  4006. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  4007. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4008. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4009. // *** IFolderSearches methods ***
  4010. STDMETHOD(EnumSearches) (THIS_ IEnumUrlSearch **ppenum) PURE;
  4011. STDMETHOD(DefaultSearch) (THIS_ GUID *pguid) PURE;
  4012. };
  4013. #undef INTERFACE
  4014. #define INTERFACE IUserAssist
  4015. typedef struct
  4016. {
  4017. DWORD cbSize; // SIZEOF
  4018. DWORD dwMask; // INOUT requested/given (UEIM_*)
  4019. int cHit; // profile count
  4020. DWORD dwAttrs; // attributes (UEIA_*)
  4021. FILETIME ftExecute; // Last execute filetime
  4022. } UEMINFO, *LPUEMINFO;
  4023. #define UEIM_HIT 0x01
  4024. #define UEIM_FILETIME 0x02
  4025. DECLARE_INTERFACE_(IUserAssist, IUnknown)
  4026. {
  4027. // *** IUnknown methods ***
  4028. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4029. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4030. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4031. // *** IUserAssist methods ***
  4032. STDMETHOD(FireEvent)(THIS_ const GUID *pguidGrp, int eCmd, DWORD dwFlags, WPARAM wParam, LPARAM lParam) PURE;
  4033. STDMETHOD(QueryEvent)(THIS_ const GUID *pguidGrp, int eCmd, WPARAM wParam, LPARAM lParam, LPUEMINFO pui) PURE;
  4034. STDMETHOD(SetEvent)(THIS_ const GUID *pguidGrp, int eCmd, WPARAM wParam, LPARAM lParam, LPUEMINFO pui) PURE;
  4035. };
  4036. // This exists for the Internet Control Panel to be able to toggle who is the
  4037. // currently installed handler for FTP for the browser.
  4038. DECLARE_INTERFACE_(IFtpInstaller, IUnknown)
  4039. {
  4040. // *** IUnknown methods ***
  4041. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4042. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4043. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4044. // *** IFtpInstaller methods ***
  4045. STDMETHOD(IsIEDefautlFTPClient)(THIS) PURE;
  4046. STDMETHOD(RestoreFTPClient)(THIS) PURE;
  4047. STDMETHOD(MakeIEDefautlFTPClient)(THIS) PURE;
  4048. };
  4049. // DOC'ed for DOJ compliance
  4050. #define CLR_MYINVALID 0x8fffffff // I need to use a special value since CLR_INVALID == CLR_NONE!!!!
  4051. #define ISVALIDCOLOR(a) ((a) != CLR_MYINVALID)
  4052. // The following are used as indexes into the crCustomColors array.
  4053. #define CRID_CUSTOMTEXTBACKGROUND 0
  4054. #define CRID_CUSTOMTEXT 1
  4055. #define CRID_COLORCOUNT 2
  4056. typedef struct _CUSTOMVIEWSDATA
  4057. {
  4058. DWORD cchSizeOfBlock; // size of lpDataBlock in WCHARs
  4059. LPWSTR lpDataBlock; // Pointer to the Strings data block, allocated by the task allocator (SHAlloc)
  4060. // The following are offsets (in WCHARs) to be added to lpDataBlock.
  4061. // If the offset is -1 => That data is not present for this view.
  4062. int acchOffExtViewUIstr[6]; // ID_EXTVIEWSTRCOUNT was 6, but is no longer used
  4063. COLORREF crCustomColors[CRID_COLORCOUNT];
  4064. // Once IE4 ships, we can extend this structure by adding new SFVF_ flags
  4065. // in the main structure that say "customviewsdata contains xxx info".
  4066. } CUSTOMVIEWSDATA;
  4067. //
  4068. // Interface for enumerating "external" views for the ShellFolderView
  4069. //
  4070. typedef struct _SFVVIEWSDATA
  4071. {
  4072. // idView specifies the view. Unless specified in pCustomData, look up
  4073. // HKLM\CLSID\Software\Microsoft\Windows\CurrentVersion\ExtShellFolderViews\idView
  4074. // to find the menu name, help text, tt text.
  4075. //
  4076. // the shell's IShellFolderView implementations get these as
  4077. // subkeys of the shellex\ExtShellFolderViews key under the folder's
  4078. // clsid type (or progid type, depending on the IShellFolderView impl).
  4079. //
  4080. // In desktop.ini, these are keys read from the [ExtShellFolderViews]
  4081. // section, in the form of "{idView}" or "{idView}={idExtShellView}"
  4082. //
  4083. GUID idView; // This is the GUID that specifies the View.
  4084. // idExtShellView specifies the IDefViewExtInit IShellView extension
  4085. // to use for this view.
  4086. //
  4087. // the shell's IShellFolderView implementations get this from
  4088. // the "ISV" value under the shellex\ExtShellFolderViews\{idView}
  4089. // key in the registry.
  4090. //
  4091. // In desktop.ini, this is read from the [ExtShellFolderViews]
  4092. // section, in the form of "{idView}={idExtShellView}"
  4093. //
  4094. GUID idExtShellView; // [optional] This is the GUID for the extended IShellView
  4095. // dwFlags - see the SFVF_ flags below.
  4096. //
  4097. // the shell's IShellFolderView implementations get this from
  4098. // the "Attributes" value under the shellex\ExtShellFolderViews\{idView}
  4099. // key in the registry.
  4100. //
  4101. // In desktop.ini, this is read from the [{idView}] section,
  4102. // from the "Attributes=" line.
  4103. //
  4104. DWORD dwFlags;
  4105. // lParam is passed to IShellView view extensions
  4106. //
  4107. // the shell's IShellFolderView implementations get this from
  4108. // the "lparam" value under the shellex\ExtShellFolderViews\{idView}
  4109. // key in the registry.
  4110. //
  4111. // In desktop.ini, this is read from the [{idView}] section,
  4112. // from the "LParam=" line.
  4113. //
  4114. DWORD lParam;
  4115. // wszMoniker is used to either bind to a docobject extended view,
  4116. // or as the data for an idExtShellView view.
  4117. //
  4118. // the shell's IShellFolderView implementations get this from
  4119. // the "PersistMoniker" value under the shellex\ExtShellFolderViews\{idView}
  4120. // key in the registry.
  4121. //
  4122. // In desktop.ini, this is read from the [{idView}] section,
  4123. // from the "PersistMoniker=" line.
  4124. //
  4125. WCHAR wszMoniker[MAX_PATH];
  4126. // pCustomData overrides/provides menu and other ui options
  4127. // for this view. If a WebViewFolderContents OC appears in the
  4128. // docobject extended view, it pays attention to color and
  4129. // background bitmaps.
  4130. //
  4131. // the shell's IShellFolderView implementations do not fill out this structure.
  4132. //
  4133. // In desktop.ini, this is read from the [{idView}] section,
  4134. // from the "IconArea_Image", "IconArea_TextBackground", and "IconArea_Text".
  4135. //
  4136. CUSTOMVIEWSDATA *pCustomData; //This is valid only if SFVF_CUSTOMIZEDVIEW is set.
  4137. } SFVVIEWSDATA;
  4138. //
  4139. // SFVF_CUSTOMIZEDVIEW - This flag is set only for those views whose
  4140. // data are picked up from the Desktop.ini.
  4141. //
  4142. #define SFVF_CUSTOMIZEDVIEW 0x80000000
  4143. //
  4144. // SFVF_TREATASNORMAL - This flag is set for those views that wish to
  4145. // be treated as normal views, this means they will show up in the file-open/SaveAs
  4146. // Dialogs.
  4147. //
  4148. #define SFVF_TREATASNORMAL 0x40000000
  4149. //
  4150. // SFVF_NOWEBVIEWFOLDERCONTENTS - This is used to detect those views that
  4151. // never host the WebViewFolderContents OC and so cannot toggle on and off,
  4152. // ie, they are exclusive views such as Thumbnail View.
  4153. //
  4154. #define SFVF_NOWEBVIEWFOLDERCONTENTS 0x20000000
  4155. #undef INTERFACE
  4156. #define INTERFACE IEnumSFVViews
  4157. DECLARE_INTERFACE_(IEnumSFVViews, IUnknown)
  4158. {
  4159. // *** IUnknown methods ***
  4160. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4161. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4162. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4163. // *** IEnumSFVViews methods ***
  4164. STDMETHOD(Next) (THIS_ ULONG celt,
  4165. SFVVIEWSDATA **ppData,
  4166. ULONG *pceltFetched) PURE;
  4167. STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
  4168. STDMETHOD(Reset) (THIS) PURE;
  4169. STDMETHOD(Clone) (THIS_ IEnumSFVViews **ppenum) PURE;
  4170. };
  4171. #undef INTERFACE
  4172. #define INTERFACE IPersistString
  4173. DECLARE_INTERFACE_(IPersistString, IUnknown)
  4174. {
  4175. // *** IUnknown methods ***
  4176. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4177. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4178. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4179. // *** IPersist methods ***
  4180. STDMETHOD(GetClassID) (THIS_ LPCLSID lpClassID) PURE;
  4181. // *** IPersistString methods ***
  4182. STDMETHOD(Initialize) (THIS_ LPCWSTR pwszInit) PURE;
  4183. };
  4184. #pragma warning (disable: 4200)
  4185. #pragma warning (disable: 4510)
  4186. #pragma warning (disable: 4512)
  4187. #pragma warning (disable: 4610)
  4188. // From sdkinc\platform.h
  4189. // We can't simply include that file because it breaks other projects
  4190. // that include platform.h.
  4191. // DOC'ed for DOJ compliance:
  4192. #include <pshpack8.h>
  4193. typedef struct _SFVM_SELCHANGE_DATA
  4194. {
  4195. UINT uOldState;
  4196. UINT uNewState;
  4197. LPARAM lParamItem;
  4198. } SFVM_SELCHANGE_DATA;
  4199. typedef struct _COPYHOOKINFO
  4200. {
  4201. HWND hwnd;
  4202. DWORD wFunc;
  4203. DWORD wFlags;
  4204. LPCTSTR pszSrcFile;
  4205. DWORD dwSrcAttribs;
  4206. LPCTSTR pszDestFile;
  4207. DWORD dwDestAttribs;
  4208. } COPYHOOKINFO;
  4209. typedef struct
  4210. {
  4211. DWORD bWantWebview; // in: caller should return template
  4212. DWORD dwOptions; // out: SFVMQVI_ flags
  4213. WCHAR szWebView[MAX_PATH]; // out: webview template path
  4214. } SFVM_VIEWINFO_DATA;
  4215. typedef struct
  4216. {
  4217. DWORD dwOptions; // out: SFVMQVI_ flags for the [in,wParam]uViewMode
  4218. } SFVM_VIEW_DATA;
  4219. // dwOptions control the state of corresponding [in,wParam]uViewMode:
  4220. #define SFVMQVI_NORMAL 0x0 // out: let defview decide what to do
  4221. #define SFVMQVI_INCLUDE 0x1 // out: force include
  4222. #define SFVMQVI_EXCLUDE 0x2 // out: force exclude
  4223. typedef struct
  4224. {
  4225. FOLDERVIEWMODE fvm; // out: view mode
  4226. BOOL fGroupView; // out: group view on/off
  4227. UINT uSortCol; // out: sort by scid
  4228. int iSortDirection; // out: ascending or descending sort
  4229. FOLDERFLAGS fFlags; // out: folder flags to set (supports FWF_AUTOARRANGE)
  4230. } SFVM_DEFERRED_VIEW_SETTINGS;
  4231. typedef struct
  4232. {
  4233. WCHAR szWebView[MAX_PATH]; // out: webview template path for [in,wParam]uViewMode
  4234. } SFVM_WEBVIEW_TEMPLATE_DATA;
  4235. typedef struct _SFVM_CUSTOMVIEWINFO_DATA
  4236. {
  4237. COLORREF crCustomColors[CRID_COLORCOUNT];
  4238. WCHAR szIconAreaImage[MAX_PATH]; // Note: the old struct used INTERNET_MAX_URL_LENGTH, but we only use local cases so this isn't needed
  4239. } SFVM_CUSTOMVIEWINFO_DATA;
  4240. typedef struct
  4241. {
  4242. DWORD dwLayout; // out: SFVMWLV_ for [in,wParam]uViewMode
  4243. IUnknown* punkPreview; // out: IUnknown of preview control, if SFVMWVL_PREVIEW specified
  4244. } SFVM_WEBVIEW_LAYOUT_DATA;
  4245. // dwLayout:
  4246. #define SFVMWVL_NORMAL 0 // standard Web View format
  4247. #define SFVMWVL_PREVIEW 1 // "preview" Web View format
  4248. #define SFVMWVL_DETAILS 2 // standard Web View format with details expanded by default
  4249. #define SFVMWVL_ITEMS 0x00000000 // HACK (added for Whistler, remove in BlackComb): item Web View format
  4250. #define SFVMWVL_FILES 0x00010000 // HACK (added for Whistler, remove in BlackComb): file Web View format
  4251. #define SFVMWVL_NOPRINT 0x00020000 // HACK (added for Whistler, remove in BlackComb): unconditionally hide "Print this file" folder task
  4252. #define SFVMWVL_NOPUBLISH 0x00040000 // HACK (added for Whistler, remove in BlackComb): unconditionally hide "Publish this file" folder task
  4253. #define SFVMWVL_ORDINAL_MASK 0x0000ffff // HACK (added for Whistler, remove in BlackComb): overload dwLayout for ordinals and flags
  4254. #define SFVMWVL_FLAGS_MASK 0xffff0000 // HACK (added for Whistler, remove in BlackComb): overload dwLayout for ordinals and flags
  4255. typedef struct
  4256. {
  4257. DWORD dwFlags;
  4258. IUIElement* pIntroText; // can be NULL for no explanatory text
  4259. IUIElement* pSpecialTaskHeader; // can be NULL for no special task section
  4260. IUIElement* pFolderTaskHeader; // if NULL, defview will provide a default folder task section
  4261. IEnumIDList* penumOtherPlaces; // if NULL, defview will provide a default Other Places list
  4262. } SFVM_WEBVIEW_CONTENT_DATA;
  4263. // dwFlags:
  4264. #define SFVMWVF_BARRICADE 0x00000001 // this is a barricaded folder
  4265. #define SFVMWVF_ENUMTASKS 0x00000002 // Folder uses non-standard tasks. Will enumerate.
  4266. #define SFVMWVF_NOMORETASKS 0x00000004 // No more tasks in enumeration.
  4267. #define SFVMWVF_SPECIALTASK 0x00000008 // Used in ENUMTASKSECTION_DATA.dwFlags.
  4268. #define SFVMWVF_CONTENTSCHANGE 0x00000010 // Refresh WV content when folder contents change.
  4269. typedef struct
  4270. {
  4271. IEnumUICommand* penumSpecialTasks; // can be NULL for no special task section
  4272. IEnumUICommand* penumFolderTasks; // if NULL, defview will provide a default folder task section
  4273. DWORD dwUpdateFlags; // bitmask of the extra special events that we should listen to
  4274. } SFVM_WEBVIEW_TASKSECTION_DATA;
  4275. // dwUpdateFlags:
  4276. #define SFVMWVTSDF_CONTENTSCHANGE 0x00000001
  4277. typedef struct
  4278. {
  4279. LPCWSTR pszThemeID; // [out] fill with a pointer a string who's lifetime is at least as long as your IShellFolderViewCB object.
  4280. } SFVM_WEBVIEW_THEME_DATA;
  4281. //
  4282. // To replace the standard webview tasks with a set enumerated by the view
  4283. // callback, the callback sets the SFVMWVF_ENUMTASKS flag in the dwFlags
  4284. // member of SFVM_WEBVIEWCONTENT_DATA. This causes the shell to send
  4285. // SFVM_ENUMWEBVIEWTASKS repeatedly in place of SFVM_GETWEBVIEWCONTENT and
  4286. // SFVM_GETWEBVIEWTASKS. Each time SFVM_ENUMWEBVIEWTASKS is sent,
  4287. // the view callback provides a header and task enumerator via a
  4288. // SFVM_WEBVIEW_ENUMTASKSECTION_DATA structure. The message is sent to the
  4289. // view repeatedly until the handler sets the SFVMWVF_NOMORETASKS flag
  4290. // in SFVM_WEBVIEW_ENUMTASKSECTION_DATA.dwFlags. The top-down display order
  4291. // of task sections is the same as the order in which they are provided by
  4292. // the view callback.
  4293. //
  4294. // The dwFlags member of SFVM_WEBVIEW_ENUMTASKSECTION_DATA supports
  4295. // the following values:
  4296. // SFVMWVF_SPECIALTASK - Use the 'special' task section style.
  4297. // If not set, use the 'normal' style.
  4298. // SFVMWVF_NOMORETASKS - Terminate the enumeration.
  4299. //
  4300. typedef struct
  4301. {
  4302. DWORD dwFlags; // SFVMWVF_XXXX flags. See above.
  4303. IUIElement *pHeader;
  4304. IEnumUICommand *penumTasks;
  4305. int idBitmap; // Valid only for SPECIALTASK sections.
  4306. int idWatermark; // Valid only for SPECIALTASK sections.
  4307. } SFVM_WEBVIEW_ENUMTASKSECTION_DATA;
  4308. // WebView Task helper functions provided by shell32
  4309. // to help answer SFVM_GETWEBVIEWCONTENT and SFVM_GETWEBVIEWTASKS messages.
  4310. //
  4311. // The idea here being that you provide task implementations in the static
  4312. // functions with a pv parameter that gets passed through to your static functions
  4313. // so they can get back to your IShellFolderViewCB object. These helper
  4314. // functions assume that all strings are resources to be loaded out of your DLL.
  4315. //
  4316. typedef HRESULT (*PFN_get_State)(IUnknown* pv,IShellItemArray *psiItemArray, BOOL fOkToBeSlow, UISTATE* puisState);
  4317. typedef HRESULT (*PFN_Invoke)(IUnknown* pv,IShellItemArray *psiItemArray, IBindCtx *pbc);
  4318. typedef struct {
  4319. const GUID* pguidCanonicalName;
  4320. LPCWSTR pszDllName;
  4321. DWORD dwTitleIndexNoSelection;
  4322. DWORD dwTitleIndexFileSelected;
  4323. DWORD dwTitleIndexFolderSelected;
  4324. DWORD dwTitleIndexMultiSelected;
  4325. DWORD dwTooltipIndex;
  4326. DWORD dwIconIndex;
  4327. PFN_get_State pfn_get_State;
  4328. PFN_Invoke pfn_Invoke;
  4329. } WVTASKITEM;
  4330. // Use for tasks that want to be displayed when something is selected, where the UI is independent of the selection
  4331. #define WVTI_ENTRY(g, d, t, p, i, s, k) {&(g), (d), (0), (t), (t), (t), (p), (i), (s), (k)}
  4332. // Use for tasks that want to be displayed when nothing is selected
  4333. #define WVTI_ENTRY_NOSELECTION(g, d, t, p, i, s, k) {&(g), (d), (t), 0, 0, 0, (p), (i), (s), (k)}
  4334. // Use for tasks that want to be displayed when a file is selected
  4335. #define WVTI_ENTRY_FILE(g, d, t, p, i, s, k) {&(g), (d), (0), (t), (0), (0), (p), (i), (s), (k)}
  4336. // Use for tasks that want to be displayed when something is selected, and you want different UI depending on the selection
  4337. // Use this one if you want to control the title, but the tooltip is constant:
  4338. #define WVTI_ENTRY_TITLE(g, d, t2, t3, t4, p, i, s, k) {&(g), (d), (0), (t2), (t3), (t4), (p), (i), (s), (k)}
  4339. // Use this one if you want the same text everywhere:
  4340. #define WVTI_ENTRY_ALL(g, d, t, p, i, s, k) {&(g), (d), (t), (t), (t), (t), (p), (i), (s), (k)}
  4341. // Use this one if you want to control everything:
  4342. #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)}
  4343. // Use this one for a header:
  4344. #define WVTI_HEADER(d, t, p) {&(CLSID_NULL), (d), (t), (t), (t), (t), (p), 0, NULL, NULL}
  4345. // Use this one for a header that changes with the selection:
  4346. #define WVTI_HEADER_ENTRY(d, t1, t2, t3, t4, p) {&(CLSID_NULL), (d), (t1), (t2), (t3), (t4), (p), 0, NULL, NULL}
  4347. // Creates an IEnumUICommand over an array of WVTASKITEM structures.
  4348. // The enumerator/objects hold a ref on the pv param for the lifetime of the enumerator/objects.
  4349. // The pv param gets passed through to the static WVTASKITEM.pfn functions.
  4350. //
  4351. HRESULT Create_IEnumUICommand(IUnknown *pv, const WVTASKITEM* rgwvti, UINT cwvti, IEnumUICommand**ppenum);
  4352. // Creates an IUICommand out of a single WVTASKITEM, never calling the pfn functions
  4353. HRESULT Create_IUIElement(const WVTASKITEM* pwvti, IUIElement**ppuie);
  4354. // SFVM_GETNOTIFY: The shell will use the pidl returned from this message to synch
  4355. // change notifies. Folders in Folder Shortcuts should return pidlTarget
  4356. // because that is where the change notifies are sent.
  4357. //
  4358. // DOC'ed for DOJ compliance:
  4359. #define SFVM_SELCHANGE 8 // idCmdFirst,nItem SFVM_SELCHANGE_DATA*
  4360. #define SFVM_DRAWITEM 9 // idCmdFirst DRAWITEMSTRUCT*
  4361. #define SFVM_MEASUREITEM 10 // idCmdFirst MEASUREITEMSTRUCT*
  4362. #define SFVM_EXITMENULOOP 11 // - -
  4363. #define SFVM_PRERELEASE 12 // - -
  4364. #define SFVM_GETCCHMAX 13 // LPCITEMIDLIST pcchMax
  4365. #define SFVM_FSNOTIFY 14 // LPCITEMIDLIST* lEvent
  4366. // DOC'ed for DOJ compliance:
  4367. #define SFVM_WINDOWDESTROY 16 // hwnd -
  4368. #define SFVM_REFRESH 17 // BOOL fPreOrPost - NB: this may be called multiple times in a row
  4369. #define SFVM_SETFOCUS 18 // - -
  4370. #define SFVM_QUERYCOPYHOOK 20 // - -
  4371. #define SFVM_NOTIFYCOPYHOOK 21 // - COPYHOOKINFO*
  4372. // DOC'ed for DOJ compliance:
  4373. #define SFVM_INSERTITEM 29 // pidl -
  4374. #define SFVM_DELETEITEM 30 // pidl -
  4375. // DOC'ed for DOJ compliance:
  4376. #define SFVM_GETWORKINGDIR 33 // uMax pszDir
  4377. #define SFVM_GETCOLSAVESTREAM 34 // flags IStream **
  4378. #define SFVM_SELECTALL 35 // - -
  4379. // DOC'ed for DOJ compliance:
  4380. #define SFVM_SUPPORTSIDENTITY 37 // - - // NOT USED: must support IShellFolder2
  4381. #define SFVM_FOLDERISPARENT 38 // - pidlChild
  4382. // DOC'ed for DOJ compliance:
  4383. #define SFVM_GETVIEWS 40 // SHELLVIEWID* IEnumSFVViews **
  4384. // DOC'ed for DOJ compliance:
  4385. #define SFVM_GETITEMIDLIST 42 // iItem LPITMIDLIST*
  4386. #define SFVM_SETITEMIDLIST 43 // iItem LPITEMIDLIST
  4387. #define SFVM_INDEXOFITEMIDLIST 44 // *iItem LPITEMIDLIST
  4388. #define SFVM_ODFINDITEM 45 // *iItem NM_FINDITEM*
  4389. #define SFVM_HWNDMAIN 46 // hwndMain
  4390. // DOC'ed for DOJ compliance:
  4391. #define SFVM_ARRANGE 50 // - lParamSort
  4392. #define SFVM_QUERYSTANDARDVIEWS 51 // - BOOL * // NOT USED: must use SFVM_GETVIEWDATA instead
  4393. #define SFVM_QUERYREUSEEXTVIEW 52 // - BOOL * // NOT USED
  4394. // DOC'ed for DOJ compliance:
  4395. #define SFVM_GETEMPTYTEXT 54 // cchMax pszText
  4396. #define SFVM_GETITEMICONINDEX 55 // iItem int *piIcon
  4397. #define SFVM_DONTCUSTOMIZE 56 // - BOOL *pbDontCustomize // NOT USED
  4398. // DOC'ed for DOJ compliance:
  4399. #define SFVM_ISOWNERDATA 60 // ISOWNERDATA BOOL *
  4400. #define SFVM_GETODRANGEOBJECT 61 // iWhich ILVRange **
  4401. #define SFVM_ODCACHEHINT 62 // - NMLVCACHEHINT *
  4402. // DOC'ed for DOJ compliance:
  4403. #define SFVM_OVERRIDEITEMCOUNT 64 // - UINT* // NOT USED: allowed override of actual item count for sizing calculations
  4404. #define SFVM_GETHELPTEXTW 65 // idCmd,cchMax pszText - unicode
  4405. #define SFVM_GETTOOLTIPTEXTW 66 // idCmd,cchMax pszText - unicode
  4406. #define SFVM_GETIPERSISTHISTORY 67 // IPersistHistory **
  4407. #define SFVM_GETANIMATION 68 // HINSTANCE * WCHAR *
  4408. #define SFVM_GETHELPTEXTA 69 // idCmd,cchMax pszText - ansi
  4409. #define SFVM_GETTOOLTIPTEXTA 70 // idCmd,cchMax pszText - ansi
  4410. // The below two messages are only used in ownder data case, i.e. when SFVM_ISOWNERDATA returns TRUE
  4411. #define SFVM_GETICONOVERLAY 71 // iItem int iOverlayIndex
  4412. #define SFVM_SETICONOVERLAY 72 // iItem int * piOverlayIndex
  4413. #define SFVM_ALTERDROPEFFECT 73 // DWORD* IDataObject*
  4414. #define SFVM_DELAYWINDOWCREATE 74 // HWND - posted version of SFVM_WINDOWCREATED, no params
  4415. #define SFVM_FORCEWEBVIEW 75 // BOOL* -
  4416. #define SFVM_GETVIEWINFO 76 // fvm.uViewMode SFVM_VIEWINFO_DATA* // NOT USED: shipped in Whistler Beta 1 only, remove soon
  4417. #define SFVM_GETCUSTOMVIEWINFO 77 // - SFVM_CUSTOMVIEWINFO_DATA*
  4418. #define SFVM_FOLDERSETTINGSFLAGS 78 // - DWORD * (FWF_ flags)
  4419. #define SFVM_ENUMERATEDITEMS 79 // UINT celt LPCITEMIDLIST* rgpidl // fired once at view creation, before first SFVM_GETVIEWDATA SFVM_GETDEFERREDVIEWSETTINGS
  4420. #define SFVM_GETVIEWDATA 80 // fvm.uViewMode SFVM_VIEW_DATA*
  4421. #define SFVM_GETWEBVIEW_TEMPLATE 81 // fvm.uViewMode SFVM_WEBVIEW_TEMPLATE_DATA* // NOTE: going away soon
  4422. #define SFVM_GETWEBVIEWLAYOUT 82 // fvm.uViewMode SFVM_WEBVIEW_LAYOUT_DATA*
  4423. #define SFVM_GETWEBVIEWCONTENT 83 // - SFVM_WEBVIEW_CONTENT_DATA*
  4424. #define SFVM_GETWEBVIEWTASKS 84 // - SFVM_WEBVIEW_TASKSECTION_DATA*
  4425. #define SFVM_GETWEBVIEWTHEME 86 // - SFVM_WEBVIEW_THEME_DATA* // HACK for Whistler, will remove when DirectUI goes DLL
  4426. #define SFVM_SORTLISTDATA 87 // PFNLVCOMPARE lParamSort
  4427. #define SFVM_GETWEBVIEWBARRICADE 88 // - Element* // HACK for Whistler, will remove when DirectUI goes DLL
  4428. #define SFVM_ENUMWEBVIEWTASKS 90 // - SFVM_WEBVIEW_ENUMTASKSECTION_DATA*
  4429. #define SFVM_SETEMPTYTEXT 91 // - pszText
  4430. #define SFVM_GETDEFERREDVIEWSETTINGS 92 // - SFVM_DEFERRED_VIEW_SETTINGS* // set the default view settings
  4431. // All of these macros are compatible with HANDLE_MSG in WINDOWSX.H
  4432. #define HANDLE_SFVM_MERGEMENU(pv, wP, lP, fn) \
  4433. ((fn)((pv), (QCMINFO*)(lP)))
  4434. #define HANDLE_SFVM_INVOKECOMMAND(pv, wP, lP, fn) \
  4435. ((fn)((pv), (UINT)(wP)))
  4436. #define HANDLE_SFVM_GETHELPTEXT(pv, wP, lP, fn) \
  4437. ((fn)((pv), LOWORD(wP), HIWORD(wP), (LPTSTR)(lP)))
  4438. #define HANDLE_SFVM_GETTOOLTIPTEXT(pv, wP, lP, fn) \
  4439. ((fn)((pv), LOWORD(wP), HIWORD(wP), (LPTSTR)(lP)))
  4440. #define HANDLE_SFVM_GETBUTTONINFO(pv, wP, lP, fn) \
  4441. ((fn)((pv), (TBINFO*)(lP)))
  4442. #define HANDLE_SFVM_GETBUTTONS(pv, wP, lP, fn) \
  4443. ((fn)((pv), LOWORD(wP), HIWORD(wP), (TBBUTTON*)(lP)))
  4444. #define HANDLE_SFVM_INITMENUPOPUP(pv, wP, lP, fn) \
  4445. ((fn)((pv), LOWORD(wP), HIWORD(wP), (HMENU)(lP)))
  4446. #define HANDLE_SFVM_SELCHANGE(pv, wP, lP, fn) \
  4447. ((fn)((pv), LOWORD(wP), HIWORD(wP), (SFVM_SELCHANGE_DATA*)(lP)))
  4448. #define HANDLE_SFVM_DRAWITEM(pv, wP, lP, fn) \
  4449. ((fn)((pv), (UINT)(wP), (DRAWITEMSTRUCT*)(lP)))
  4450. #define HANDLE_SFVM_MEASUREITEM(pv, wP, lP, fn) \
  4451. ((fn)((pv), (UINT)(wP), (MEASUREITEMSTRUCT*)(lP)))
  4452. #define HANDLE_SFVM_EXITMENULOOP(pv, wP, lP, fn) \
  4453. ((fn)(pv))
  4454. #define HANDLE_SFVM_PRERELEASE(pv, wP, lP, fn) \
  4455. ((fn)(pv))
  4456. #define HANDLE_SFVM_GETCCHMAX(pv, wP, lP, fn) \
  4457. ((fn)((pv), (LPCITEMIDLIST)(wP), (UINT*)(lP)))
  4458. #define HANDLE_SFVM_FSNOTIFY(pv, wP, lP, fn) \
  4459. ((fn)((pv), (LPCITEMIDLIST*)(wP), (lP)))
  4460. #define HANDLE_SFVM_WINDOWCREATED(pv, wP, lP, fn) \
  4461. ((fn)((pv), (HWND)(wP)))
  4462. #define HANDLE_SFVM_WINDOWDESTROY(pv, wP, lP, fn) \
  4463. ((fn)((pv), (HWND)(wP)))
  4464. #define HANDLE_SFVM_REFRESH(pv, wP, lP, fn) \
  4465. ((fn)((pv), (BOOL) wP))
  4466. #define HANDLE_SFVM_SETFOCUS(pv, wP, lP, fn) \
  4467. ((fn)(pv))
  4468. #define HANDLE_SFVM_QUERYCOPYHOOK(pv, wP, lP, fn) \
  4469. ((fn)(pv))
  4470. #define HANDLE_SFVM_NOTIFYCOPYHOOK(pv, wP, lP, fn) \
  4471. ((fn)((pv), (COPYHOOKINFO*)(lP)))
  4472. #define HANDLE_SFVM_GETDETAILSOF(pv, wP, lP, fn) \
  4473. ((fn)((pv), (UINT)(wP), (DETAILSINFO*)(lP)))
  4474. #define HANDLE_SFVM_COLUMNCLICK(pv, wP, lP, fn) \
  4475. ((fn)((pv), (UINT)(wP)))
  4476. #define HANDLE_SFVM_QUERYFSNOTIFY(pv, wP, lP, fn) \
  4477. ((fn)((pv), (SHChangeNotifyEntry*)(lP)))
  4478. #define HANDLE_SFVM_DEFITEMCOUNT(pv, wP, lP, fn) \
  4479. ((fn)((pv), (UINT*)(lP)))
  4480. #define HANDLE_SFVM_OVERRIDEITEMCOUNT(pv, wP, lP, fn) \
  4481. ((fn)((pv), (UINT*)(lP)))
  4482. #define HANDLE_SFVM_DEFVIEWMODE(pv, wP, lP, fn) \
  4483. ((fn)((pv), (FOLDERVIEWMODE*)(lP)))
  4484. #define HANDLE_SFVM_UNMERGEMENU(pv, wP, lP, fn) \
  4485. ((fn)((pv), (HMENU)(lP)))
  4486. #define HANDLE_SFVM_INSERTITEM(pv, wP, lP, fn) \
  4487. ((fn)((pv), (LPCITEMIDLIST)(lP)))
  4488. #define HANDLE_SFVM_DELETEITEM(pv, wP, lP, fn) \
  4489. ((fn)((pv), (LPCITEMIDLIST)(lP)))
  4490. #define HANDLE_SFVM_UPDATESTATUSBAR(pv, wP, lP, fn) \
  4491. ((fn)((pv), (BOOL)(wP)))
  4492. #define HANDLE_SFVM_BACKGROUNDENUM(pv, wP, lP, fn) \
  4493. ((fn)(pv))
  4494. #define HANDLE_SFVM_GETWORKINGDIR(pv, wP, lP, fn) \
  4495. ((fn)((pv), (UINT)(wP), (LPTSTR)(lP)))
  4496. #define HANDLE_SFVM_GETCOLSAVESTREAM(pv, wP, lP, fn) \
  4497. ((fn)((pv), (wP), (IStream**)(lP)))
  4498. #define HANDLE_SFVM_SELECTALL(pv, wP, lP, fn) \
  4499. ((fn)(pv))
  4500. #define HANDLE_SFVM_DIDDRAGDROP(pv, wP, lP, fn) \
  4501. ((fn)((pv), (DWORD)(wP), (IDataObject*)(lP)))
  4502. #define HANDLE_SFVM_SUPPORTSIDENTITY(pv, wp, lP, fn) \
  4503. ((fn)(pv)) /* Only 1 parameter */
  4504. #define HANDLE_SFVM_HWNDMAIN(pv, wP, lP, fn) \
  4505. ((fn)((pv), (HWND)(lP)))
  4506. #define HANDLE_SFVM_GETNOTIFY(pv, wP, lP, fn) \
  4507. ((fn)((pv), (LPITEMIDLIST*)(wP), (LONG*)(lP)))
  4508. #define HANDLE_SFVM_SETISFV(pv, wP, lP, fn) \
  4509. ((fn)((pv), (IShellFolderView*)(lP)))
  4510. #define HANDLE_SFVM_GETVIEWS(pv, wP, lP, fn) \
  4511. ((fn)((pv), (SHELLVIEWID*)(wP), (IEnumSFVViews**)(lP)))
  4512. #define HANDLE_SFVM_THISIDLIST(pv, wP, lP, fn) \
  4513. ((fn)((pv), (LPITEMIDLIST*)(lP)))
  4514. #define HANDLE_SFVM_GETITEMIDLIST(pv, wP, lP, fn) \
  4515. ((fn)((pv), (wP), (LPITEMIDLIST*)(lP)))
  4516. #define HANDLE_SFVM_SETITEMIDLIST(pv, wP, lP, fn) \
  4517. ((fn)((pv), (wP), (LPITEMIDLIST)(lP)))
  4518. #define HANDLE_SFVM_INDEXOFITEMIDLIST(pv, wP, lP, fn) \
  4519. ((fn)((pv), (int*)(wP), (LPITEMIDLIST)(lP)))
  4520. #define HANDLE_SFVM_ODFINDITEM(pv, wP, lP, fn) \
  4521. ((fn)((pv), (int*)(wP), (NM_FINDITEM*)(lP)))
  4522. #define HANDLE_SFVM_ADDPROPERTYPAGES(pv, wP, lP, fn) \
  4523. ((fn)((pv), (SFVM_PROPPAGE_DATA *)(lP)))
  4524. #define HANDLE_SFVM_FOLDERISPARENT(pv, wP, lP, fn) \
  4525. ((fn)((pv), (LPITEMIDLIST)(lP)))
  4526. #define HANDLE_SFVM_ARRANGE(pv, wP, lP, fn) \
  4527. ((fn)((pv), (LPARAM)(lP)))
  4528. #define HANDLE_SFVM_QUERYSTANDARDVIEWS(pv, wP, lP, fn) \
  4529. ((fn)((pv), (BOOL*)(lP)))
  4530. #define HANDLE_SFVM_QUERYREUSEEXTVIEW(pv, wP, lP, fn) \
  4531. ((fn)((pv), (BOOL*)(lP)))
  4532. #define HANDLE_SFVM_GETEMPTYTEXT(pv, wP, lP, fn) \
  4533. ((fn)((pv), (UINT)(wP), (LPTSTR)(lP)))
  4534. #define HANDLE_SFVM_GETITEMICONINDEX(pv, wP, lP, fn) \
  4535. ((fn)((pv), (wP), (int*)(lP)))
  4536. #define HANDLE_SFVM_SIZE(pv, wP, lP, fn) \
  4537. ((fn)((pv), LOWORD(lP), HIWORD(lP)))
  4538. #define HANDLE_SFVM_GETZONE(pv, wP, lP, fn) \
  4539. ((fn)((pv), (DWORD *)(lP)))
  4540. #define HANDLE_SFVM_GETPANE(pv, wP, lP, fn) \
  4541. ((fn)((pv), (wP), (DWORD *)(lP)))
  4542. #define HANDLE_SFVM_ISOWNERDATA(pv, wP, lP, fn) \
  4543. ((fn)((pv), (BOOL*)(lP)))
  4544. #define HANDLE_SFVM_GETODRANGEOBJECT(pv, wP, lP, fn) \
  4545. ((fn)((pv), (wP), (ILVRange **)(lP)))
  4546. #define HANDLE_SFVM_ODCACHEHINT(pv, wP, lP, fn) \
  4547. ((fn)((pv), (NMLVCACHEHINT*)(lP)))
  4548. #define HANDLE_SFVM_GETHELPTOPIC(pv, wP, lP, fn) \
  4549. ((fn)((pv), (SFVM_HELPTOPIC_DATA *)(lP)))
  4550. #define HANDLE_SFVM_GETIPERSISTHISTORY(pv, wP, lP, fn) \
  4551. ((fn)((pv), (IPersistHistory **)(lP)))
  4552. #define HANDLE_SFVM_SETICONOVERLAY(pv, wP, lP, fn) \
  4553. ((fn)((pv), (wP), (int)(lP)))
  4554. #define HANDLE_SFVM_GETICONOVERLAY(pv, wP, lP, fn) \
  4555. ((fn)((pv), (wP), (int *)(lP)))
  4556. #define HANDLE_SFVM_ALTERDROPEFFECT(pv, wP, lP, fn) \
  4557. ((fn)((pv), (DWORD *)(wP), (IDataObject *)(lP)))
  4558. #define HANDLE_SFVM_DELAYWINDOWCREATE(pv, wP, lP, fn) \
  4559. ((fn)((pv), (HWND)(wP)))
  4560. #define HANDLE_SFVM_FORCEWEBVIEW(pv, wP, lP, fn) \
  4561. ((fn)((pv), (BOOL*)(wP)))
  4562. #define HANDLE_SFVM_GETVIEWINFO(pv, wP, lP, fn) \
  4563. ((fn)((pv), (UINT)(wP), (SFVM_VIEWINFO_DATA*)lP))
  4564. #define HANDLE_SFVM_GETCUSTOMVIEWINFO(pv, wP, lP, fn) \
  4565. ((fn)((pv), (SFVM_CUSTOMVIEWINFO_DATA*)(lP)))
  4566. #define HANDLE_SFVM_FOLDERSETTINGSFLAGS(pv, wP, lP, fn) \
  4567. ((fn)((pv), (DWORD*)(lP)))
  4568. #define HANDLE_SFVM_ENUMERATEDITEMS(pv, wP, lP, fn) \
  4569. ((fn)((pv), (UINT)(wP), (LPCITEMIDLIST*)(lP)))
  4570. #define HANDLE_SFVM_GETVIEWDATA(pv, wP, lP, fn) \
  4571. ((fn)((pv), (UINT)(wP), (SFVM_VIEW_DATA*)lP))
  4572. #define HANDLE_SFVM_GETWEBVIEW_TEMPLATE(pv, wP, lP, fn) \
  4573. ((fn)((pv), (UINT)(wP), (SFVM_WEBVIEW_TEMPLATE_DATA*)(lP)))
  4574. #define HANDLE_SFVM_GETWEBVIEWLAYOUT(pv, wP, lP, fn) \
  4575. ((fn)((pv), (UINT)(wP), (SFVM_WEBVIEW_LAYOUT_DATA*)(lP)))
  4576. #define HANDLE_SFVM_GETWEBVIEWCONTENT(pv, wP, lP, fn) \
  4577. ((fn)((pv), (SFVM_WEBVIEW_CONTENT_DATA*)(lP)))
  4578. #define HANDLE_SFVM_GETWEBVIEWTASKS(pv, wP, lP, fn) \
  4579. ((fn)((pv), (SFVM_WEBVIEW_TASKSECTION_DATA*)(lP)))
  4580. #define HANDLE_SFVM_ENUMWEBVIEWTASKS(pv, wP, lP, fn) \
  4581. ((fn)((pv), (SFVM_WEBVIEW_ENUMTASKSECTION_DATA*)(lP)))
  4582. #define HANDLE_SFVM_GETWEBVIEWTHEME(pv, wP, lP, fn) \
  4583. ((fn)((pv), (SFVM_WEBVIEW_THEME_DATA*)(lP)))
  4584. #define HANDLE_SFVM_SORTLISTDATA(pv, wP, lP, fn) \
  4585. ((fn)((pv), (PFNLVCOMPARE)(wP), (lP)))
  4586. #define HANDLE_SFVM_GETDEFERREDVIEWSETTINGS(pv, wP, lP, fn) \
  4587. ((fn)((pv), (SFVM_DEFERRED_VIEW_SETTINGS*)(lP)))
  4588. #define HANDLE_SFVM_SETEMPTYTEXT(pv, wP, lP, fn) \
  4589. ((fn)((pv), (UINT)(wP), (LPCTSTR)(lP)))
  4590. //
  4591. // Return values for SFVM_GETICONOVERLAY:
  4592. // If the icon overlay is not set and you want the shell to set it for you.
  4593. // return SFVOVERLAY_UNSET. This will cause the shell to retrieve the overlay and
  4594. // send SFVM_SETICONOVERLAY.
  4595. // If there is no overlay for this item at all, the correct return value is
  4596. // SFVOVERLAY_DEFAULT
  4597. // If you return SFVOVERLAY_UNSET every time for SFVM_GETICONOVERLAY, the
  4598. // shell will keep setting it indefinitely, so there is a danger of infinite loop
  4599. //
  4600. #define SFV_ICONOVERLAY_DEFAULT 0
  4601. #define SFV_ICONOVERLAY_UNSET 0xFFFFFFFF
  4602. //
  4603. // What you can return from SFVM_UPDATESTATUSBAR:
  4604. //
  4605. // E_NOTIMPL - Message not handled; DefView should manage status bar
  4606. //
  4607. // Otherwise, update the status bar yourself and return a bitmask of the
  4608. // following codes indicating what you want DefView to do for you.
  4609. //
  4610. #define SFVUSB_HANDLED 0x0000 // Client handled completely - DefView does nothing
  4611. #define SFVUSB_INITED 0x0001 // Client initialized parts - DefView will set text
  4612. #define SFVUSB_ALL 0x0001
  4613. // IShellFolderView interface for getting the SFV to do things
  4614. //
  4615. typedef struct _ITEMSPACING
  4616. {
  4617. int cxSmall;
  4618. int cySmall;
  4619. int cxLarge;
  4620. int cyLarge;
  4621. } ITEMSPACING;
  4622. // Define OPtions for SetObjectCount
  4623. #define SFVSOC_INVALIDATE_ALL 0x00000001 // Assumed to reset only what is neccessary...
  4624. #define SFVSOC_NOSCROLL LVSICF_NOSCROLL
  4625. // defines for IShellFolderView::SelectItems()
  4626. #define SFVS_SELECT_NONE 0x0 // unselect all
  4627. #define SFVS_SELECT_ALLITEMS 0x1 // select all
  4628. #define SFVS_SELECT_INVERT 0x2 // Inver the selection
  4629. // defines for IShellFolderView::QuerySupport()
  4630. // allows a view to be queried to see if it supports various operations (useful for
  4631. // enabling menu items)
  4632. #define SFVQS_AUTO_ARRANGE 0x0001
  4633. #define SFVQS_ARRANGE_GRID 0x0002
  4634. #define SFVQS_SELECT_ALL 0x0004
  4635. #define SFVQS_SELECT_NONE 0x0008
  4636. #define SFVQS_SELECT_INVERT 0x0010
  4637. #undef INTERFACE
  4638. #define INTERFACE IShellFolderView
  4639. DECLARE_INTERFACE_(IShellFolderView, IUnknown)
  4640. {
  4641. // *** IUnknown methods ***
  4642. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
  4643. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  4644. STDMETHOD_(ULONG,Release) (THIS) PURE;
  4645. // *** IShellFolderView methods ***
  4646. STDMETHOD(Rearrange) (THIS_ LPARAM lParamSort) PURE;
  4647. STDMETHOD(GetArrangeParam) (THIS_ LPARAM *plParamSort) PURE;
  4648. STDMETHOD(ArrangeGrid) (THIS) PURE;
  4649. STDMETHOD(AutoArrange) (THIS) PURE;
  4650. STDMETHOD(GetAutoArrange) (THIS) PURE;
  4651. STDMETHOD(AddObject) (THIS_ LPITEMIDLIST pidl, UINT *puItem) PURE;
  4652. STDMETHOD(GetObject) (THIS_ LPITEMIDLIST *ppidl, UINT uItem) PURE;
  4653. STDMETHOD(RemoveObject) (THIS_ LPITEMIDLIST pidl, UINT *puItem) PURE;
  4654. STDMETHOD(GetObjectCount) (THIS_ UINT *puCount) PURE;
  4655. STDMETHOD(SetObjectCount) (THIS_ UINT uCount, UINT dwFlags) PURE;
  4656. STDMETHOD(UpdateObject) (THIS_ LPITEMIDLIST pidlOld, LPITEMIDLIST pidlNew, UINT *puItem) PURE;
  4657. STDMETHOD(RefreshObject) (THIS_ LPITEMIDLIST pidl, UINT *puItem) PURE;
  4658. STDMETHOD(SetRedraw) (THIS_ BOOL bRedraw) PURE;
  4659. STDMETHOD(GetSelectedCount) (THIS_ UINT *puSelected) PURE;
  4660. STDMETHOD(GetSelectedObjects) (THIS_ LPCITEMIDLIST **pppidl, UINT *puItems) PURE;
  4661. STDMETHOD(IsDropOnSource) (THIS_ IDropTarget *pDropTarget) PURE;
  4662. STDMETHOD(GetDragPoint) (THIS_ POINT *ppt) PURE;
  4663. STDMETHOD(GetDropPoint) (THIS_ POINT *ppt) PURE;
  4664. STDMETHOD(MoveIcons) (THIS_ IDataObject *pDataObject) PURE;
  4665. STDMETHOD(SetItemPos) (THIS_ LPCITEMIDLIST pidl, POINT *ppt) PURE;
  4666. STDMETHOD(IsBkDropTarget) (THIS_ IDropTarget *pDropTarget) PURE;
  4667. STDMETHOD(SetClipboard) (THIS_ BOOL bMove) PURE;
  4668. STDMETHOD(SetPoints) (THIS_ IDataObject *pDataObject) PURE;
  4669. STDMETHOD(GetItemSpacing) (THIS_ ITEMSPACING *pSpacing) PURE;
  4670. STDMETHOD(SetCallback) (THIS_ IShellFolderViewCB* pNewCB, IShellFolderViewCB** ppOldCB) PURE;
  4671. STDMETHOD(Select) ( THIS_ UINT dwFlags ) PURE;
  4672. STDMETHOD(QuerySupport) (THIS_ UINT * pdwSupport ) PURE;
  4673. STDMETHOD(SetAutomationObject)(THIS_ IDispatch* pdisp) PURE;
  4674. } ;
  4675. // DOC'ed for DOJ compliance:
  4676. #define SHCreateShellFolderViewORD 256
  4677. SHSTDAPI_(IShellFolderViewCB*) SHGetShellFolderViewCB(HWND hwndMain);
  4678. #define SHGetShellFolderViewCBORD 257
  4679. //===========================================================================
  4680. // Defview APIs to make name space author lives somewhat easier
  4681. // DOC'ed for DOJ compliance
  4682. // structure for lParam of DFM_INFOKECOMMANDEX
  4683. typedef struct
  4684. {
  4685. DWORD cbSize;
  4686. DWORD fMask; // CMIC_MASK_ values for the invoke
  4687. LPARAM lParam; // same as lParam of DFM_INFOKECOMMAND
  4688. UINT idCmdFirst;
  4689. UINT idDefMax;
  4690. LPCMINVOKECOMMANDINFO pici; // the whole thing so you can re-invoke on a child
  4691. } DFMICS, *PDFMICS;
  4692. // Note on context menus ranges:
  4693. // Standard Items // DFM_MERGECONTEXTMENU, context menu extensions, DFM_MERGECONTEXTMENU_TOP
  4694. // Separator
  4695. // View Items // context menu extensions can get here
  4696. // Separator
  4697. // (defcm S_FALSE "default" items, if applicable)
  4698. // Separator
  4699. // Folder Items // context menu extensions can get here
  4700. // Separator
  4701. // Bottom Items // DFM_MERGECONTEXTMENU_BOTTOM
  4702. // DOC'ed for DOJ compliance
  4703. #define DFM_ADDREF 3 // 0 0
  4704. #define DFM_RELEASE 4 // 0 0
  4705. #define DFM_GETHELPTEXT 5 // idCmd,cchMax pszText -Ansi
  4706. #define DFM_WM_MEASUREITEM 6 // ---from the message---
  4707. #define DFM_WM_DRAWITEM 7 // ---from the message---
  4708. #define DFM_WM_INITMENUPOPUP 8 // ---from the message---
  4709. #define DFM_VALIDATECMD 9 // idCmd 0
  4710. #define DFM_MERGECONTEXTMENU_TOP 10 // uFlags LPQCMINFO
  4711. #define DFM_GETHELPTEXTW 11 // idCmd,cchMax pszText -Unicode
  4712. #define DFM_INVOKECOMMANDEX 12 // idCmd PDFMICS
  4713. #define DFM_MAPCOMMANDNAME 13 // idCmd * pszCommandName
  4714. #define DFM_GETVERBW 15 // idCmd,cchMax pszText -Unicode
  4715. #define DFM_GETVERBA 16 // idCmd,cchMax pszText -Ansi
  4716. #define DFM_MERGECONTEXTMENU_BOTTOM 17 // uFlags LPQCMINFO
  4717. #define DFM_CMD_DELETE ((UINT)-1)
  4718. #define DFM_CMD_MOVE ((UINT)-2)
  4719. #define DFM_CMD_COPY ((UINT)-3)
  4720. #define DFM_CMD_LINK ((UINT)-4)
  4721. #define DFM_CMD_NEWFOLDER ((UINT)-6)
  4722. #define DFM_CMD_PASTE ((UINT)-7)
  4723. #define DFM_CMD_VIEWLIST ((UINT)-8)
  4724. #define DFM_CMD_VIEWDETAILS ((UINT)-9)
  4725. #define DFM_CMD_PASTELINK ((UINT)-10)
  4726. #define DFM_CMD_PASTESPECIAL ((UINT)-11)
  4727. #define DFM_CMD_MODALPROP ((UINT)-12)
  4728. #define DFM_CMD_RENAME ((UINT)-13)
  4729. SHSTDAPI CDefFolderMenu_Create(LPCITEMIDLIST pidlFolder,
  4730. HWND hwndOwner,
  4731. UINT cidl, LPCITEMIDLIST * apidl,
  4732. IShellFolder *psf,
  4733. LPFNDFMCALLBACK lpfn,
  4734. HKEY hkeyProgID, HKEY hkeyBaseProgID,
  4735. IContextMenu ** ppcm);
  4736. SHSTDAPI_(void) CDefFolderMenu_MergeMenu(HINSTANCE hinst, UINT idMainMerge, UINT idPopupMerge,
  4737. LPQCMINFO pqcm);
  4738. STDAPI_(void) Def_InitFileCommands(ULONG dwAttr, HMENU hmInit, UINT idCmdFirst,
  4739. BOOL bContext);
  4740. STDAPI_(void) Def_InitEditCommands(ULONG dwAttr, HMENU hmInit, UINT idCmdFirst,
  4741. IDropTarget *pdtgt, UINT fContext);
  4742. // indeces in bitmap strip
  4743. #define VIEW_MOVETO 24
  4744. #define VIEW_COPYTO 25
  4745. #define VIEW_OPTIONS 26
  4746. //===========================================================================
  4747. // Default IShellView for IShellFolder
  4748. //===========================================================================
  4749. // Menu ID's
  4750. #define SFVIDM_FIRST (FCIDM_SHVIEWLAST-0x0fff)
  4751. #define SFVIDM_LAST (FCIDM_SHVIEWLAST)
  4752. // Hardcoded message values => This range can be used for messages that we
  4753. // pass from shdoc401 to shell32
  4754. #define SFVIDM_HARDCODED_FIRST (SFVIDM_LAST-0x0010)
  4755. #define SFVIDM_HARDCODED_LAST (SFVIDM_LAST)
  4756. #define SFVIDM_MISC_SETWEBVIEW (SFVIDM_HARDCODED_FIRST)
  4757. // Popup menu ID's used in merging menus
  4758. #define SFVIDM_MENU_ARRANGE (SFVIDM_FIRST + 0x0001)
  4759. #define SFVIDM_MENU_VIEW (SFVIDM_FIRST + 0x0002)
  4760. #define SFVIDM_MENU_SELECT (SFVIDM_FIRST + 0x0003)
  4761. #define SHARED_FILE_FIRST 0x0010
  4762. #define SHARED_FILE_LINK (SHARED_FILE_FIRST + 0x0000)
  4763. #define SHARED_FILE_DELETE (SHARED_FILE_FIRST + 0x0001)
  4764. #define SHARED_FILE_RENAME (SHARED_FILE_FIRST + 0x0002)
  4765. #define SHARED_FILE_PROPERTIES (SHARED_FILE_FIRST + 0x0003)
  4766. #define SHARED_EDIT_FIRST 0x0018
  4767. #define SHARED_EDIT_CUT (SHARED_EDIT_FIRST + 0x0000)
  4768. #define SHARED_EDIT_COPY (SHARED_EDIT_FIRST + 0x0001)
  4769. #define SHARED_EDIT_PASTE (SHARED_EDIT_FIRST + 0x0002)
  4770. #define SHARED_EDIT_UNDO (SHARED_EDIT_FIRST + 0x0003)
  4771. #define SHARED_EDIT_PASTELINK (SHARED_EDIT_FIRST + 0x0004)
  4772. #define SHARED_EDIT_PASTESPECIAL (SHARED_EDIT_FIRST + 0x0005)
  4773. #define SHARED_EDIT_COPYTO (SHARED_EDIT_FIRST + 0x0006)
  4774. #define SHARED_EDIT_MOVETO (SHARED_EDIT_FIRST + 0x0007)
  4775. #define SFVIDM_FILE_FIRST (SFVIDM_FIRST + SHARED_FILE_FIRST)
  4776. #define SFVIDM_FILE_LINK (SFVIDM_FIRST + SHARED_FILE_LINK)
  4777. #define SFVIDM_FILE_DELETE (SFVIDM_FIRST + SHARED_FILE_DELETE)
  4778. #define SFVIDM_FILE_RENAME (SFVIDM_FIRST + SHARED_FILE_RENAME)
  4779. #define SFVIDM_FILE_PROPERTIES (SFVIDM_FIRST + SHARED_FILE_PROPERTIES)
  4780. #define SFVIDM_EDIT_FIRST (SFVIDM_FIRST + SHARED_EDIT_FIRST)
  4781. #define SFVIDM_EDIT_CUT (SFVIDM_FIRST + SHARED_EDIT_CUT)
  4782. #define SFVIDM_EDIT_COPY (SFVIDM_FIRST + SHARED_EDIT_COPY)
  4783. #define SFVIDM_EDIT_PASTE (SFVIDM_FIRST + SHARED_EDIT_PASTE)
  4784. #define SFVIDM_EDIT_UNDO (SFVIDM_FIRST + SHARED_EDIT_UNDO)
  4785. #define SFVIDM_EDIT_PASTELINK (SFVIDM_FIRST + SHARED_EDIT_PASTELINK)
  4786. #define SFVIDM_EDIT_PASTESPECIAL (SFVIDM_FIRST + SHARED_EDIT_PASTESPECIAL)
  4787. #define SFVIDM_EDIT_COPYTO (SFVIDM_FIRST + SHARED_EDIT_COPYTO)
  4788. #define SFVIDM_EDIT_MOVETO (SFVIDM_FIRST + SHARED_EDIT_MOVETO)
  4789. #define SFVIDM_SELECT_FIRST (SFVIDM_FIRST + 0x0020)
  4790. #define SFVIDM_SELECT_ALL (SFVIDM_SELECT_FIRST + 0x0001)
  4791. #define SFVIDM_SELECT_INVERT (SFVIDM_SELECT_FIRST + 0x0002)
  4792. #define SFVIDM_DESELECT_ALL (SFVIDM_SELECT_FIRST + 0x0003)
  4793. #define SFVIDM_VIEW_FIRST (SFVIDM_FIRST + 0x0028)
  4794. #define SFVIDM_VIEW_FIRSTVIEW (SFVIDM_VIEW_FIRST + 1)
  4795. #define SFVIDM_VIEW_ICON (SFVIDM_VIEW_FIRST + 1)
  4796. #define SFVIDM_VIEW_SMALLICON (SFVIDM_VIEW_FIRST + 2)
  4797. #define SFVIDM_VIEW_LIST (SFVIDM_VIEW_FIRST + 3)
  4798. #define SFVIDM_VIEW_DETAILS (SFVIDM_VIEW_FIRST + 4)
  4799. #define SFVIDM_VIEW_THUMBNAIL (SFVIDM_VIEW_FIRST + 5)
  4800. #define SFVIDM_VIEW_TILE (SFVIDM_VIEW_FIRST + 6)
  4801. #define SFVIDM_VIEW_THUMBSTRIP (SFVIDM_VIEW_FIRST + 7)
  4802. #define SFVIDM_VIEW_LASTVIEW (SFVIDM_VIEW_FIRST + 7)
  4803. // TileView
  4804. // One more for safe keeping
  4805. #define SFVIDM_VIEW_OPTIONS (SFVIDM_VIEW_FIRST + 0x0008)
  4806. #define SFVIDM_VIEW_VIEWMENU (SFVIDM_VIEW_FIRST + 0x0009)
  4807. #define SFVIDM_VIEW_CUSTOMWIZARD (SFVIDM_VIEW_FIRST + 0x000A)
  4808. #define SFVIDM_VIEW_COLSETTINGS (SFVIDM_VIEW_FIRST + 0x000B)
  4809. #define SFVIDM_VIEW_EXTFIRST (SFVIDM_VIEW_FIRST + 0x000C)
  4810. #define SFVIDM_VIEW_EXTLAST (SFVIDM_VIEW_EXTFIRST + 0x0017)
  4811. #define SFVIDM_VIEW_SVEXTFIRST (SFVIDM_VIEW_EXTFIRST)
  4812. #define SFVIDM_VIEW_SVEXTLAST (SFVIDM_VIEW_EXTFIRST + 0x000F)
  4813. #define SFVIDM_VIEW_EXTENDEDFIRST (SFVIDM_VIEW_EXTFIRST + 0x0010)
  4814. #define SFVIDM_VIEW_EXTENDEDLAST (SFVIDM_VIEW_EXTLAST)
  4815. // #define SFVIDM_VIEW_THUMBNAIL (SFVIDM_VIEW_FIRST + 0x0021) defined above
  4816. #define SFVIDM_ARRANGE_FIRST (SFVIDM_FIRST + 0x0050)
  4817. #define SFVIDM_ARRANGE_AUTO (SFVIDM_ARRANGE_FIRST + 0x0001)
  4818. #define SFVIDM_ARRANGE_GRID (SFVIDM_ARRANGE_FIRST + 0x0002)
  4819. #define SFVIDM_ARRANGE_DISPLAYICONS (SFVIDM_ARRANGE_FIRST + 0x0003)
  4820. #define SFVIDM_ARRANGE_AUTOGRID (SFVIDM_ARRANGE_FIRST + 0x0004)
  4821. #define SFVIDM_TOOL_FIRST (SFVIDM_FIRST + 0x0060)
  4822. #define SFVIDM_TOOL_CONNECT (SFVIDM_TOOL_FIRST + 0x0001)
  4823. #define SFVIDM_TOOL_DISCONNECT (SFVIDM_TOOL_FIRST + 0x0002)
  4824. #define SFVIDM_TOOL_OPTIONS (SFVIDM_TOOL_FIRST + 0x0003)
  4825. #define SFVIDM_DEBUG_WEBVIEW (SFVIDM_TOOL_FIRST + 0x0004)
  4826. #define SFVIDM_HELP_FIRST (SFVIDM_FIRST + 0x0070)
  4827. #define SFVIDM_HELP_TOPIC (SFVIDM_HELP_FIRST + 0x0001)
  4828. #define SFVIDM_MISC_FIRST (SFVIDM_FIRST + 0x0100)
  4829. #define SFVIDM_MISC_REFRESH (SFVIDM_MISC_FIRST + 0x0003)
  4830. #define SFVIDM_MISC_HARDREFRESH (SFVIDM_MISC_FIRST + 0x0004)
  4831. // Range for the client's additional menus
  4832. #define SFVIDM_CLIENT_FIRST (SFVIDM_FIRST + 0x0200)
  4833. #define SFVIDM_CLIENT_LAST (SFVIDM_FIRST + 0x02ff)
  4834. // ---- SFVIDM_UNUSED_FIRST (SFVIDM_FIRST + 0x0300)
  4835. #define SFVIDM_DESKTOP_FIRST (SFVIDM_FIRST + 0x0400)
  4836. #define SFVIDM_DESKTOPHTML_WEBCONTENT (SFVIDM_DESKTOP_FIRST + 0x0001)
  4837. #define SFVIDM_DESKTOPHTML_ICONS (SFVIDM_DESKTOP_FIRST + 0x0002)
  4838. #define SFVIDM_DESKTOPHTML_LOCK (SFVIDM_DESKTOP_FIRST + 0x0003)
  4839. #define SFVIDM_DESKTOPHTML_WIZARD (SFVIDM_DESKTOP_FIRST + 0x0004)
  4840. #define SFVIDM_DESKTOP_LAST (SFVIDM_FIRST + 0x04ff)
  4841. #define SFVIDM_COLUMN_FIRST (SFVIDM_FIRST + 0x0500)
  4842. #define SFVIDM_COLUMN_LAST (SFVIDM_FIRST + 0x05ff)
  4843. #define SFVIDM_GROUPSEP (SFVIDM_FIRST + 0x0600)
  4844. #define SFVIDM_GROUPBY (SFVIDM_FIRST + 0x0601)
  4845. #define SFVIDM_GROUPSFIRST (SFVIDM_FIRST + 0x0602)
  4846. #define SFVIDM_GROUPSLAST (SFVIDM_FIRST + 0x067f)
  4847. #define SFVIDM_GROUPSEXTENDEDFIRST (SFVIDM_FIRST + 0x0680)
  4848. #define SFVIDM_GROUPSEXTENDEDLAST (SFVIDM_FIRST + 0x06ff)
  4849. // Range for context menu id's
  4850. #define SFVIDM_CONTEXT_FIRST (SFVIDM_FIRST + 0x0800)
  4851. #define SFVIDM_CONTEXT_LAST (SFVIDM_FIRST + 0x0900)
  4852. #define SFVIDM_BACK_CONTEXT_FIRST (SFVIDM_FIRST + 0x0901)
  4853. #define SFVIDM_BACK_CONTEXT_LAST (SFVIDM_FIRST + 0x09ff)
  4854. // DOC'ed for DOJ compliance:
  4855. typedef COPYHOOKINFO *LPCOPYHOOKINFO;
  4856. // uMsg wParam lParam
  4857. #define DVM_MERGEMENU SFVM_MERGEMENU // uFlags LPQCMINFO
  4858. #define DVM_INVOKECOMMAND SFVM_INVOKECOMMAND // idCmd 0
  4859. #define DVM_GETHELPTEXT SFVM_GETHELPTEXT // idCmd,cchMax pszText - Ansi
  4860. #define DVM_GETTOOLTIPTEXT SFVM_GETTOOLTIPTEXT // idCmd,cchMax pszText
  4861. #define DVM_GETBUTTONINFO SFVM_GETBUTTONINFO // 0 LPTBINFO
  4862. #define DVM_GETBUTTONS SFVM_GETBUTTONS // idCmdFirst,cbtnMax LPTBBUTTON
  4863. #define DVM_INITMENUPOPUP SFVM_INITMENUPOPUP // idCmdFirst,nIndex hmenu
  4864. #define DVM_SELCHANGE SFVM_SELCHANGE // idCmdFirst,nItem PDVSELCHANGEINFO
  4865. #define DVM_DRAWITEM SFVM_DRAWITEM // idCmdFirst pdis
  4866. #define DVM_MEASUREITEM SFVM_MEASUREITEM // idCmdFirst pmis
  4867. #define DVM_EXITMENULOOP SFVM_EXITMENULOOP // - -
  4868. #define DVM_RELEASE SFVM_PRERELEASE // - lSelChangeInfo (ShellFolder private)
  4869. #define DVM_GETCCHMAX SFVM_GETCCHMAX // pidlItem pcchMax
  4870. #define DVM_FSNOTIFY SFVM_FSNOTIFY // LPITEMIDLIST* lEvent
  4871. #define DVM_WINDOWCREATED SFVM_WINDOWCREATED // hwnd PDVSELCHANGEINFO
  4872. #define DVM_WINDOWDESTROY SFVM_WINDOWDESTROY // hwnd PDVSELCHANGEINFO
  4873. #define DVM_REFRESH SFVM_REFRESH // - lSelChangeInfo
  4874. #define DVM_SETFOCUS SFVM_SETFOCUS // - lSelChangeInfo
  4875. #define DVM_KILLFOCUS 19 // unused
  4876. #define DVM_QUERYCOPYHOOK SFVM_QUERYCOPYHOOK // - -
  4877. #define DVM_NOTIFYCOPYHOOK SFVM_NOTIFYCOPYHOOK // - LPCOPYHOOKINFO
  4878. #define DVM_NOTIFY SFVM_NOTIFY // idFrom LPNOTIFY
  4879. #define DVM_GETDETAILSOF SFVM_GETDETAILSOF // iColumn PDETAILSINFO
  4880. #define DVM_COLUMNCLICK SFVM_COLUMNCLICK // iColumn -
  4881. #define DVM_QUERYFSNOTIFY SFVM_QUERYFSNOTIFY // - FSNotifyEntry *
  4882. #define DVM_DEFITEMCOUNT SFVM_DEFITEMCOUNT // - PINT
  4883. #define DVM_DEFVIEWMODE SFVM_DEFVIEWMODE // - PFOLDERVIEWMODE
  4884. #define DVM_UNMERGEMENU SFVM_UNMERGEMENU // uFlags
  4885. #define DVM_INSERTITEM SFVM_INSERTITEM // pidl PDVSELCHANGEINFO
  4886. #define DVM_DELETEITEM SFVM_DELETEITEM // pidl PDVSELCHANGEINFO
  4887. #define DVM_UPDATESTATUSBAR SFVM_UPDATESTATUSBAR // - lSelChangeInfo
  4888. #define DVM_BACKGROUNDENUM SFVM_BACKGROUNDENUM //
  4889. #define DVM_GETWORKINGDIR SFVM_GETWORKINGDIR //
  4890. #define DVM_GETCOLSAVESTREAM SFVM_GETCOLSAVESTREAM // flags IStream **
  4891. #define DVM_SELECTALL SFVM_SELECTALL // lSelChangeInfo
  4892. #define DVM_DIDDRAGDROP SFVM_DIDDRAGDROP // dwEffect IDataObject *
  4893. #define DVM_SUPPORTSIDENTIFY SFVM_SUPPORTSIDENTITY // - -
  4894. #define DVM_FOLDERISPARENT SFVM_FOLDERISPARENT // - pidlChild
  4895. // max length for guid strings
  4896. #define GUIDSTR_MAX (1+ 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)
  4897. typedef struct _DVSELCHANGEINFO {
  4898. UINT uOldState;
  4899. UINT uNewState;
  4900. LPARAM lParamItem;
  4901. LPARAM* plParam;
  4902. } DVSELCHANGEINFO, *PDVSELCHANGEINFO;
  4903. // DOC'ed for DOJ compliance:
  4904. // DOC'ed for DOJ Compliance
  4905. // Get the last sorting parameter given to FolderView
  4906. #define SFVM_GETARRANGEPARAM 0x00000002
  4907. #define ShellFolderView_GetArrangeParam(_hwnd) \
  4908. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETARRANGEPARAM, 0L)
  4909. // DOC'ed for DOJ Compliance
  4910. // Gets the count of objects in the view
  4911. #define SFVM_GETOBJECTCOUNT 0x00000004
  4912. #define ShellFolderView_GetObjectCount(_hwnd) \
  4913. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETOBJECTCOUNT, (LPARAM)0)
  4914. // Returns a pointer to the Idlist associated with the specified index
  4915. // Returns NULL if at end of list.
  4916. #define SFVM_GETOBJECT 0x00000005
  4917. #define ShellFolderView_GetObject(_hwnd, _iObject) \
  4918. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_GETOBJECT, _iObject)
  4919. // DOC'ed for DOJ Compliance
  4920. // Sets the redraw mode for the window that is displaying the information
  4921. #define SFVM_SETREDRAW 0x00000008
  4922. #define ShellFolderView_SetRedraw(_hwnd, fRedraw) \
  4923. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_SETREDRAW, (LPARAM)fRedraw)
  4924. // DOC'ed for DOJ Compliance
  4925. // Checks if the current drop is on the view window
  4926. // lparam is unused
  4927. // return value is TRUE if the current drop is upon the background of the
  4928. // view window, FALSE otherwise
  4929. #define SFVM_ISDROPONSOURCE 0x0000000a
  4930. #define ShellFolderView_IsDropOnSource(_hwnd, _pdtgt) \
  4931. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_ISDROPONSOURCE, (LPARAM)_pdtgt)
  4932. // Moves the selected icons in the listview
  4933. // lparam is a pointer to a drop target
  4934. // return value is unused
  4935. #define SFVM_MOVEICONS 0x0000000b
  4936. #define ShellFolderView_MoveIcons(_hwnd, _pdt) \
  4937. (void)SHShellFolderView_Message(_hwnd, SFVM_MOVEICONS, (LPARAM)(LPDROPTARGET)_pdt)
  4938. // Gets the start point of a drag-drop
  4939. // lparam is a pointer to a point
  4940. // return value is unused
  4941. #define SFVM_GETDRAGPOINT 0x0000000c
  4942. #define ShellFolderView_GetDragPoint(_hwnd, _ppt) \
  4943. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETDRAGPOINT, (LPARAM)(LPPOINT)_ppt)
  4944. // Gets the end point of a drag-drop
  4945. // lparam is a pointer to a point
  4946. // return value is unused
  4947. #define SFVM_GETDROPPOINT 0x0000000d
  4948. #define ShellFolderView_GetDropPoint(_hwnd, _ppt) \
  4949. SHShellFolderView_Message(_hwnd, SFVM_GETDROPPOINT, (LPARAM)(LPPOINT)_ppt)
  4950. #define ShellFolderView_GetAnchorPoint(_hwnd, _fStart, _ppt) \
  4951. (BOOL)((_fStart) ? ShellFolderView_GetDragPoint(_hwnd, _ppt) : ShellFolderView_GetDropPoint(_hwnd, _ppt))
  4952. // DOC'ed for DOJ Compliance
  4953. // Determines if a given drop target interface is the one being used for
  4954. // the background of the ShellFolderView (as opposed to an object in the
  4955. // view)
  4956. // lparam is a pointer to a drop target interface
  4957. // return value is TRUE if it is the background drop target, FALSE otherwise
  4958. #define SFVM_ISBKDROPTARGET 0x0000000f
  4959. #define ShellFolderView_IsBkDropTarget(_hwnd, _pdptgt) \
  4960. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_ISBKDROPTARGET, (LPARAM)(LPDROPTARGET)_pdptgt)
  4961. // DOC'ed for DOJ Compliance
  4962. // called by defcm.c when it does a copy/cut
  4963. // sets auto arrange
  4964. #define SFVM_AUTOARRANGE 0x00000011
  4965. #define ShellFolderView_AutoArrange(_hwnd) \
  4966. (void)SHShellFolderView_Message(_hwnd, SFVM_AUTOARRANGE, 0)
  4967. // sets snap to grid
  4968. #define SFVM_ARRANGEGRID 0x00000012
  4969. #define ShellFolderView_ArrangeGrid(_hwnd) \
  4970. (void)SHShellFolderView_Message(_hwnd, SFVM_ARRANGEGRID, 0)
  4971. #define SFVM_GETAUTOARRANGE 0x00000013
  4972. #define ShellFolderView_GetAutoArrange(_hwnd) \
  4973. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETAUTOARRANGE, 0)
  4974. #define SFVM_GETSELECTEDCOUNT 0x00000014
  4975. #define ShellFolderView_GetSelectedCount(_hwnd) \
  4976. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETSELECTEDCOUNT, 0)
  4977. typedef ITEMSPACING *LPITEMSPACING;
  4978. #define SFVM_GETITEMSPACING 0x00000015
  4979. #define ShellFolderView_GetItemSpacing(_hwnd, lpis) \
  4980. (BOOL)SHShellFolderView_Message(_hwnd, SFVM_GETITEMSPACING, (LPARAM)lpis)
  4981. // Causes an object to be repainted
  4982. #define SFVM_REFRESHOBJECT 0x00000016
  4983. #define ShellFolderView_RefreshObject(_hwnd, _ppidl) \
  4984. (LPARAM)SHShellFolderView_Message(_hwnd, SFVM_REFRESHOBJECT, (LPARAM)_ppidl)
  4985. // Causes the the whole view to be refreshed
  4986. #define ShellFolderView_RefreshAll(_hwnd) \
  4987. (LPARAM)PostMessage(_hwnd, WM_KEYDOWN, (WPARAM)VK_F5, (LPARAM)0);
  4988. // DOC'ed for DOJ Compliance
  4989. // SVM_SELECTANDPOSITIONITEM lParam
  4990. typedef struct
  4991. {
  4992. LPCITEMIDLIST pidl; // relative pidl to the view
  4993. UINT uSelectFlags; // select flags
  4994. BOOL fMove; // if true, we should also move it to point pt
  4995. POINT pt;
  4996. } SFM_SAP;
  4997. // shell view messages
  4998. #define SVM_SELECTITEM (WM_USER + 1)
  4999. #define SVM_SELECTANDPOSITIONITEM (WM_USER + 5)
  5000. #include <poppack.h> /* Return to byte packing */
  5001. //===========================================================================
  5002. // CDefShellFolder members (for easy subclassing)
  5003. //===========================================================================
  5004. // Default implementation (no dependencies to the instance data)
  5005. STDMETHODIMP CDefShellFolder_QueryInterface(IShellFolder *psf, REFIID riid, void **ppv);
  5006. STDMETHODIMP CDefShellFolder_BindToStorage(IShellFolder *psf, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv);
  5007. STDMETHODIMP CDefShellFolder_BindToObject(IShellFolder *psf, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv);
  5008. STDMETHODIMP CDefShellFolder_GetAttributesOf(IShellFolder *psf, UINT cidl, LPCITEMIDLIST * apidl, ULONG * rgfOut);
  5009. STDMETHODIMP CDefShellFolder_SetNameOf(IShellFolder *psf, HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR pszName, DWORD dwReserved, LPITEMIDLIST * ppidlOut);
  5010. // File Search APIS
  5011. // DOC'ed for DOJ compliance
  5012. SHSTDAPI_(void) Control_RunDLL(HWND hwndStub, HINSTANCE hAppInstance, LPSTR pszCmdLine, int nCmdShow);
  5013. SHSTDAPI_(void) Control_RunDLLW(HWND hwndStub, HINSTANCE hAppInstance, LPWSTR pszCmdLine, int nCmdShow);
  5014. SHSTDAPI_(void) Control_RunDLLAsUserW(HWND hwndStub, HINSTANCE hAppInstance, LPWSTR lpwszCmdLine, int nCmdShow);
  5015. // to add 16 bit pages to 32bit things. hGlobal can be NULL
  5016. SHSTDAPI_(UINT) SHAddPages16(HGLOBAL hGlobal, LPCTSTR pszDllEntry, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
  5017. // DOC'ed for DOJ compliance
  5018. // Access to MSHMTL's ditherer
  5019. /* Definition of interface: IIntDitherer */
  5020. #undef INTERFACE
  5021. #define INTERFACE IIntDitherer
  5022. DECLARE_INTERFACE_(IIntDitherer, IUnknown)
  5023. {
  5024. #ifndef NO_BASEINTERFACE_FUNCS
  5025. // *** IUnknown methods ***
  5026. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  5027. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  5028. STDMETHOD_(ULONG, Release)(THIS) PURE;
  5029. #endif
  5030. // *** IIntDitherer methods ***
  5031. STDMETHOD(DitherTo8bpp)(THIS_ BYTE * pDestBits, LONG nDestPitch,
  5032. BYTE * pSrcBits, LONG nSrcPitch, REFGUID bfidSrc,
  5033. RGBQUAD * prgbDestColors, RGBQUAD * prgbSrcColors,
  5034. BYTE * pbDestInvMap,
  5035. LONG x, LONG y, LONG cx, LONG cy,
  5036. LONG lDestTrans, LONG lSrcTrans) PURE;
  5037. };
  5038. #ifdef COBJMACROS
  5039. #define IntDitherer_QueryInterface(This,riid,ppvObject) \
  5040. (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  5041. #define IntDitherer_AddRef(This) \
  5042. (This)->lpVtbl -> AddRef(This)
  5043. #define IntDitherer_Release(This) \
  5044. (This)->lpVtbl -> Release(This)
  5045. #define IntDitherer_DitherTo8bpp(This, pDestBits, nDestPitch, \
  5046. pSrcBits, nSrcPitch, bfidSrc, \
  5047. prgbDestColors, prgbSrcColors, \
  5048. pbDestInvMap, x, y, cx, cy, \
  5049. lDestTrans, lSrcTrans) \
  5050. (This)->lpVtbl -> DitherTo8bpp(This, pDestBits, nDestPitch, pSrcBits, nSrcPitch, bfidSrc, \
  5051. prgbDestColors, prgbSrcColors, pbDestInvMap, x, y, cx, cy, lDestTrans, lSrcTrans)
  5052. #endif
  5053. // PID_IS_SCHEME [VT_UI4] Scheme value
  5054. #define PID_IS_FIRST 2
  5055. #define PID_IS_SCHEME 3
  5056. #define PID_IS_IDLIST 14
  5057. #define PID_IS_LAST 14
  5058. // PID_INTSITE_FLAGS [VT_UI4] PIDISF_ flags
  5059. // PID_INTSITE_CONTENTLEN [VT_UI4] Content length
  5060. // PID_INTSITE_CONTENTCODE [VT_UI8] Content code
  5061. // PID_INTSITE_FRAGMENT [VT_NULL] Fragments
  5062. #define PID_INTSITE_FIRST 2
  5063. #define PID_INTSITE_FRAGMENT 17
  5064. #define PID_INTSITE_LAST 21
  5065. //Is URL entered in IE history bucket?
  5066. #define PIDISF_HISTORY 0x10000000
  5067. // Athena needs this to determine whether to double click or not.
  5068. //
  5069. // NOTE: if user uninstalls IE4, the Win95 code will
  5070. // realize that the size has changed (even though it's not
  5071. // in this struct, it is saved) and drop back to default state.
  5072. //
  5073. // Since we're exporting this so ISVs can get access to our flags,
  5074. // let's avoid the need for a thunk and export the beginning section
  5075. // of this structure ONLY. Here are the A and W versions for internal use:
  5076. //
  5077. // DOC'ed for DOJ compliance
  5078. // These were in Win95 //
  5079. // The below were added for IE4 //
  5080. // These must have been an OSR release, as they aren't on \\guilo\slmadd\src\dev\inc16\shsemip.h
  5081. // This was added for IE4
  5082. // If you need a new flag, steal a bit from from fSpareFlags.
  5083. //
  5084. // If you add any fields to this structure, you
  5085. // must also add upgrade code to shell32\util.cpp.
  5086. //
  5087. //
  5088. // If you add any fields to this structure, you
  5089. // must also add upgrade code to shell32\util.cpp.
  5090. //
  5091. #define SHELLSTATEVERSION 13 // rev if defaults change but size doesn't //
  5092. // And here's the beginning portion for public use:
  5093. #define SSF_HIDDENFILEEXTS 0x00000004 //
  5094. #define SSF_SORTCOLUMNS 0x00000010 //
  5095. #define SSF_FILTER 0x00010000 //
  5096. #define SSF_WEBVIEW 0x00020000 //
  5097. #define SSF_SHOWSUPERHIDDEN 0x00040000 //
  5098. #define SSF_SEPPROCESS 0x00080000 //
  5099. #define SSF_NONETCRAWLING 0x00100000 //
  5100. #define SSF_STARTPANELON 0x00200000 //
  5101. #define SSF_SHOWSTARTPAGE 0x00400000 //
  5102. // CmdID's for CGID_MENUDESKBAR
  5103. #define MBCID_GETSIDE 1
  5104. #define MBCID_RESIZE 2
  5105. #define MBCID_SETEXPAND 3
  5106. #define MBCID_SETFLAT 4
  5107. #define MBCID_NOBORDER 5
  5108. // menubar orientation
  5109. #define MENUBAR_LEFT ABE_LEFT
  5110. #define MENUBAR_TOP ABE_TOP
  5111. #define MENUBAR_RIGHT ABE_RIGHT
  5112. #define MENUBAR_BOTTOM ABE_BOTTOM
  5113. //
  5114. // Net Access Wizard - called from NetID and WinLogon.
  5115. //
  5116. #define NAW_NETID 0x00 // called from netid tab
  5117. #define NAW_PSDOMAINJOINED 0x02 // post setup (joined domain)
  5118. #define NAW_PSDOMAINJOINFAILED 0x03 // post setup (domain joined failed)
  5119. STDAPI NetAccessWizard(HWND hwnd, UINT uType, BOOL *pfReboot);
  5120. typedef HRESULT (CALLBACK *LPNETACCESSWIZARD)(HWND hwnd, UINT uType, BOOL *pfReboot);
  5121. STDAPI ClearAutoLogon(VOID);
  5122. //
  5123. // Net Places API's called from mpr.
  5124. //
  5125. typedef enum
  5126. {
  5127. NETPLACES_WIZARD_MAPDRIVE = 0,
  5128. NETPLACES_WIZARD_ADDPLACE,
  5129. } NETPLACESWIZARDTYPE;
  5130. STDAPI_(DWORD)
  5131. NetPlacesWizardDoModal(
  5132. LPCONNECTDLGSTRUCTW lpConnDlgStruct,
  5133. NETPLACESWIZARDTYPE npwt,
  5134. BOOL fIsRoPath
  5135. );
  5136. // Definition for the exported function types (for GetProcAddress)
  5137. typedef DWORD (STDAPICALLTYPE*NetPlacesWizardDoModal_t)(LPCONNECTDLGSTRUCTW lpConnDlgStruct, NETPLACESWIZARDTYPE npwt, BOOL fIsROPath);
  5138. //
  5139. // moved here from nettarg.h (shell\inc)
  5140. //
  5141. // nCmdID
  5142. #define CFCID_SETENUMTYPE 0
  5143. //nCmdExecOpt
  5144. #define CFCOPT_ENUMINCOMING 1
  5145. #define CFCOPT_ENUMOUTGOING 2
  5146. #define CFCOPT_ENUMALL 3
  5147. /****************************************************
  5148. Items to display in the shutdown dialog (dwItems)
  5149. -------------------------------------------------
  5150. These flags can be |'d when passed in. A single
  5151. value will be returned, with NONE indicating an
  5152. error or the user clicked cancel.
  5153. -dsheldon
  5154. ****************************************************/
  5155. #define SHTDN_NONE 0x000000000
  5156. #define SHTDN_LOGOFF 0x000000001
  5157. #define SHTDN_SHUTDOWN 0x000000002
  5158. #define SHTDN_RESTART 0x000000004
  5159. #define SHTDN_RESTART_DOS 0x000000008
  5160. #define SHTDN_SLEEP 0x000000010
  5161. #define SHTDN_SLEEP2 0x000000020
  5162. #define SHTDN_HIBERNATE 0x000000040
  5163. #define SHTDN_DISCONNECT 0x000000080
  5164. // Shutdown dialog function exported from MSGINA.dll
  5165. STDAPI_(DWORD) ShellShutdownDialog(HWND hwndParent, LPCTSTR szUsername, DWORD dwExcludeItems);
  5166. typedef DWORD (STDAPICALLTYPE*PFNSHELLSHUTDOWNDIALOG)(HWND hwndParent, LPCTSTR szUsername, DWORD dwExcludeItems);
  5167. // Define a clipboard format for a data object to pass a user's SID
  5168. // A data object supporting this format is passed to IShellExtInit::Initialize
  5169. // before calling IShellPropSheetExt::AddPages.
  5170. #define CFSTR_USERPROPPAGESSID TEXT("UserPropertyPagesSid")
  5171. // Registry paths where extra IShellPropSheetExt handlers can be put so that
  5172. // extended pages are added to the CPL or User Properties
  5173. #define REGSTR_USERSANDPASSWORDS_CPL \
  5174. /* HKLM\\ */ TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Users and Passwords")
  5175. // CLSIDs go in HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\Users and Passwords\shellex\PropertySheetHandlers
  5176. #define REGSTR_USERPROPERTIES_SHEET \
  5177. /* HKLM\\ */ TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Users and Passwords\\User Properties")
  5178. // CLSIDs go in HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\Users and Passwords\User Properties\shellex\PropertySheetHandlers
  5179. //
  5180. // SHFileSysBindToStorage()
  5181. // Wrap of file system IShellFolder::BindToStorage
  5182. //
  5183. // pszPath // storage path
  5184. // grfFileAttrib // optional Win32/64 file attribute bits. Use 0 to specify default behavior
  5185. // grfMode // STGM_ mode flags.
  5186. // grfFlags // BIND_xxx bind flags
  5187. // riid // storage interface ID
  5188. // **ppv // outbound storage interface pointer.
  5189. //
  5190. SHSTDAPI SHFileSysBindToStorage(LPCWSTR pszPath, DWORD grfFileAttrib, DWORD grfMode, DWORD grfFlags, REFIID riid, void **ppv);
  5191. // DOC'ed for DOJ compliance
  5192. // SHIsLegacyAnsiProperty()
  5193. //
  5194. // Determine whether the property is a legacy ANSI property, and if so,
  5195. // compute a conversion type for the property.
  5196. //
  5197. // fmtid, // property set identifier
  5198. // propid, // property identifier
  5199. // pvt, // optional: if non-null, contains on input the VARTYPE for the property; on output,
  5200. // the converted type. (e.g., VT_LPSTR <--> VT_LPWSTR).
  5201. SHSTDAPI_(BOOL) SHIsLegacyAnsiProperty( REFFMTID fmtid, PROPID propid, IN OUT OPTIONAL VARTYPE* pvt );
  5202. //-------------------------------------------------------------------------//
  5203. // linkwnd.h - declaration of LinkWindow control
  5204. //
  5205. // LinkWindow supports HTML-like embedded links in the caption text.
  5206. // (e.g. "<a>Click Here</a> to see something cool"
  5207. //
  5208. // An unlimited number of embedded links are supported. When the user clicks
  5209. // on a link, an WM_NOTIFY - LWN_CLICK notification message is sent to the
  5210. // parent window. The message data includes the zero-based index
  5211. // (left to right orientation) of the link that was clicked.
  5212. //
  5213. // scotthan: author/owner
  5214. // dsheldon: moved this to shlobjp.h. Eventually destined for comctl32.
  5215. EXTERN_C BOOL WINAPI LinkWindow_RegisterClass() ;
  5216. EXTERN_C BOOL WINAPI LinkWindow_UnregisterClass( HINSTANCE ) ;
  5217. #define INVALID_LINK_INDEX (-1)
  5218. #define MAX_LINKID_TEXT 48
  5219. #define LINKWINDOW_CLASS TEXT("Link Window")
  5220. #define LWS_TRANSPARENT 0x0001
  5221. #define LWS_HOTTRACK 0x0002
  5222. #define LWIF_ITEMINDEX 0x00000001
  5223. #define LWIF_STATE 0x00000002
  5224. #define LWIF_ITEMID 0x00000004
  5225. #define LWIF_URL 0x00000008
  5226. #define LWIS_FOCUSED 0x0001
  5227. #define LWIS_ENABLED 0x0002
  5228. #define LWIS_VISITED 0x0004
  5229. #define LWIS_SHELLEXECURL 0x00000008 // If the caller didn't handle the msg (NM_CLICK), then ShellExecute the szURL
  5230. // BUGBUG: we've got to change the following definition to
  5231. // wininet.h::INTERNET_MAX_URL_LENGTH.
  5232. // Currently, this breaks various dependents.
  5233. #define LW_MAX_URL_LENGTH (2048 + 32 + sizeof("://"))
  5234. // LWITEM
  5235. typedef struct tagLWITEMA {
  5236. UINT mask ;
  5237. int iLink ;
  5238. UINT state ;
  5239. UINT stateMask ;
  5240. CHAR szID[MAX_LINKID_TEXT] ;
  5241. CHAR szUrl[LW_MAX_URL_LENGTH] ; //bugbug: INTERNET_MAX_URL_LENGTH
  5242. } LWITEMA, *LPLWITEMA;
  5243. typedef struct tagLWITEMW {
  5244. UINT mask ;
  5245. int iLink ;
  5246. UINT state ;
  5247. UINT stateMask ;
  5248. WCHAR szID[MAX_LINKID_TEXT] ;
  5249. WCHAR szUrl[LW_MAX_URL_LENGTH] ; //bugbug: INTERNET_MAX_URL_LENGTH
  5250. } LWITEMW, *LPLWITEMW;
  5251. // LWHITTESTINFO
  5252. typedef struct tagLWHITTESTINFOA {
  5253. POINT pt ;
  5254. LWITEMA item ;
  5255. } LWHITTESTINFOA, *LPLWHITTESTINFOA;
  5256. // LWHITTESTINFO
  5257. typedef struct tagLWHITTESTINFOW {
  5258. POINT pt ;
  5259. LWITEMW item ;
  5260. } LWHITTESTINFOW, *LPLWHITTESTINFOW;
  5261. // NMLINKWND
  5262. typedef struct tagNMLINKWNDA {
  5263. NMHDR hdr;
  5264. LWITEMA item ;
  5265. } NMLINKWNDA, *LPNMLINKWNDA;
  5266. typedef struct tagNMLINKWNDW {
  5267. NMHDR hdr;
  5268. LWITEMW item ;
  5269. } NMLINKWNDW, *LPNMLINKWNDW;
  5270. #ifdef UNICODE
  5271. #define LWITEM LWITEMW
  5272. #define LPLWITEM LPLWITEMW
  5273. #define LWHITTESTINFO LWHITTESTINFOW
  5274. #define LPLWHITTESTINFO LPLWHITTESTINFOW
  5275. #define NMLINKWND NMLINKWNDW
  5276. #define LPNMLINKWND LPNMLINKWNDW
  5277. #else //UNICODE
  5278. #define LWITEM LWITEMA
  5279. #define LPLWITEM LPLWITEMA
  5280. #define LWHITTESTINFO LWHITTESTINFOA
  5281. #define LPLWHITTESTINFO LPLWHITTESTINFOA
  5282. #define NMLINKWND NMLINKWNDA
  5283. #define LPNMLINKWND LPNMLINKWNDA
  5284. #endif //UNICODE
  5285. // LinkWindow notifications
  5286. // NM_CLICK // wParam: n/a, lParam: LPLWITEM, ret: ignored.
  5287. // LinkWindow messages
  5288. #define LWM_HITTEST (WM_USER+0x300) // wParam: n/a, lparam: LPLWHITTESTINFO, ret: BOOL
  5289. #define LWM_GETIDEALHEIGHT (WM_USER+0x301) // wParam: n/a, lparam: n/a, ret: cy
  5290. #define LWM_SETITEM (WM_USER+0x302) // wParam: n/a, lparam: LWITEM*, ret: BOOL
  5291. #define LWM_GETITEM (WM_USER+0x303) // wParam: n/a, lparam: LWITEM*, ret: BOOL
  5292. //-------------------------------------------------------------------------//
  5293. // INTERNAL: Darwin link tracking for start menu
  5294. // lives in unicpp\startmnu.cpp
  5295. #if _WIN32_IE >= 0x0600
  5296. // Note: SHRegisterDarwinLink takes ownership of pidlFull. fUpdate means: update the Darwin state right away
  5297. SHSTDAPI_(BOOL) SHRegisterDarwinLink(LPITEMIDLIST pidlFull, LPWSTR pszDarwinID, BOOL fUpdate);
  5298. // Use this function to update the Darwin state for all registered Darwin shortcuts.
  5299. SHSTDAPI_(void) SHReValidateDarwinCache();
  5300. SHSTDAPI SHParseDarwinIDFromCacheW(LPWSTR pszDarwinDescriptor, LPWSTR *ppwszOut);
  5301. #endif
  5302. //
  5303. // GroupButton is a variation of a group box control but supports a link-like
  5304. // caption bar, and optionally, can be buddied to a containee window for
  5305. // auto-positioning behavior.
  5306. //
  5307. // scotthan: author/owner
  5308. #define GROUPBUTTON_CLASS TEXT("GroupButton")
  5309. EXTERN_C ATOM WINAPI GroupButton_RegisterClass() ;
  5310. EXTERN_C BOOL WINAPI GroupButton_UnregisterClass() ;
  5311. #include <pshpack8.h>
  5312. typedef struct tagGBPLACEMENT
  5313. {
  5314. LONG x ; // in: top left; -1 to ignore
  5315. LONG y ; // in: top right; -1 to ignore
  5316. LONG cx ; // in: width to assign; -1 to ignore.
  5317. // If cx != -1, cxContain and cxMax are ignored.
  5318. LONG cy ; // in: height to assign; -1 to ignore.
  5319. // If cy != -1, cyContain and cyMax are ignored.
  5320. LONG cxBuddy ; // in: width of buddy area; -1 to ignore
  5321. LONG cyBuddy ; // in: height of buddy area; -1 to ignore
  5322. LONG cxBuddyMargin ;// in: width of buddy margin; -1 to ignore
  5323. LONG cyBuddyMargin ;// in: height of buddy margin; -1 to ignore
  5324. RECT rcBuddy ; // out: new buddy rect in parent coords.
  5325. RECT rcWindow ; // out: new window rect in parent coords.
  5326. HDWP hdwp ; // optional in: Non-NULL => DeferWindowPos,
  5327. // NULL => SetWindowPos
  5328. } GBPLACEMENT, *PGBPLACEMENT, *LPGBPLACEMENT ;
  5329. #include <poppack.h> /* Return to byte packing */
  5330. // Buddy flags
  5331. #define GBBF_HRESIZE 0x00000001
  5332. #define GBBF_VRESIZE 0x00000002
  5333. #define GBBF_HSCROLL 0x00000004
  5334. #define GBBF_VSCROLL 0x00000008
  5335. #define GBBF_HSLAVE 0x00000010
  5336. #define GBBF_VSLAVE 0x00000020
  5337. // Group button messages
  5338. #define GBM_FIRST (WM_USER+0x400) // arbitrary
  5339. #define GBM_SETPLACEMENT (GBM_FIRST+0) // WPARAM: n/a, LPARAM: PGBPLACEMENT, return: BOOL
  5340. #define GBM_SETBUDDY (GBM_FIRST+1) // WPARAM: HWND hwndBuddy, LPARAM: dwBuddyFlags, return: BOOL
  5341. #define GBM_GETBUDDY (GBM_FIRST+2) // WPARAM: n/a, LPARAM: n/a, return: HWND
  5342. #define GBM_SETDROPSTATE (GBM_FIRST+3) // WPARAM: BOOL fDropped, LPARAM: n/a, return: BOOL
  5343. #define GBM_GETDROPSTATE (GBM_FIRST+4) // WPARAM: n/a, LPARAM: n/a, return: BOOL fDropped
  5344. #define GBM_LAST GBM_GETDROPSTATE
  5345. typedef struct tagGBNQUERYBUDDYSIZE
  5346. {
  5347. NMHDR hdr;
  5348. LONG cx ;
  5349. LONG cy ;
  5350. } GBNQUERYBUDDYSIZE, *LPGBNQUERYBUDDYSIZE, *PGBNQUERYBUDDYSIZE ;
  5351. // Group button notifications
  5352. #define GBN_FIRST 2000U
  5353. #define GBN_LAST 2020U
  5354. #define GBN_QUERYBUDDYHEIGHT (GBN_FIRST+0) // LPARAM: LPGBNQUERYBUDDYSIZE
  5355. #define GBN_QUERYBUDDYWIDTH (GBN_FIRST+1) // LPARAM: LPGBNQUERYBUDDYSIZE.
  5356. // create standard IExtractIcon for file system like things (that does not really exist)
  5357. // DOC'ed for DOJ compliance
  5358. // Limit Input Mask values:
  5359. #define LIM_FLAGS 0x00000001 // dwFlags contains valid data. Otherwise all default values are used.
  5360. #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.
  5361. #define LIM_HINST 0x00000008 // hinst contains valid data
  5362. #define LIM_TITLE 0x00000010 // pszTitle contains valid data. This data will be shown in bold at the top of any tooltips displayed.
  5363. #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.
  5364. #define LIM_ICON 0x00000040 // hicon contains valid data. This icon will be displayed in front of the title if a title is given.
  5365. #define LIM_NOTIFY 0x00000080 // hwndNotify contains the window handle that should receive any notification messages. By default, the parent of hwndEdit recieves notifications.
  5366. #define LIM_TIMEOUT 0x00000100 // iTimeout is valid. Otherwise the default timeout of 10 seconds is used.
  5367. #define LIM_TIPWIDTH 0x00000200 // cxTipWidth is valid. Otherwiser the default is 500 pixels.
  5368. // Limit Input Flags values:
  5369. #define LIF_INCLUDEFILTER 0x00000000 // default value. pszFilter is a string of allowable characters.
  5370. #define LIF_EXCLUDEFILTER 0x00000001 // pszFilter is a string of excluded characters.
  5371. #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.
  5372. #define LIF_WARNINGBELOW 0x00000000 // default value. Balloon tooltips will be shown below the window by default.
  5373. #define LIF_WARNINGABOVE 0x00000004 // Ballon tooltips will be shown above the window by default.
  5374. #define LIF_WARNINGCENTERED 0x00000008 // Ballon tooltips will be shown pointing to the center of the window.
  5375. #define LIF_WARNINGOFF 0x00000010 // no balloon tooltip will be displayed upon invalid input.
  5376. #define LIF_FORCEUPPERCASE 0x00000020 // all characters will be converted to upper case. Cannot be use with LIF_FORCELOWERCASE.
  5377. #define LIF_FORCELOWERCASE 0x00000040 // all characters will be converted to lower case. Cannot be use with LIF_FORCEUPPERCASE.
  5378. #define LIF_MEESAGEBEEP 0x00000000 // default value. A tone will be played to alert the user if they attemp invalid input.
  5379. #define LIF_SILENT 0x00000080 // No tone will be played.
  5380. #define LIF_NOTIFYONBADCHAR 0x00000100 // a notify message will be sent to hwndNotify when invalid input is attempted.
  5381. #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.
  5382. #define LIF_PASTESKIP 0x00000000 // default value. When pasting, skip the bad characters and paste all of the good characters.
  5383. #define LIF_PASTESTOP 0x00000400 // When pasting, stop when the first bad character is incountered. Valid characters in front of this will get pasted.
  5384. #define LIF_PASTECANCEL 0x00000800 // When pasting, abort the entire paste if any characters are invalid.
  5385. #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.
  5386. // Limit Input Category Filters:
  5387. // these flags use the result of GetStringTypeEx with CT_TYPE1:
  5388. #define LICF_UPPER 0x00000001 // Uppercase
  5389. #define LICF_LOWER 0x00000002 // Lowercase
  5390. #define LICF_DIGIT 0x00000004 // Decimal digits
  5391. #define LICF_SPACE 0x00000008 // Space characters
  5392. #define LICF_PUNCT 0x00000010 // Punctuation
  5393. #define LICF_CNTRL 0x00000020 // Control characters
  5394. #define LICF_BLANK 0x00000040 // Blank characters
  5395. #define LICF_XDIGIT 0x00000080 // Hexadecimal digits
  5396. #define LICF_ALPHA 0x00000100 // Any linguistic character: alphabetic, syllabary, or ideographic
  5397. // these flags check for a few things that GetStringTypeEx doesn't check
  5398. #define LICF_BINARYDIGIT 0x00010000 // 0-1
  5399. #define LICF_OCTALDIGIT 0x00020000 // 0-7
  5400. #define LICF_ATOZUPPER 0x00100000 // A-Z (use LICF_ALPHA for language independent check)
  5401. #define LICF_ATOZLOWER 0x00200000 // a-z (use LICF_ALPHA for language independent check)
  5402. #define LICF_ATOZ (LICF_ATOZUPPER|LICF_ATOZLOWER) // a-z, A-Z
  5403. #include <pshpack8.h>
  5404. typedef struct tagLIMITINPUT
  5405. {
  5406. DWORD cbSize;
  5407. DWORD dwMask;
  5408. DWORD dwFlags;
  5409. HINSTANCE hinst;
  5410. 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.
  5411. 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.
  5412. 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.
  5413. HICON hIcon; // handle to an icon, or I_ICONCALLBACK if the notify window should be asked to provide an icon.
  5414. HWND hwndNotify; // handle to a window to process notify messages
  5415. INT iTimeout; // time in milliseconds to display the tooltip
  5416. INT cxTipWidth; // max width of the tooltip in pixels. Defaults to 500.
  5417. } LIMITINPUT;
  5418. typedef struct tagNMLIDISPINFO
  5419. {
  5420. NMHDR hdr; // standard notification header structure
  5421. LIMITINPUT li; // the mask member indicates which fields must be filled out.
  5422. } NMLIDISPINFO, * LPNMLIDISPINFO, NMLIFILTERINFO, * LPNMLIFILTERINFO;
  5423. #define LIN_GETDISPINFO 0x01 // notify code sent to retrieve tooltip display info
  5424. #define LIN_GETFILTERINFO 0x02 // notify code sent to retrieve filter or mask info
  5425. typedef struct tagNMLIBADCHAR
  5426. {
  5427. NMHDR hdr; // standard notification header structure
  5428. WPARAM wParam; // wParam sent in WM_CHAR message
  5429. LPARAM lParam; // lParam sent in WM_CHAR message
  5430. } NMLIBADCHAR, * LPNMLIBADCHAR;
  5431. #define LIN_BADCHAR 0x03 // notify code sent when a character is filtered out
  5432. #define I_ICONCALLBACK ((HICON)-1L)
  5433. // Helpers which prevent entry of invalid (as defined by the folder) characters. Call on LVN_BEGIN_INPUT_EDIT
  5434. // doc'ed for DOJ compliance
  5435. SHSTDAPI SHLimitInputEditWithFlags(HWND hwndEdit, LIMITINPUT * pil);
  5436. SHSTDAPI SHLimitInputEditChars(HWND hwndEdit, LPCWSTR pszValidChars, LPCWSTR pszInvalidChars);
  5437. SHSTDAPI SHLimitInputCombo(HWND hwndComboBox, IShellFolder *psf);
  5438. // DOC'ed for DOJ Compliance
  5439. // DOC'ed for DOJ Compliance
  5440. int _cdecl ShellMessageBoxWrapW(HINSTANCE hInst, HWND hWnd, LPCWSTR pszMsg, LPCWSTR pszTitle, UINT fuStyle, ...);
  5441. #ifdef UNICODE
  5442. #define ShellMessageBoxWrap ShellMessageBoxWrapW
  5443. #else
  5444. #define ShellMessageBoxWrap ShellMessageBoxA
  5445. #endif
  5446. // Helpers for handling IDataObject stuff - from shell32.dll
  5447. // DOC'ed for DOJ compliance
  5448. STDAPI SHSimulateDropOnClsid(REFCLSID clsidDrop, IUnknown* punkSite, IDataObject* pdo);
  5449. #include <poppack.h> /* Return to byte packing */
  5450. #ifdef __cplusplus
  5451. }
  5452. #endif /* __cplusplus */
  5453. #include <poppack.h>
  5454. #endif // _SHLOBJP_H_