Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

508 lines
24 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_HELPIESEC (FCIDM_SHVIEWFIRST + 0X177)
  159. #define DVIDM_TRUSTEDSITES (FCIDM_SHVIEWFIRST + 0x178)
  160. #define DVIDM_INTRANETSITES (FCIDM_SHVIEWFIRST + 0x179)
  161. #define DVIDM_ADDSITE (FCIDM_SHVIEWFIRST + 0x17a)
  162. #define DVIDM_SUITE_APP_FIRST (FCIDM_SHVIEWFIRST + 0x180)
  163. #define DVIDM_NEW (DVIDM_SUITE_APP_FIRST + 0x002)
  164. #define DVIDM_NEWPOST (DVIDM_SUITE_APP_FIRST + 0x003)
  165. #define DVIDM_NEWAPPOINTMENT (DVIDM_SUITE_APP_FIRST + 0x004)
  166. #define DVIDM_NEWMEETING (DVIDM_SUITE_APP_FIRST + 0x005)
  167. #define DVIDM_NEWCONTACT (DVIDM_SUITE_APP_FIRST + 0x006)
  168. #define DVIDM_NEWTASK (DVIDM_SUITE_APP_FIRST + 0x007)
  169. #define DVIDM_NEWTASKREQUEST (DVIDM_SUITE_APP_FIRST + 0x008)
  170. #define DVIDM_NEWJOURNAL (DVIDM_SUITE_APP_FIRST + 0x009)
  171. #define DVIDM_NEWNOTE (DVIDM_SUITE_APP_FIRST + 0x00a)
  172. #define DVIDM_CALL (DVIDM_SUITE_APP_FIRST + 0x00b)
  173. #define DVIDM_SUITE_APP_LAST (DVIDM_SUITE_APP_FIRST + 0x020)
  174. #define DVIDM_NONSUITE_APP_FIRST (FCIDM_SHVIEWFIRST + 0x1B0)
  175. #define DVIDM_NONSUITE_APP_LAST (DVIDM_NONSUITE_APP_FIRST + 0x20)
  176. // large block must be reserved for pre-merged menu
  177. #define DVIDM_MSHTML_FIRST (FCIDM_SHVIEWFIRST + 0x0400)
  178. #define DVIDM_MSHTML_LAST (FCIDM_SHVIEWFIRST + 0x1fff)
  179. // Reserve a Block for Tools Menu Extensions
  180. #define DVIDM_MENUEXT_FIRST (DVIDM_MSHTML_LAST + 1)
  181. #define DVIDM_MENUEXT_LAST (DVIDM_MENUEXT_FIRST + 0x200)
  182. #define IDS_HELP_FIRST 0x4000
  183. #define IDS_HELP_OF(id) ((id - DVIDM_FIRST)+IDS_HELP_FIRST)
  184. #define IDS_HELP_OPEN IDS_HELP_OF(DVIDM_OPEN )
  185. #define IDS_HELP_SAVE IDS_HELP_OF(DVIDM_SAVE )
  186. #define IDS_HELP_SAVEASFILE IDS_HELP_OF(DVIDM_SAVEASFILE )
  187. #define IDS_HELP_PAGESETUP IDS_HELP_OF(DVIDM_PAGESETUP )
  188. #define IDS_HELP_PRINT IDS_HELP_OF(DVIDM_PRINT )
  189. #define IDS_HELP_PROPERTIES IDS_HELP_OF(DVIDM_PROPERTIES )
  190. #define IDS_HELP_CUT IDS_HELP_OF(DVIDM_CUT )
  191. #define IDS_HELP_COPY IDS_HELP_OF(DVIDM_COPY )
  192. #define IDS_HELP_PASTE IDS_HELP_OF(DVIDM_PASTE )
  193. #define IDS_HELP_STOPDOWNLOAD IDS_HELP_OF(DVIDM_STOPDOWNLOAD )
  194. #define IDS_HELP_REFRESH IDS_HELP_OF(DVIDM_REFRESH )
  195. #define IDS_HELP_GOHOME IDS_HELP_OF(DVIDM_GOHOME )
  196. #define IDS_HELP_GOSEARCH IDS_HELP_OF(DVIDM_GOSEARCH )
  197. #define IDS_HELP_NEWWINDOW IDS_HELP_OF(DVIDM_NEWWINDOW )
  198. #define IDS_HELP_PRINTPREVIEW IDS_HELP_OF(DVIDM_PRINTPREVIEW )
  199. #define IDS_HELP_PRINTFRAME IDS_HELP_OF(DVIDM_PRINTFRAME )
  200. #define IDS_HELP_NEWMESSAGE IDS_HELP_OF(DVIDM_NEWMESSAGE )
  201. #define IDS_HELP_DHFAVORITES IDS_HELP_OF(DVIDM_DHFAVORITES )
  202. #define IDS_HELP_HELPABOUT IDS_HELP_OF(DVIDM_HELPABOUT )
  203. #define IDS_HELP_HELPSEARCH IDS_HELP_OF(DVIDM_HELPSEARCH )
  204. #define IDS_HELP_HELPTUTORIAL IDS_HELP_OF(DVIDM_HELPTUTORIAL )
  205. #define IDS_HELP_HELPMSWEB IDS_HELP_OF(DVIDM_HELPMSWEB )
  206. #ifndef POSTPOSTSPLIT
  207. #define IDS_HELP_COPYTO IDS_HELP_OF(DVIDM_COPYTO )
  208. #define IDS_HELP_MOVETO IDS_HELP_OF(DVIDM_MOVETO )
  209. #endif
  210. #define IDS_HELP_NEW IDS_HELP_OF(DVIDM_NEW )
  211. #define IDS_HELP_NEWPOST IDS_HELP_OF(DVIDM_NEWPOST )
  212. #define IDS_HELP_NEWAPPOINTMENT IDS_HELP_OF(DVIDM_NEWAPPOINTMENT )
  213. #define IDS_HELP_NEWMEETING IDS_HELP_OF(DVIDM_NEWMEETING )
  214. #define IDS_HELP_NEWCONTACT IDS_HELP_OF(DVIDM_NEWCONTACT )
  215. #define IDS_HELP_NEWTASK IDS_HELP_OF(DVIDM_NEWTASK )
  216. #define IDS_HELP_NEWTASKREQUEST IDS_HELP_OF(DVIDM_NEWTASKREQUEST )
  217. #define IDS_HELP_NEWJOURNAL IDS_HELP_OF(DVIDM_NEWJOURNAL )
  218. #define IDS_HELP_NEWNOTE IDS_HELP_OF(DVIDM_NEWNOTE )
  219. #define IDS_HELP_CALL IDS_HELP_OF(DVIDM_CALL )
  220. #define IDS_HELP_SENDTO IDS_HELP_OF(DVIDM_SENDTO )
  221. #define IDS_HELP_SENDTOFIRST IDS_HELP_OF(DVIDM_SENDTOFIRST )
  222. SHDOCAPI CShellUIHelper_CreateInstance2(IUnknown** ppunk, REFIID riid,
  223. IUnknown *pSite, IDispatch *pExternalDisp);
  224. SHDOCAPI_(IStream*) SHGetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pszName, LPCWSTR pszStreamMRU, LPCWSTR pszStreams);
  225. // these two MUST be in order because we peek them together
  226. #define WMC_PRIVATE_BASE (WM_USER + 0x0300)
  227. #define WMC_RESERVED_FIRST (WMC_PRIVATE_BASE + 0x0000)
  228. #define WMC_RESERVED_LAST (WMC_PRIVATE_BASE + 0x0002)
  229. #define WMC_FAV_CHANGE (WMC_PRIVATE_BASE + 0x0003)
  230. #define WMC_REMOTENAV (WMC_PRIVATE_BASE + 0x0004)
  231. #define WMC_DISPATCH (WMC_PRIVATE_BASE + 0x0005)
  232. #ifndef POSTPOSTSPLIT
  233. #define WMC_GETTHISPTR (WMC_PRIVATE_BASE + 0x0006)
  234. #endif
  235. #define WMC_ACTIVATE (WMC_PRIVATE_BASE + 0x0007)
  236. #define WMC_MARSHALIDISPATCH (WMC_PRIVATE_BASE + 0x0008)
  237. #define WMC_MARSHALIDISPATCHSLOW (WMC_PRIVATE_BASE + 0x0009)
  238. #define WMC_ONREFRESHTIMER (WMC_PRIVATE_BASE + 0x000A)
  239. #define WMC_DELAYEDDDEEXEC (WMC_PRIVATE_BASE + 0x000B)
  240. #define WMC_IEHARD_NAVWARNING (WMC_PRIVATE_BASE + 0x000C)
  241. // WMC_DISPATCH #defines
  242. #define DSID_NAVIGATEIEBROWSER 1
  243. #define DSID_GETLOCATIONURL 2
  244. #define DSID_GETLOCATIONTITLE 3
  245. #define DSID_GETHWND 4
  246. #define DSID_CANCEL 5
  247. #define DSID_EXIT 6
  248. #define DSID_NOACTION 7
  249. //Functions exported by shdocvw and used by browseui
  250. SHDOCAPI_(BOOL) IsIEDefaultBrowser(void);
  251. SHDOCAPI_(void) _DeletePidlDPA(HDPA hdpa);
  252. SHDOCAPI IURLQualify(LPCWSTR pcszURL, DWORD dwFlags,LPWSTR pszTranslatedURL, LPBOOL pbWasSearchURL, LPBOOL pbWasCorrected);
  253. SHDOCAPI_(BOOL) ParseURLFromOutsideSourceA (LPCSTR psz, LPSTR pszOut, LPDWORD pcchOut, LPBOOL pbWasSearchURL);
  254. SHDOCAPI_(BOOL) ParseURLFromOutsideSourceW (LPCWSTR psz, LPWSTR pszOut, LPDWORD pcchOut, LPBOOL pbWasSearchURL);
  255. #ifdef UNICODE
  256. #define ParseURLFromOutsideSource ParseURLFromOutsideSourceW
  257. #else
  258. #define ParseURLFromOutsideSource ParseURLFromOutsideSourceA
  259. #endif
  260. //
  261. // Packages both the url and transaction id into one parameter
  262. // to pass as a message.
  263. //
  264. typedef struct tagDDENAVIGATESTRUCT
  265. {
  266. LPWSTR wszUrl;
  267. long transID;
  268. } DDENAVIGATESTRUCT;
  269. SHDOCAPI WinList_NotifyNewLocation(IShellWindows* psw, long dwRegister, LPCITEMIDLIST pidl);
  270. SHDOCAPI WinList_FindFolderWindow(LPCITEMIDLIST pidl, LPCITEMIDLIST pidlRoot, HWND *phwnd, IWebBrowserApp** ppauto);
  271. SHDOCAPI_(IShellWindows*) WinList_GetShellWindows(BOOL fForceNew);
  272. SHDOCAPI WinList_RegisterPending(DWORD dwThread, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlRoot, long *pdwRegister);
  273. SHDOCAPI WinList_Revoke(long dwRegister);
  274. SHDOCAPI WinList_OnActivate(IShellWindows* psw, long dwRegister, BOOL fActivate, LPCITEMIDLIST pidl);
  275. SHDOCAPI_(BOOL) WinList_Init(void);
  276. SHDOCAPI_(void) WinList_Terminate(void);
  277. SHDOCAPI SHMapNbspToSp(LPCWSTR lpwszIn, LPSTR lpszOut, int cbszOut);
  278. SHDOCAPI_(BOOL) SHIsGlobalOffline(void);
  279. SHDOCAPI_(DWORD) SHRestricted2A(BROWSER_RESTRICTIONS rest, LPCSTR pszUrl, DWORD dwReserved);
  280. SHDOCAPI_(DWORD) SHRestricted2W(BROWSER_RESTRICTIONS rest, LPCWSTR pwzUrl, DWORD dwReserved);
  281. #ifndef _SHELL32_ // shell32 has its own implementation of this function
  282. SHDOCAPI_(BOOL) SHIsRestricted(HWND hwnd, RESTRICTIONS rest);
  283. #endif // _SHELL32_
  284. SHDOCAPI_(BOOL) SHIsRestricted2W(HWND hwnd, BROWSER_RESTRICTIONS rest, LPCWSTR pwzUrl, DWORD dwReserved);
  285. SHDOCAPI_(void) DetectAndFixAssociations();
  286. SHDOCAPI_(void) EnsureWebViewRegSettings();
  287. #ifdef UNICODE
  288. #define UrlHitsNet UrlHitsNetW
  289. #endif
  290. SHDOCAPI_(BOOL) UrlHitsNetW(LPCWSTR pszURL);
  291. #ifdef UNICODE
  292. #define SHRestricted2 SHRestricted2W
  293. #else // UNICODE
  294. #define SHRestricted2 SHRestricted2A
  295. #endif // UNICODE
  296. /// event firing helper functions
  297. //
  298. // FireEvent_XXX functions do a bunch of the work of firing an event.
  299. // punk points to the object that contains the connection point
  300. // that you want to fire the event from. The hwnd parameter is for DDE.
  301. //
  302. SHDOCAPI_(void) FireEvent_BeforeNavigate(IUnknown* punk, HWND hwnd, IWebBrowser2* pwb2,
  303. LPCITEMIDLIST pidl,LPCWSTR pwzLocation,
  304. DWORD dwFlags,LPCWSTR pszFrameName,LPBYTE pPostData,
  305. DWORD cbPostData,LPCWSTR pszHeaders,BOOL * pfCancel);
  306. SHDOCAPI_(void) FireEvent_NavigateError(IUnknown * punk,
  307. IWebBrowser2 * pwb2,
  308. LPCITEMIDLIST pidl,
  309. BSTR bstrTargetFrameName,
  310. DWORD dwStatusCode,
  311. BOOL * pfCancel);
  312. SHDOCAPI_(void) FireEvent_NewWindow(IUnknown* punk, HWND hwnd,
  313. LPCITEMIDLIST pidl,LPWSTR pwzLocation,
  314. DWORD dwFlags,LPWSTR pszFrameName,LPBYTE pPostData,
  315. DWORD cbPostData,LPWSTR pszHeaders,BOOL * pfProcessed);
  316. SHDOCAPI_(void) FireEvent_NewWindow2(IUnknown* punk, IUnknown ** ppunkNewWindow, BOOL* pfCancel);
  317. SHDOCAPI_(void) FireEvent_NavigateComplete(IUnknown* punk, IWebBrowser2* pwb2, LPCITEMIDLIST pidl, HWND hwnd);
  318. SHDOCAPI_(void) FireEvent_DocumentComplete(IUnknown* punk, IWebBrowser2* pwb2, LPCITEMIDLIST pidl);
  319. SHDOCAPI_(void) FireEvent_PrintTemplateEvent(IUnknown* punk, IWebBrowser2* pwb2, DISPID dispidPrintEvent);
  320. SHDOCAPI_(void) FireEvent_UpdatePageStatus(IUnknown* punk, IWebBrowser2* pwb2, DWORD nPage, BOOL fDone);
  321. SHDOCAPI_(void) FireEvent_PrivacyImpactedStateChange(IUnknown* punk, BOOL);
  322. SHDOCAPI_(void) FireEvent_DoInvokeString(IExpDispSupport* peds, DISPID dispid, LPSTR psz);
  323. SHDOCAPI_(void) FireEvent_DoInvokeStringW(IExpDispSupport* peds, DISPID dispid, LPWSTR psz);
  324. SHDOCAPI_(void) FireEvent_DoInvokeDispid(IUnknown* punk, DISPID dispid);
  325. SHDOCAPI_(void) FireEvent_DoInvokeDwords(IExpDispSupport* peds, DISPID dispid,DWORD dw1,DWORD dw2);
  326. SHDOCAPI_(void) FireEvent_DoInvokeBstr(IUnknown* punk, DISPID dispid, BSTR bstr);
  327. SHDOCAPI_(void) FireEvent_Quit(IExpDispSupport* peds);
  328. SHDOCAPI_(void) FireEvent_OnAdornment(IUnknown* punk, DISPID dispid, VARIANT_BOOL f);
  329. SHDOCAPI_(void) FireEvent_FileDownload(IUnknown * punk, BOOL * pfCancel, VARIANT_BOOL bDocObject);
  330. #define IDP_START 0
  331. #define IDP_SEARCH 1
  332. #define IDP_UPDATE 2
  333. #define IDP_CHANNELGUIDE 3
  334. SHDOCAPI SHDGetPageLocation(HWND hwndOwner, UINT idp, LPWSTR pszPath, UINT cchMax, LPITEMIDLIST *ppidlOut);
  335. SHDOCAPI SHGetHistoryPIDL(LPITEMIDLIST *ppidlHistory);
  336. SHDOCAPI_(UINT) SHIEErrorMsgBox(IShellBrowser* psb,
  337. HWND hwndOwner, HRESULT hrError, LPCWSTR szError, LPCWSTR pszURLparam,
  338. UINT idResource, UINT wFlags);
  339. // pszClient values:
  340. #define MAIL_DEF_KEY L"Mail"
  341. #define NEWS_DEF_KEY L"News"
  342. #define CONTACTS_DEF_KEY L"Contacts"
  343. #define CALENDAR_DEF_KEY L"Calendar"
  344. #define TASKS_DEF_KEY L"Task"
  345. #define JOURNAL_DEF_KEY L"Journal"
  346. #define NOTES_DEF_KEY L"Note"
  347. #define CALL_DEF_KEY L"Internet Call"
  348. SHDOCAPI_(BOOL) SHIsRegisteredClient(LPCWSTR pszClient);
  349. // stopgap export for shell32\unicpp\dcomp.cpp
  350. SHDOCAPI NavToUrlUsingIEW(LPCWSTR wszUrl, BOOL fNewWindow);
  351. SHDOCAPI NavToUrlUsingIEA(LPCSTR szUrl, BOOL fNewWindow);
  352. #ifdef UNICODE
  353. #define NavToUrlUsingIE NavToUrlUsingIEW
  354. #else // UNICODE
  355. #define NavToUrlUsingIE NavToUrlUsingIEA
  356. #endif // UNICODE
  357. /// shared icons that browseUI grabs from shdocvw.
  358. // we leave them in shdocvw instead of moving them for back compat.
  359. // folks may have relied upon the icons in the dll for their shortcuts.
  360. // (do we care?)
  361. #define IDI_OFFLINE 105 // 5
  362. #define IDI_STATE_NORMAL 110
  363. #define ICO_TREEUP 204
  364. #define ICO_GLEAM 205
  365. // stopgap export for shell32\unicpp\dcomp.cpp
  366. SHDOCAPI UseDefaultAutoComplete(HWND hwndEdit,
  367. IBrowserService * pbs, IN OPTIONAL
  368. IAutoComplete ** ppac, OUT OPTIONAL
  369. IShellService ** ppssACLISF, OUT OPTIONAL
  370. BOOL fUseCMDMRU);
  371. // stopgap export for shell32\unicpp\dcomp.cpp, deskstat.cpp
  372. #define JITCOCREATEINSTANCE_ORD 209
  373. SHDOCAPI JITCoCreateInstance(
  374. REFCLSID rclsid,
  375. IUnknown *pUnkOuter,
  376. DWORD dwClsContext,
  377. REFIID riid,
  378. LPVOID FAR* ppv,
  379. HWND hwndParent,
  380. DWORD dwJitFlags
  381. );
  382. SHDOCAPI_(void) TLTransferToThreadMemlist(struct ITravelLog *, DWORD);
  383. SHDOCAPI_(BOOL) DoOrganizeFavDlg(HWND hwnd, LPSTR pszInitDir);
  384. SHDOCAPI_(BOOL) DoOrganizeFavDlgW(HWND hwnd, LPWSTR pszInitDir);
  385. #define NAVCANCELLED_URL TEXT("about:NavigationCanceled")
  386. #define OFFLINEINFO_URL TEXT("about:OfflineInformation")
  387. #define FOLDERBROWSINGINFO_URL TEXT("about:FolderBrowsing")
  388. #define SEARCH_SETTINGS_CHANGEDW L"SearchSettingsChanged"
  389. #define SEARCH_SETTINGS_CHANGEDA "SearchSettingsChanged"
  390. #ifdef UNICODE
  391. #define SEARCH_SETTINGS_CHANGED SEARCH_SETTINGS_CHANGEDW
  392. #else
  393. #define SEARCH_SETTINGS_CHANGED SEARCH_SETTINGS_CHANGEDA
  394. #endif
  395. SHDOCAPI_(VARIANT_BOOL) UseCustomInternetSearch();
  396. SHDOCAPI_(BOOL) GetSearchAssistantUrlW(LPWSTR pwszUrl, int cchUrl, BOOL bSubstitute, BOOL bCustomize);
  397. SHDOCAPI_(BOOL) GetDefaultInternetSearchUrlW(LPWSTR pwszUrl, int cchUrl, BOOL bSubstitute);
  398. SHDOCAPI_(BOOL) GetSearchAssistantUrlA(LPSTR pszUrl, int cchUrl, BOOL bSubstitute, BOOL bCustomize);
  399. SHDOCAPI_(BOOL) GetDefaultInternetSearchUrlA(LPSTR pszUrl, int cchUrl, BOOL bSubstitute);
  400. #ifdef UNICODE
  401. #define GetSearchAssistantUrl GetSearchAssistantUrlW
  402. #define GetDefaultInternetSearchUrl GetDefaultInternetSearchUrlW
  403. #else
  404. #define GetSearchAssistantUrl GetSearchAssistantUrlA
  405. #define GetDefaultInternetSearchUrl GetDefaultInternetSearchUrlA
  406. #endif
  407. typedef enum
  408. {
  409. ILS_ADDTOFAV = 0,
  410. ILS_LINK = 1,
  411. ILS_HOME = 2,
  412. ILS_NAVIGATE = 3,
  413. }ILS_ACTION;
  414. SHDOCAPI_(BOOL) IEIsLinkSafe(HWND hwnd, LPCITEMIDLIST pidl, ILS_ACTION ilsFlag);
  415. SHDOCAPI_(BOOL) SHUseClassicToolbarGlyphs (void);
  416. SHDOCAPI_(BOOL) SafeOpenPromptForShellExec(HWND hwnd, PCWSTR pszFile);
  417. #endif // _SHDOCVW_H_