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.

504 lines
23 KiB

  1. #ifndef _SHDOCVW_H_
  2. #define _SHDOCVW_H_
  3. //
  4. // Define used for unicode shodcvw. When shdocvw is fully unicode and no longer
  5. // builds an ansi version this should be removed.
  6. #include <iethread.h>
  7. //
  8. // SHDOCVW private header
  9. //
  10. // #include <shlobj.h> or <shellapi.h> before this to get the right
  11. // SHDOCAPI macro definitions.
  12. //
  13. // value under HKLM\software\microsoft\internet explorer where we cache the platform
  14. #define REGVAL_INTEGRATEDBROWSER TEXT("IntegratedBrowser")
  15. SHDOCAPI_(int) IEWinMain(LPSTR pszCmdLine, int nCmdShow);
  16. //
  17. // Automation support.
  18. //
  19. SHDOCAPI CDDEAuto_Navigate(BSTR str, HWND *phwnd, long lLaunchNewWindow);
  20. SHDOCAPI SHGetIDispatchForFolder(LPCITEMIDLIST pidl, IWebBrowserApp **ppauto);
  21. SHDOCAPI URLQualifyA(LPCSTR pszURL, DWORD dwFlags, LPSTR * ppszOut);
  22. SHDOCAPI URLQualifyW(LPCWSTR pszURL, DWORD dwFlags, LPWSTR * ppszOut);
  23. #ifdef UNICODE
  24. #define URLQualify URLQualifyW
  25. #else
  26. #define URLQualify URLQualifyA
  27. #endif
  28. // Flags for URLQualify
  29. #define UQF_GUESS_PROTOCOL 0x00000001 // Try to guess based upon given path ("www.msn.com")
  30. #define UQF_USE_DEFAULT_PROTOCOL 0x00000002 // Resort to default protocol if guess fails
  31. #define UQF_IGNORE_FILEPATHS 0x00000004 // Don't special case file paths
  32. #define UQF_CANONICALIZE 0x00000008 // Canonicalize if a valid URL
  33. #define UQF_AUTOCORRECT 0x00000010 // Try to correct typo's
  34. #define UQF_DEFAULT (UQF_GUESS_PROTOCOL | UQF_USE_DEFAULT_PROTOCOL)
  35. // Quick pass to show Splash screens for IE components
  36. SHDOCAPI_(HWND) SHShowSplashScreen(DWORD dwMember); // Which member of family...
  37. SHDOCAPI SHDismissSplashScreen(HWND hwnd);
  38. SHDOCAPI_(BOOL) GenerateHTMLForDesktop();
  39. #define COMP_TYPE_MASK 0x0000000F // apply to COMP_TYPE to get the type
  40. #define COMP_UNCHECKED 0x00001000
  41. #define COMP_CHECKED 0x00002000
  42. #define COMP_SELECTED 0x00002000
  43. #define COMP_NOSCROLL 0x00004000
  44. // shared icons.
  45. // instead of duplicating the icons in a bunch of dll's, we have a few that are shared
  46. #define IDI_HOMEPAGE 100 // Index: 0
  47. SHDOCAPI_(BOOL) IsFileUrl(LPCSTR psz);
  48. SHDOCAPI_(BOOL) IsFileUrlW(LPCWSTR pcwzUrl);
  49. SHDOCAPI_(BOOL) PathIsFilePath(LPCWSTR lpszPath);
  50. SHDOCAPI_(BOOL) IsErrorUrl(LPCWSTR pwszDisplayName);
  51. // For dwSubstitutions parameter in URLSubstitution() and RegURLSubstitution().
  52. //#define URLSUB_CLSID 0x00000001 // UNUSED (buzzr)
  53. #define URLSUB_PRD 0x00000002 // Product IE (Example: "ie")
  54. #define URLSUB_PVER 0x00000004 // Product Version (Example: "4.0")
  55. #define URLSUB_OS 0x00000008 // System OS, same as header
  56. #define URLSUB_RFC1766 0x00000010 // Human readable LCID (Example: "en-us")
  57. #define URLSUB_OVER 0x00000020 // System OS Version (Example: 3.1, 3.5.1, 4.0). Do not use year numbers.
  58. #define URLSUB_OLCID 0x00000040 // The hexadecimal Locale ID (LCID) or Language ID (LID) of the operating system.
  59. #define URLSUB_CLCID 0x00000080 // The hexadecimal Locale ID (LCID) or Language ID (LID) of the current user�s Regional Setting (as in Control Panel).
  60. #define URLSUB_ALL 0xFFFFFFFF
  61. SHDOCAPI URLSubLoadString(HINSTANCE hInst, UINT idRes, LPWSTR pszUrlOut,
  62. DWORD cchSizeOut, DWORD dwSubstitutions);
  63. SHDOCAPI_(void) SHInitRoot(IETHREADPARAM* piei);
  64. SHDOCAPI URLSubstitution(LPCWSTR pszUrlIn, LPWSTR pszUrlOut, DWORD cchSize, DWORD dwSubstitutions);
  65. SHDOCAPI_(IStream *) OpenPidlOrderStream(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidl, LPCSTR pszKey, DWORD grfMode);
  66. SHDOCAPI DragDrop(HWND hwnd, IShellFolder * psfParent, LPCITEMIDLIST pidl, DWORD dwPrefEffect, DWORD *pdwEffect) ;
  67. SHDOCAPI_(int) IEMapPIDLToSystemImageListIndex(IShellFolder *psfParent, LPCITEMIDLIST pidlChild, int *piSelectedImage);
  68. SHDOCAPI_(void) IEInvalidateImageList(void);
  69. SHDOCAPI_(BOOL) ILIsWeb(LPCITEMIDLIST pidl);
  70. SHDOCAPI_(BOOL) IsURLChild(LPCITEMIDLIST pidl, BOOL fIncludeHome);
  71. SHDOCAPI IEParseDisplayNameWithBCW(UINT uiCP, LPCWSTR pwszPath, IBindCtx * pbc, LPITEMIDLIST * ppidlOut);
  72. SHDOCAPI IEParseDisplayName(UINT uiCP, LPCTSTR pszPath, LPITEMIDLIST * ppidlOut);
  73. SHDOCAPI IEBindToObjectEx(LPCITEMIDLIST pidl, IBindCtx *pbc, REFIID riid, void **ppv);
  74. SHDOCAPI IEBindToObject(LPCITEMIDLIST pidl, IShellFolder **ppsfOut);
  75. SHDOCAPI IEGetAttributesOf(LPCITEMIDLIST pidl, DWORD* pdwAttribs);
  76. SHDOCAPI IEGetDisplayName(LPCITEMIDLIST pidl, LPWSTR pszName, UINT uFlags);
  77. SHDOCAPI IEGetNameAndFlags(LPCITEMIDLIST pidl, UINT uFlags, LPWSTR pszName, DWORD cchName, DWORD *prgfInOutAttrs);
  78. // flags for IEGetNameAndFlagsEx() dwIEFlags
  79. #define IEGDN_NOFRAGMENT 0x0001
  80. SHDOCAPI IEGetNameAndFlagsEx(LPCITEMIDLIST pidl, UINT uSHFlags, DWORD dwIEFlags, LPWSTR pszName, DWORD cchName, DWORD *prgfInOutAttrs);
  81. SHDOCAPI_(BOOL) IEILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, BOOL fIgnoreHidden);
  82. SHDOCAPI IECreateFromPathCPWithBCA(UINT uiCP, LPCSTR pszPath, IBindCtx * pbc, LPITEMIDLIST *ppidlOut);
  83. SHDOCAPI IECreateFromPathCPWithBCW(UINT uiCP, LPCWSTR pszPath, IBindCtx * pbc, LPITEMIDLIST *ppidlOut);
  84. #define IEParseDisplayNameW(uiCP, pwszPath, ppidlOut) IEParseDisplayNameWithBCW(uiCP, pwszPath, NULL, ppidlOut)
  85. #define IECreateFromPathA(pszPath, ppidlOut) IECreateFromPathCPWithBCA(CP_ACP, pszPath, NULL, ppidlOut)
  86. #define IECreateFromPathW(pszPath, ppidlOut) IECreateFromPathCPWithBCW(CP_ACP, pszPath, NULL, ppidlOut)
  87. #ifdef UNICODE
  88. #define IECreateFromPathCPWithBC IECreateFromPathCPWithBCW
  89. #define IECreateFromPath(pszPath, ppidlOut) IECreateFromPathCPWithBC(CP_ACP, pszPath, NULL, ppidlOut)
  90. #else // UNICODE
  91. #define IECreateFromPathCPWithBC IECreateFromPathCPWithBCA
  92. #define IECreateFromPath(pszPath, ppidlOut) IECreateFromPathCPWithBC(CP_ACP, pszPath, NULL, ppidlOut)
  93. #endif // UNICODE
  94. SHDOCAPI CreateShortcutInDirA(IN LPCITEMIDLIST pidlTarget, IN LPSTR pszTitle, IN LPCSTR pszDir,
  95. OUT LPSTR pszOut, IN BOOL bUpdateProperties);
  96. SHDOCAPI CreateShortcutInDirW(IN LPCITEMIDLIST pidlTarget, IN LPWSTR pwzTitle, IN LPCWSTR pwzDir,
  97. OUT LPWSTR pwzOut, IN BOOL bUpdateProperties);
  98. #ifndef UNICODE
  99. #define CreateShortcutInDir CreateShortcutInDirA
  100. #else
  101. #define CreateShortcutInDir CreateShortcutInDirW
  102. #endif
  103. SHDOCAPI_(void) IECleanUpAutomationObject();
  104. SHDOCAPI_(void) IEOnFirstBrowserCreation(IUnknown* punkAuto);
  105. SHDOCAPI_(BOOL) IEDDE_WindowDestroyed(HWND hwnd);
  106. SHDOCAPI_(BOOL) IEDDE_NewWindow(HWND hwnd);
  107. SHDOCAPI _GetStdLocation(LPWSTR pszPath, DWORD cchPathSize, UINT id);
  108. SHDOCAPI SHCreateStreamWrapperCP(IStream *aStreams[], UINT cStreams, DWORD grfMode, UINT uiCodePage, IStream **ppstm);
  109. #define DVIDM_GOHOME (FCIDM_SHVIEWFIRST + 0x10E)
  110. /// Browser command ids
  111. //---------------------------------------------------------------------------
  112. /// pre-merged browser menu command ids
  113. ///--------------------------------------------------------------------------
  114. #define DVIDM_FIRST (FCIDM_SHVIEWFIRST + 0x100)
  115. #define DVIDM_OPEN (FCIDM_SHVIEWFIRST + 0x100)
  116. #define DVIDM_SAVE (FCIDM_SHVIEWFIRST + 0x101)
  117. #define DVIDM_SAVEASFILE (FCIDM_SHVIEWFIRST + 0x102)
  118. #define DVIDM_PAGESETUP (FCIDM_SHVIEWFIRST + 0x103)
  119. #define DVIDM_PRINT (FCIDM_SHVIEWFIRST + 0x104)
  120. #define DVIDM_PROPERTIES (FCIDM_SHVIEWFIRST + 0x106)
  121. #define DVIDM_CUT (FCIDM_SHVIEWFIRST + 0x107)
  122. #define DVIDM_COPY (FCIDM_SHVIEWFIRST + 0x108)
  123. #define DVIDM_PASTE (FCIDM_SHVIEWFIRST + 0x109)
  124. #define DVIDM_REFRESH (FCIDM_SHVIEWFIRST + 0x10A)
  125. #define DVIDM_STOPDOWNLOAD (FCIDM_SHVIEWFIRST + 0x10B)
  126. #define DVIDM_ZOOMIN (FCIDM_SHVIEWFIRST + 0x10C)
  127. #define DVIDM_ZOOMOUT (FCIDM_SHVIEWFIRST + 0x10D)
  128. #define DVIDM_GOSEARCH (FCIDM_SHVIEWFIRST + 0x10F)
  129. #define DVIDM_GOFIRSTHOME (FCIDM_SHVIEWFIRST + 0x110)
  130. #define DVIDM_GOFIRSTHOMERO (FCIDM_SHVIEWFIRST + 0x111)
  131. #define DVIDM_GOLOCALPAGE (FCIDM_SHVIEWFIRST + 0x112)
  132. #define DVIDM_NEWWINDOW (FCIDM_SHVIEWFIRST + 0x113)
  133. #define DVIDM_DHFAVORITES (FCIDM_SHVIEWFIRST + 0x114)
  134. #define DVIDM_PRINTPREVIEW (FCIDM_SHVIEWFIRST + 0x115)
  135. #define DVIDM_PRINTFRAME (FCIDM_SHVIEWFIRST + 0x116)
  136. #define DVIDM_NEWMESSAGE (FCIDM_SHVIEWFIRST + 0x117)
  137. #define DVIDM_SEARCHBAR (FCIDM_SHVIEWFIRST + 0x118)
  138. #define DVIDM_SEND (FCIDM_SHVIEWFIRST + 0x119)
  139. #define DVIDM_SENDPAGE (FCIDM_SHVIEWFIRST + 0x11A)
  140. #define DVIDM_SENDSHORTCUT (FCIDM_SHVIEWFIRST + 0x11B)
  141. #define DVIDM_DESKTOPSHORTCUT (FCIDM_SHVIEWFIRST + 0x11C)
  142. #define DVIDM_SENDTO (FCIDM_SHVIEWFIRST + 0x140)
  143. #define DVIDM_SENDTOFIRST (FCIDM_SHVIEWFIRST + 0x141)
  144. #define DVIDM_SENDTOLAST (FCIDM_SHVIEWFIRST + 0x14f)
  145. #define DVIDM_HELPABOUT (FCIDM_SHVIEWFIRST + 0x150)
  146. #define DVIDM_HELPSEARCH (FCIDM_SHVIEWFIRST + 0x151)
  147. #define DVIDM_HELPTUTORIAL (FCIDM_SHVIEWFIRST + 0x152)
  148. #define DVIDM_HELPREPAIR (FCIDM_SHVIEWFIRST + 0x153)
  149. #define DVIDM_HELPMSWEB (FCIDM_SHVIEWFIRST + 0x154)
  150. #define DVIDM_HELPMSWEBLAST (FCIDM_SHVIEWFIRST + 0x16f)
  151. #define DVIDM_SHOWTOOLS (FCIDM_SHVIEWFIRST + 0x170)
  152. #define DVIDM_MAILNEWS (FCIDM_SHVIEWFIRST + 0x171)
  153. #define DVIDM_FONTS (FCIDM_SHVIEWFIRST + 0x172)
  154. #define DVIDM_EDITPAGE (FCIDM_SHVIEWFIRST + 0x173)
  155. #define DVIDM_DISCUSSIONS (FCIDM_SHVIEWFIRST + 0x174)
  156. #define DVIDM_ENCODING (FCIDM_SHVIEWFIRST + 0x175)
  157. #define DVIDM_IMPORTEXPORT (FCIDM_SHVIEWFIRST + 0x176)
  158. #define DVIDM_SUITE_APP_FIRST (FCIDM_SHVIEWFIRST + 0x180)
  159. #define DVIDM_NEW (DVIDM_SUITE_APP_FIRST + 0x002)
  160. #define DVIDM_NEWPOST (DVIDM_SUITE_APP_FIRST + 0x003)
  161. #define DVIDM_NEWAPPOINTMENT (DVIDM_SUITE_APP_FIRST + 0x004)
  162. #define DVIDM_NEWMEETING (DVIDM_SUITE_APP_FIRST + 0x005)
  163. #define DVIDM_NEWCONTACT (DVIDM_SUITE_APP_FIRST + 0x006)
  164. #define DVIDM_NEWTASK (DVIDM_SUITE_APP_FIRST + 0x007)
  165. #define DVIDM_NEWTASKREQUEST (DVIDM_SUITE_APP_FIRST + 0x008)
  166. #define DVIDM_NEWJOURNAL (DVIDM_SUITE_APP_FIRST + 0x009)
  167. #define DVIDM_NEWNOTE (DVIDM_SUITE_APP_FIRST + 0x00a)
  168. #define DVIDM_CALL (DVIDM_SUITE_APP_FIRST + 0x00b)
  169. #define DVIDM_SUITE_APP_LAST (DVIDM_SUITE_APP_FIRST + 0x020)
  170. #define DVIDM_NONSUITE_APP_FIRST (FCIDM_SHVIEWFIRST + 0x1B0)
  171. #define DVIDM_NONSUITE_APP_LAST (DVIDM_NONSUITE_APP_FIRST + 0x20)
  172. // large block must be reserved for pre-merged menu
  173. #define DVIDM_MSHTML_FIRST (FCIDM_SHVIEWFIRST + 0x0400)
  174. #define DVIDM_MSHTML_LAST (FCIDM_SHVIEWFIRST + 0x1fff)
  175. // Reserve a Block for Tools Menu Extensions
  176. #define DVIDM_MENUEXT_FIRST (DVIDM_MSHTML_LAST + 1)
  177. #define DVIDM_MENUEXT_LAST (DVIDM_MENUEXT_FIRST + 0x200)
  178. #define IDS_HELP_FIRST 0x4000
  179. #define IDS_HELP_OF(id) ((id - DVIDM_FIRST)+IDS_HELP_FIRST)
  180. #define IDS_HELP_OPEN IDS_HELP_OF(DVIDM_OPEN )
  181. #define IDS_HELP_SAVE IDS_HELP_OF(DVIDM_SAVE )
  182. #define IDS_HELP_SAVEASFILE IDS_HELP_OF(DVIDM_SAVEASFILE )
  183. #define IDS_HELP_PAGESETUP IDS_HELP_OF(DVIDM_PAGESETUP )
  184. #define IDS_HELP_PRINT IDS_HELP_OF(DVIDM_PRINT )
  185. #define IDS_HELP_PROPERTIES IDS_HELP_OF(DVIDM_PROPERTIES )
  186. #define IDS_HELP_CUT IDS_HELP_OF(DVIDM_CUT )
  187. #define IDS_HELP_COPY IDS_HELP_OF(DVIDM_COPY )
  188. #define IDS_HELP_PASTE IDS_HELP_OF(DVIDM_PASTE )
  189. #define IDS_HELP_STOPDOWNLOAD IDS_HELP_OF(DVIDM_STOPDOWNLOAD )
  190. #define IDS_HELP_REFRESH IDS_HELP_OF(DVIDM_REFRESH )
  191. #define IDS_HELP_GOHOME IDS_HELP_OF(DVIDM_GOHOME )
  192. #define IDS_HELP_GOSEARCH IDS_HELP_OF(DVIDM_GOSEARCH )
  193. #define IDS_HELP_NEWWINDOW IDS_HELP_OF(DVIDM_NEWWINDOW )
  194. #define IDS_HELP_PRINTPREVIEW IDS_HELP_OF(DVIDM_PRINTPREVIEW )
  195. #define IDS_HELP_PRINTFRAME IDS_HELP_OF(DVIDM_PRINTFRAME )
  196. #define IDS_HELP_NEWMESSAGE IDS_HELP_OF(DVIDM_NEWMESSAGE )
  197. #define IDS_HELP_DHFAVORITES IDS_HELP_OF(DVIDM_DHFAVORITES )
  198. #define IDS_HELP_HELPABOUT IDS_HELP_OF(DVIDM_HELPABOUT )
  199. #define IDS_HELP_HELPSEARCH IDS_HELP_OF(DVIDM_HELPSEARCH )
  200. #define IDS_HELP_HELPTUTORIAL IDS_HELP_OF(DVIDM_HELPTUTORIAL )
  201. #define IDS_HELP_HELPMSWEB IDS_HELP_OF(DVIDM_HELPMSWEB )
  202. #ifndef POSTPOSTSPLIT
  203. #define IDS_HELP_COPYTO IDS_HELP_OF(DVIDM_COPYTO )
  204. #define IDS_HELP_MOVETO IDS_HELP_OF(DVIDM_MOVETO )
  205. #endif
  206. #define IDS_HELP_NEW IDS_HELP_OF(DVIDM_NEW )
  207. #define IDS_HELP_NEWPOST IDS_HELP_OF(DVIDM_NEWPOST )
  208. #define IDS_HELP_NEWAPPOINTMENT IDS_HELP_OF(DVIDM_NEWAPPOINTMENT )
  209. #define IDS_HELP_NEWMEETING IDS_HELP_OF(DVIDM_NEWMEETING )
  210. #define IDS_HELP_NEWCONTACT IDS_HELP_OF(DVIDM_NEWCONTACT )
  211. #define IDS_HELP_NEWTASK IDS_HELP_OF(DVIDM_NEWTASK )
  212. #define IDS_HELP_NEWTASKREQUEST IDS_HELP_OF(DVIDM_NEWTASKREQUEST )
  213. #define IDS_HELP_NEWJOURNAL IDS_HELP_OF(DVIDM_NEWJOURNAL )
  214. #define IDS_HELP_NEWNOTE IDS_HELP_OF(DVIDM_NEWNOTE )
  215. #define IDS_HELP_CALL IDS_HELP_OF(DVIDM_CALL )
  216. #define IDS_HELP_SENDTO IDS_HELP_OF(DVIDM_SENDTO )
  217. #define IDS_HELP_SENDTOFIRST IDS_HELP_OF(DVIDM_SENDTOFIRST )
  218. SHDOCAPI CShellUIHelper_CreateInstance2(IUnknown** ppunk, REFIID riid,
  219. IUnknown *pSite, IDispatch *pExternalDisp);
  220. SHDOCAPI_(IStream*) SHGetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pszName, LPCWSTR pszStreamMRU, LPCWSTR pszStreams);
  221. // these two MUST be in order because we peek them together
  222. #define WMC_PRIVATE_BASE (WM_USER + 0x0300)
  223. #define WMC_RESERVED_FIRST (WMC_PRIVATE_BASE + 0x0000)
  224. #define WMC_RESERVED_LAST (WMC_PRIVATE_BASE + 0x0002)
  225. #define WMC_FAV_CHANGE (WMC_PRIVATE_BASE + 0x0003)
  226. #define WMC_REMOTENAV (WMC_PRIVATE_BASE + 0x0004)
  227. #define WMC_DISPATCH (WMC_PRIVATE_BASE + 0x0005)
  228. #ifndef POSTPOSTSPLIT
  229. #define WMC_GETTHISPTR (WMC_PRIVATE_BASE + 0x0006)
  230. #endif
  231. #define WMC_ACTIVATE (WMC_PRIVATE_BASE + 0x0007)
  232. #define WMC_MARSHALIDISPATCH (WMC_PRIVATE_BASE + 0x0008)
  233. #define WMC_MARSHALIDISPATCHSLOW (WMC_PRIVATE_BASE + 0x0009)
  234. #define WMC_ONREFRESHTIMER (WMC_PRIVATE_BASE + 0x000A)
  235. #define WMC_DELAYEDDDEEXEC (WMC_PRIVATE_BASE + 0x000B)
  236. // WMC_DISPATCH #defines
  237. #define DSID_NAVIGATEIEBROWSER 1
  238. #define DSID_GETLOCATIONURL 2
  239. #define DSID_GETLOCATIONTITLE 3
  240. #define DSID_GETHWND 4
  241. #define DSID_CANCEL 5
  242. #define DSID_EXIT 6
  243. #define DSID_NOACTION 7
  244. //Functions exported by shdocvw and used by browseui
  245. SHDOCAPI_(BOOL) IsIEDefaultBrowser(void);
  246. SHDOCAPI_(void) _DeletePidlDPA(HDPA hdpa);
  247. SHDOCAPI IURLQualify(LPCWSTR pcszURL, DWORD dwFlags,LPWSTR pszTranslatedURL, LPBOOL pbWasSearchURL, LPBOOL pbWasCorrected);
  248. SHDOCAPI_(BOOL) ParseURLFromOutsideSourceA (LPCSTR psz, LPSTR pszOut, LPDWORD pcchOut, LPBOOL pbWasSearchURL);
  249. SHDOCAPI_(BOOL) ParseURLFromOutsideSourceW (LPCWSTR psz, LPWSTR pszOut, LPDWORD pcchOut, LPBOOL pbWasSearchURL);
  250. #ifdef UNICODE
  251. #define ParseURLFromOutsideSource ParseURLFromOutsideSourceW
  252. #else
  253. #define ParseURLFromOutsideSource ParseURLFromOutsideSourceA
  254. #endif
  255. //
  256. // Packages both the url and transaction id into one parameter
  257. // to pass as a message.
  258. //
  259. typedef struct tagDDENAVIGATESTRUCT
  260. {
  261. LPWSTR wszUrl;
  262. long transID;
  263. } DDENAVIGATESTRUCT;
  264. SHDOCAPI WinList_NotifyNewLocation(IShellWindows* psw, long dwRegister, LPCITEMIDLIST pidl);
  265. SHDOCAPI WinList_FindFolderWindow(LPCITEMIDLIST pidl, LPCITEMIDLIST pidlRoot, HWND *phwnd, IWebBrowserApp** ppauto);
  266. SHDOCAPI_(IShellWindows*) WinList_GetShellWindows(BOOL fForceNew);
  267. SHDOCAPI WinList_RegisterPending(DWORD dwThread, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlRoot, long *pdwRegister);
  268. SHDOCAPI WinList_Revoke(long dwRegister);
  269. SHDOCAPI WinList_OnActivate(IShellWindows* psw, long dwRegister, BOOL fActivate, LPCITEMIDLIST pidl);
  270. SHDOCAPI_(BOOL) WinList_Init(void);
  271. SHDOCAPI_(void) WinList_Terminate(void);
  272. SHDOCAPI SHMapNbspToSp(LPCWSTR lpwszIn, LPSTR lpszOut, int cbszOut);
  273. SHDOCAPI_(BOOL) SHIsGlobalOffline(void);
  274. SHDOCAPI_(DWORD) SHRestricted2A(BROWSER_RESTRICTIONS rest, LPCSTR pszUrl, DWORD dwReserved);
  275. SHDOCAPI_(DWORD) SHRestricted2W(BROWSER_RESTRICTIONS rest, LPCWSTR pwzUrl, DWORD dwReserved);
  276. #ifndef _SHELL32_ // shell32 has its own implementation of this function
  277. SHDOCAPI_(BOOL) SHIsRestricted(HWND hwnd, RESTRICTIONS rest);
  278. #endif // _SHELL32_
  279. SHDOCAPI_(BOOL) SHIsRestricted2W(HWND hwnd, BROWSER_RESTRICTIONS rest, LPCWSTR pwzUrl, DWORD dwReserved);
  280. SHDOCAPI_(void) DetectAndFixAssociations();
  281. SHDOCAPI_(void) EnsureWebViewRegSettings();
  282. #ifdef UNICODE
  283. #define UrlHitsNet UrlHitsNetW
  284. #endif
  285. SHDOCAPI_(BOOL) UrlHitsNetW(LPCWSTR pszURL);
  286. #ifdef UNICODE
  287. #define SHRestricted2 SHRestricted2W
  288. #else // UNICODE
  289. #define SHRestricted2 SHRestricted2A
  290. #endif // UNICODE
  291. /// event firing helper functions
  292. //
  293. // FireEvent_XXX functions do a bunch of the work of firing an event.
  294. // punk points to the object that contains the connection point
  295. // that you want to fire the event from. The hwnd parameter is for DDE.
  296. //
  297. SHDOCAPI_(void) FireEvent_BeforeNavigate(IUnknown* punk, HWND hwnd, IWebBrowser2* pwb2,
  298. LPCITEMIDLIST pidl,LPCWSTR pwzLocation,
  299. DWORD dwFlags,LPCWSTR pszFrameName,LPBYTE pPostData,
  300. DWORD cbPostData,LPCWSTR pszHeaders,BOOL * pfCancel);
  301. SHDOCAPI_(void) FireEvent_NavigateError(IUnknown * punk,
  302. IWebBrowser2 * pwb2,
  303. LPCITEMIDLIST pidl,
  304. BSTR bstrTargetFrameName,
  305. DWORD dwStatusCode,
  306. BOOL * pfCancel);
  307. SHDOCAPI_(void) FireEvent_NewWindow(IUnknown* punk, HWND hwnd,
  308. LPCITEMIDLIST pidl,LPWSTR pwzLocation,
  309. DWORD dwFlags,LPWSTR pszFrameName,LPBYTE pPostData,
  310. DWORD cbPostData,LPWSTR pszHeaders,BOOL * pfProcessed);
  311. SHDOCAPI_(void) FireEvent_NewWindow2(IUnknown* punk, IUnknown ** ppunkNewWindow, BOOL* pfCancel);
  312. SHDOCAPI_(void) FireEvent_NavigateComplete(IUnknown* punk, IWebBrowser2* pwb2, LPCITEMIDLIST pidl, HWND hwnd);
  313. SHDOCAPI_(void) FireEvent_DocumentComplete(IUnknown* punk, IWebBrowser2* pwb2, LPCITEMIDLIST pidl);
  314. SHDOCAPI_(void) FireEvent_PrintTemplateEvent(IUnknown* punk, IWebBrowser2* pwb2, DISPID dispidPrintEvent);
  315. SHDOCAPI_(void) FireEvent_UpdatePageStatus(IUnknown* punk, IWebBrowser2* pwb2, DWORD nPage, BOOL fDone);
  316. SHDOCAPI_(void) FireEvent_PrivacyImpactedStateChange(IUnknown* punk, BOOL);
  317. SHDOCAPI_(void) FireEvent_DoInvokeString(IExpDispSupport* peds, DISPID dispid, LPSTR psz);
  318. SHDOCAPI_(void) FireEvent_DoInvokeStringW(IExpDispSupport* peds, DISPID dispid, LPWSTR psz);
  319. SHDOCAPI_(void) FireEvent_DoInvokeDispid(IUnknown* punk, DISPID dispid);
  320. SHDOCAPI_(void) FireEvent_DoInvokeDwords(IExpDispSupport* peds, DISPID dispid,DWORD dw1,DWORD dw2);
  321. SHDOCAPI_(void) FireEvent_DoInvokeBstr(IUnknown* punk, DISPID dispid, BSTR bstr);
  322. SHDOCAPI_(void) FireEvent_Quit(IExpDispSupport* peds);
  323. SHDOCAPI_(void) FireEvent_OnAdornment(IUnknown* punk, DISPID dispid, VARIANT_BOOL f);
  324. SHDOCAPI_(void) FireEvent_FileDownload(IUnknown * punk, BOOL * pfCancel, VARIANT_BOOL bDocObject);
  325. #define IDP_START 0
  326. #define IDP_SEARCH 1
  327. #define IDP_UPDATE 2
  328. #define IDP_CHANNELGUIDE 3
  329. SHDOCAPI SHDGetPageLocation(HWND hwndOwner, UINT idp, LPWSTR pszPath, UINT cchMax, LPITEMIDLIST *ppidlOut);
  330. SHDOCAPI SHGetHistoryPIDL(LPITEMIDLIST *ppidlHistory);
  331. SHDOCAPI_(UINT) SHIEErrorMsgBox(IShellBrowser* psb,
  332. HWND hwndOwner, HRESULT hrError, LPCWSTR szError, LPCWSTR pszURLparam,
  333. UINT idResource, UINT wFlags);
  334. // pszClient values:
  335. #define MAIL_DEF_KEY L"Mail"
  336. #define NEWS_DEF_KEY L"News"
  337. #define CONTACTS_DEF_KEY L"Contacts"
  338. #define CALENDAR_DEF_KEY L"Calendar"
  339. #define TASKS_DEF_KEY L"Task"
  340. #define JOURNAL_DEF_KEY L"Journal"
  341. #define NOTES_DEF_KEY L"Note"
  342. #define CALL_DEF_KEY L"Internet Call"
  343. SHDOCAPI_(BOOL) SHIsRegisteredClient(LPCWSTR pszClient);
  344. // stopgap export for shell32\unicpp\dcomp.cpp
  345. SHDOCAPI NavToUrlUsingIEW(LPCWSTR wszUrl, BOOL fNewWindow);
  346. SHDOCAPI NavToUrlUsingIEA(LPCSTR szUrl, BOOL fNewWindow);
  347. #ifdef UNICODE
  348. #define NavToUrlUsingIE NavToUrlUsingIEW
  349. #else // UNICODE
  350. #define NavToUrlUsingIE NavToUrlUsingIEA
  351. #endif // UNICODE
  352. /// shared icons that browseUI grabs from shdocvw.
  353. // we leave them in shdocvw instead of moving them for back compat.
  354. // folks may have relied upon the icons in the dll for their shortcuts.
  355. // (do we care?)
  356. #define IDI_OFFLINE 105 // 5
  357. #define IDI_STATE_NORMAL 110
  358. #define ICO_TREEUP 204
  359. #define ICO_GLEAM 205
  360. // stopgap export for shell32\unicpp\dcomp.cpp
  361. SHDOCAPI UseDefaultAutoComplete(HWND hwndEdit,
  362. IBrowserService * pbs, IN OPTIONAL
  363. IAutoComplete ** ppac, OUT OPTIONAL
  364. IShellService ** ppssACLISF, OUT OPTIONAL
  365. BOOL fUseCMDMRU);
  366. // stopgap export for shell32\unicpp\dcomp.cpp, deskstat.cpp
  367. #define JITCOCREATEINSTANCE_ORD 209
  368. SHDOCAPI JITCoCreateInstance(
  369. REFCLSID rclsid,
  370. IUnknown *pUnkOuter,
  371. DWORD dwClsContext,
  372. REFIID riid,
  373. LPVOID FAR* ppv,
  374. HWND hwndParent,
  375. DWORD dwJitFlags
  376. );
  377. SHDOCAPI_(void) TLTransferToThreadMemlist(struct ITravelLog *, DWORD);
  378. SHDOCAPI_(BOOL) DoOrganizeFavDlg(HWND hwnd, LPSTR pszInitDir);
  379. SHDOCAPI_(BOOL) DoOrganizeFavDlgW(HWND hwnd, LPWSTR pszInitDir);
  380. #define NAVCANCELLED_URL TEXT("about:NavigationCanceled")
  381. #define OFFLINEINFO_URL TEXT("about:OfflineInformation")
  382. #define FOLDERBROWSINGINFO_URL TEXT("about:FolderBrowsing")
  383. #define SEARCH_SETTINGS_CHANGEDW L"SearchSettingsChanged"
  384. #define SEARCH_SETTINGS_CHANGEDA "SearchSettingsChanged"
  385. #ifdef UNICODE
  386. #define SEARCH_SETTINGS_CHANGED SEARCH_SETTINGS_CHANGEDW
  387. #else
  388. #define SEARCH_SETTINGS_CHANGED SEARCH_SETTINGS_CHANGEDA
  389. #endif
  390. SHDOCAPI_(VARIANT_BOOL) UseCustomInternetSearch();
  391. SHDOCAPI_(BOOL) GetSearchAssistantUrlW(LPWSTR pwszUrl, int cchUrl, BOOL bSubstitute, BOOL bCustomize);
  392. SHDOCAPI_(BOOL) GetDefaultInternetSearchUrlW(LPWSTR pwszUrl, int cchUrl, BOOL bSubstitute);
  393. SHDOCAPI_(BOOL) GetSearchAssistantUrlA(LPSTR pszUrl, int cchUrl, BOOL bSubstitute, BOOL bCustomize);
  394. SHDOCAPI_(BOOL) GetDefaultInternetSearchUrlA(LPSTR pszUrl, int cchUrl, BOOL bSubstitute);
  395. #ifdef UNICODE
  396. #define GetSearchAssistantUrl GetSearchAssistantUrlW
  397. #define GetDefaultInternetSearchUrl GetDefaultInternetSearchUrlW
  398. #else
  399. #define GetSearchAssistantUrl GetSearchAssistantUrlA
  400. #define GetDefaultInternetSearchUrl GetDefaultInternetSearchUrlA
  401. #endif
  402. typedef enum
  403. {
  404. ILS_ADDTOFAV = 0,
  405. ILS_LINK = 1,
  406. ILS_HOME = 2,
  407. ILS_NAVIGATE = 3,
  408. }ILS_ACTION;
  409. SHDOCAPI_(BOOL) IEIsLinkSafe(HWND hwnd, LPCITEMIDLIST pidl, ILS_ACTION ilsFlag);
  410. SHDOCAPI_(BOOL) SHUseClassicToolbarGlyphs (void);
  411. SHDOCAPI_(BOOL) SafeOpenPromptForShellExec(HWND hwnd, PCWSTR pszFile);
  412. #endif // _SHDOCVW_H_