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.

2884 lines
112 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1999.
  5. //
  6. // File: urlmon.idl
  7. //
  8. // Contents: async moniker interfaces
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. //
  15. //----------------------------------------------------------------------------
  16. cpp_quote("//=--------------------------------------------------------------------------=")
  17. cpp_quote("// UrlMon.h")
  18. cpp_quote("//=--------------------------------------------------------------------------=")
  19. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.")
  20. cpp_quote("//")
  21. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  22. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  23. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  24. cpp_quote("// PARTICULAR PURPOSE.")
  25. cpp_quote("//=--------------------------------------------------------------------------=")
  26. cpp_quote("")
  27. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  28. cpp_quote("")
  29. cpp_quote("//---------------------------------------------------------------------------=")
  30. cpp_quote("// URL Moniker Interfaces.")
  31. cpp_quote("")
  32. #ifdef UNIX
  33. typedef unsigned long HANDLE_PTR;
  34. #endif /* UNIX */
  35. import "objidl.idl";
  36. import "oleidl.idl";
  37. import "servprov.idl";
  38. import "msxml.idl";
  39. interface IPersistMoniker;
  40. interface IBindProtocol;
  41. interface IBinding;
  42. interface IBindStatusCallback;
  43. interface IBindStatusCallbackMsg;
  44. interface IAuthenticate;
  45. interface IWindowForBindingUI;
  46. interface ICodeInstall;
  47. interface IHttpNegotiate;
  48. interface IHttpNegotiate2;
  49. cpp_quote("// Side-by-Side clsid")
  50. cpp_quote("EXTERN_C const IID CLSID_SBS_StdURLMoniker; ")
  51. cpp_quote("EXTERN_C const IID CLSID_SBS_HttpProtocol; ")
  52. cpp_quote("EXTERN_C const IID CLSID_SBS_FtpProtocol; ")
  53. cpp_quote("EXTERN_C const IID CLSID_SBS_GopherProtocol; ")
  54. cpp_quote("EXTERN_C const IID CLSID_SBS_HttpSProtocol; ")
  55. cpp_quote("EXTERN_C const IID CLSID_SBS_FileProtocol; ")
  56. cpp_quote("EXTERN_C const IID CLSID_SBS_MkProtocol; ")
  57. cpp_quote("EXTERN_C const IID CLSID_SBS_UrlMkBindCtx; ")
  58. cpp_quote("EXTERN_C const IID CLSID_SBS_SoftDistExt; ")
  59. cpp_quote("EXTERN_C const IID CLSID_SBS_StdEncodingFilterFac; ")
  60. cpp_quote("EXTERN_C const IID CLSID_SBS_DeCompMimeFilter; ")
  61. cpp_quote("EXTERN_C const IID CLSID_SBS_CdlProtocol; ")
  62. cpp_quote("EXTERN_C const IID CLSID_SBS_ClassInstallFilter; ")
  63. cpp_quote("EXTERN_C const IID CLSID_SBS_InternetSecurityManager; ")
  64. cpp_quote("EXTERN_C const IID CLSID_SBS_InternetZoneManager; ")
  65. cpp_quote("// END Side-by-Side clsid")
  66. cpp_quote("// These are for backwards compatibility with previous URLMON versions")
  67. cpp_quote("#define BINDF_DONTUSECACHE BINDF_GETNEWESTVERSION")
  68. cpp_quote("#define BINDF_DONTPUTINCACHE BINDF_NOWRITECACHE")
  69. cpp_quote("#define BINDF_NOCOPYDATA BINDF_PULLDATA")
  70. cpp_quote("#define INVALID_P_ROOT_SECURITY_ID ((BYTE*)-1)")
  71. cpp_quote("#define PI_DOCFILECLSIDLOOKUP PI_CLSIDLOOKUP")
  72. cpp_quote("EXTERN_C const IID IID_IAsyncMoniker; ")
  73. cpp_quote("EXTERN_C const IID CLSID_StdURLMoniker; ")
  74. cpp_quote("EXTERN_C const IID CLSID_HttpProtocol; ")
  75. cpp_quote("EXTERN_C const IID CLSID_FtpProtocol; ")
  76. cpp_quote("EXTERN_C const IID CLSID_GopherProtocol; ")
  77. cpp_quote("EXTERN_C const IID CLSID_HttpSProtocol; ")
  78. cpp_quote("EXTERN_C const IID CLSID_FileProtocol; ")
  79. cpp_quote("EXTERN_C const IID CLSID_MkProtocol; ")
  80. cpp_quote("EXTERN_C const IID CLSID_StdURLProtocol; ")
  81. cpp_quote("EXTERN_C const IID CLSID_UrlMkBindCtx; ")
  82. cpp_quote("EXTERN_C const IID CLSID_StdEncodingFilterFac; ")
  83. cpp_quote("EXTERN_C const IID CLSID_DeCompMimeFilter; ")
  84. cpp_quote("EXTERN_C const IID CLSID_CdlProtocol; ")
  85. cpp_quote("EXTERN_C const IID CLSID_ClassInstallFilter; ")
  86. cpp_quote("EXTERN_C const IID IID_IAsyncBindCtx; ")
  87. #pragma midl_echo(" ")
  88. #pragma midl_echo("#define SZ_URLCONTEXT OLESTR(\"URL Context\")")
  89. #pragma midl_echo("#define SZ_ASYNC_CALLEE OLESTR(\"AsyncCallee\")")
  90. #pragma midl_echo("#define MKSYS_URLMONIKER 6 ")
  91. #pragma midl_echo("#define URL_MK_LEGACY 0 ")
  92. #pragma midl_echo("#define URL_MK_UNIFORM 1 ")
  93. #pragma midl_echo("#define URL_MK_NO_CANONICALIZE 2 ")
  94. #pragma midl_echo(" ")
  95. #pragma midl_echo("STDAPI CreateURLMoniker(LPMONIKER pMkCtx, LPCWSTR szURL, LPMONIKER FAR * ppmk); ")
  96. #pragma midl_echo("STDAPI CreateURLMonikerEx(LPMONIKER pMkCtx, LPCWSTR szURL, LPMONIKER FAR * ppmk, DWORD dwFlags); ")
  97. #pragma midl_echo("STDAPI GetClassURL(LPCWSTR szURL, CLSID *pClsID); ")
  98. #pragma midl_echo("STDAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *pBSCb, ")
  99. #pragma midl_echo(" IEnumFORMATETC *pEFetc, IBindCtx **ppBC); ")
  100. #pragma midl_echo("STDAPI CreateAsyncBindCtxEx(IBindCtx *pbc, DWORD dwOptions, IBindStatusCallback *pBSCb, IEnumFORMATETC *pEnum, ")
  101. #pragma midl_echo(" IBindCtx **ppBC, DWORD reserved); ")
  102. #pragma midl_echo("STDAPI MkParseDisplayNameEx(IBindCtx *pbc, LPCWSTR szDisplayName, ULONG *pchEaten, ")
  103. #pragma midl_echo(" LPMONIKER *ppmk); ")
  104. #pragma midl_echo("STDAPI RegisterBindStatusCallback(LPBC pBC, IBindStatusCallback *pBSCb, ")
  105. #pragma midl_echo(" IBindStatusCallback** ppBSCBPrev, DWORD dwReserved); ")
  106. #pragma midl_echo("STDAPI RevokeBindStatusCallback(LPBC pBC, IBindStatusCallback *pBSCb); ")
  107. #pragma midl_echo("STDAPI GetClassFileOrMime(LPBC pBC, LPCWSTR szFilename, LPVOID pBuffer, DWORD cbSize, LPCWSTR szMime, DWORD dwReserved, CLSID *pclsid); ")
  108. #pragma midl_echo("STDAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved); ")
  109. #pragma midl_echo("STDAPI CoGetClassObjectFromURL( REFCLSID rCLASSID,")
  110. #pragma midl_echo(" LPCWSTR szCODE, DWORD dwFileVersionMS, ")
  111. #pragma midl_echo(" DWORD dwFileVersionLS, LPCWSTR szTYPE,")
  112. #pragma midl_echo(" LPBINDCTX pBindCtx, DWORD dwClsContext,")
  113. #pragma midl_echo(" LPVOID pvReserved, REFIID riid, LPVOID * ppv);")
  114. #pragma midl_echo("STDAPI FaultInIEFeature( HWND hWnd,")
  115. #pragma midl_echo(" uCLSSPEC *pClassSpec,")
  116. #pragma midl_echo(" QUERYCONTEXT *pQuery, DWORD dwFlags); ")
  117. #pragma midl_echo("STDAPI GetComponentIDFromCLSSPEC(uCLSSPEC *pClassspec,")
  118. #pragma midl_echo(" LPSTR * ppszComponentID); ")
  119. #pragma midl_echo("// flags for FaultInIEFeature")
  120. #pragma midl_echo("#define FIEF_FLAG_FORCE_JITUI 0x1 // force JIT ui even if")
  121. #pragma midl_echo(" // previoulsy rejected by ")
  122. #pragma midl_echo(" // user in this session or")
  123. #pragma midl_echo(" // marked as Never Ask Again")
  124. #pragma midl_echo("#define FIEF_FLAG_PEEK 0x2 // just peek, don't faultin")
  125. #pragma midl_echo("#define FIEF_FLAG_SKIP_INSTALLED_VERSION_CHECK 0x4 // force JIT without checking local version")
  126. #pragma midl_echo(" ")
  127. #pragma midl_echo("//helper apis ")
  128. #pragma midl_echo("STDAPI IsAsyncMoniker(IMoniker* pmk); ")
  129. #pragma midl_echo("STDAPI CreateURLBinding(LPCWSTR lpszUrl, IBindCtx *pbc, IBinding **ppBdg); ")
  130. #pragma midl_echo(" ")
  131. #pragma midl_echo("STDAPI RegisterMediaTypes(UINT ctypes, const LPCSTR* rgszTypes, CLIPFORMAT* rgcfTypes); ")
  132. #pragma midl_echo("STDAPI FindMediaType(LPCSTR rgszTypes, CLIPFORMAT* rgcfTypes); ")
  133. #pragma midl_echo("STDAPI CreateFormatEnumerator( UINT cfmtetc, FORMATETC* rgfmtetc, IEnumFORMATETC** ppenumfmtetc); ")
  134. #pragma midl_echo("STDAPI RegisterFormatEnumerator(LPBC pBC, IEnumFORMATETC *pEFetc, DWORD reserved); ")
  135. #pragma midl_echo("STDAPI RevokeFormatEnumerator(LPBC pBC, IEnumFORMATETC *pEFetc); ")
  136. #pragma midl_echo("STDAPI RegisterMediaTypeClass(LPBC pBC,UINT ctypes, const LPCSTR* rgszTypes, CLSID *rgclsID, DWORD reserved); ")
  137. #pragma midl_echo("STDAPI FindMediaTypeClass(LPBC pBC, LPCSTR szType, CLSID *pclsID, DWORD reserved); ")
  138. #pragma midl_echo("STDAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, DWORD dwReserved); ")
  139. #pragma midl_echo("STDAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, DWORD *pdwBufferLength, DWORD dwReserved); ")
  140. #pragma midl_echo("STDAPI FindMimeFromData( ")
  141. #pragma midl_echo(" LPBC pBC, // bind context - can be NULL ")
  142. #pragma midl_echo(" LPCWSTR pwzUrl, // url - can be null ")
  143. #pragma midl_echo(" LPVOID pBuffer, // buffer with data to sniff - can be null (pwzUrl must be valid) ")
  144. #pragma midl_echo(" DWORD cbSize, // size of buffer ")
  145. #pragma midl_echo(" LPCWSTR pwzMimeProposed, // proposed mime if - can be null ")
  146. #pragma midl_echo(" DWORD dwMimeFlags, // will be defined ")
  147. #pragma midl_echo(" LPWSTR *ppwzMimeOut, // the suggested mime ")
  148. #pragma midl_echo(" DWORD dwReserved); // must be 0 ")
  149. #pragma midl_echo("#define FMFD_DEFAULT 0x00000000 ")
  150. #pragma midl_echo("#define FMFD_URLASFILENAME 0x00000001 ")
  151. #pragma midl_echo("STDAPI ObtainUserAgentString(DWORD dwOption, LPSTR pszUAOut, DWORD* cbSize); ")
  152. #pragma midl_echo("STDAPI CompareSecurityIds(BYTE* pbSecurityId1, DWORD dwLen1, BYTE* pbSecurityId2, DWORD dwLen2, DWORD dwReserved); ")
  153. #pragma midl_echo(" ")
  154. #pragma midl_echo("// URLMON-specific defines for UrlMkSetSessionOption() above")
  155. #pragma midl_echo("#define URLMON_OPTION_USERAGENT 0x10000001")
  156. #pragma midl_echo("#define URLMON_OPTION_USERAGENT_REFRESH 0x10000002")
  157. #pragma midl_echo("#define URLMON_OPTION_URL_ENCODING 0x10000004")
  158. #pragma midl_echo(" ")
  159. #pragma midl_echo("#define CF_NULL 0 ")
  160. #pragma midl_echo("#define CFSTR_MIME_NULL NULL ")
  161. // 7 bit MIME Types
  162. #pragma midl_echo("#define CFSTR_MIME_TEXT (TEXT(\"text/plain\")) ")
  163. #pragma midl_echo("#define CFSTR_MIME_RICHTEXT (TEXT(\"text/richtext\")) ")
  164. #pragma midl_echo("#define CFSTR_MIME_X_BITMAP (TEXT(\"image/x-xbitmap\")) ")
  165. #pragma midl_echo("#define CFSTR_MIME_POSTSCRIPT (TEXT(\"application/postscript\")) ")
  166. // 8 bit MIME Types
  167. #pragma midl_echo("#define CFSTR_MIME_AIFF (TEXT(\"audio/aiff\")) ")
  168. #pragma midl_echo("#define CFSTR_MIME_BASICAUDIO (TEXT(\"audio/basic\")) ")
  169. #pragma midl_echo("#define CFSTR_MIME_WAV (TEXT(\"audio/wav\")) ")
  170. #pragma midl_echo("#define CFSTR_MIME_X_WAV (TEXT(\"audio/x-wav\")) ")
  171. #pragma midl_echo("#define CFSTR_MIME_GIF (TEXT(\"image/gif\")) ")
  172. #pragma midl_echo("#define CFSTR_MIME_PJPEG (TEXT(\"image/pjpeg\")) ")
  173. #pragma midl_echo("#define CFSTR_MIME_JPEG (TEXT(\"image/jpeg\")) ")
  174. #pragma midl_echo("#define CFSTR_MIME_TIFF (TEXT(\"image/tiff\")) ")
  175. #pragma midl_echo("#define CFSTR_MIME_X_PNG (TEXT(\"image/x-png\")) ")
  176. #pragma midl_echo("#define CFSTR_MIME_BMP (TEXT(\"image/bmp\")) ")
  177. #pragma midl_echo("#define CFSTR_MIME_X_ART (TEXT(\"image/x-jg\")) ")
  178. #pragma midl_echo("#define CFSTR_MIME_X_EMF (TEXT(\"image/x-emf\")) ")
  179. #pragma midl_echo("#define CFSTR_MIME_X_WMF (TEXT(\"image/x-wmf\")) ")
  180. #pragma midl_echo("#define CFSTR_MIME_AVI (TEXT(\"video/avi\")) ")
  181. #pragma midl_echo("#define CFSTR_MIME_MPEG (TEXT(\"video/mpeg\")) ")
  182. #pragma midl_echo("#define CFSTR_MIME_FRACTALS (TEXT(\"application/fractals\")) ")
  183. #pragma midl_echo("#define CFSTR_MIME_RAWDATA (TEXT(\"application/octet-stream\"))")
  184. #pragma midl_echo("#define CFSTR_MIME_RAWDATASTRM (TEXT(\"application/octet-stream\"))")
  185. #pragma midl_echo("#define CFSTR_MIME_PDF (TEXT(\"application/pdf\")) ")
  186. #pragma midl_echo("#define CFSTR_MIME_HTA (TEXT(\"application/hta\")) ")
  187. #pragma midl_echo("#define CFSTR_MIME_X_AIFF (TEXT(\"audio/x-aiff\")) ")
  188. #pragma midl_echo("#define CFSTR_MIME_X_REALAUDIO (TEXT(\"audio/x-pn-realaudio\")) ")
  189. #pragma midl_echo("#define CFSTR_MIME_XBM (TEXT(\"image/xbm\")) ")
  190. #pragma midl_echo("#define CFSTR_MIME_QUICKTIME (TEXT(\"video/quicktime\")) ")
  191. #pragma midl_echo("#define CFSTR_MIME_X_MSVIDEO (TEXT(\"video/x-msvideo\")) ")
  192. #pragma midl_echo("#define CFSTR_MIME_X_SGI_MOVIE (TEXT(\"video/x-sgi-movie\")) ")
  193. // 7 or 8 bit MIME Types
  194. #pragma midl_echo("#define CFSTR_MIME_HTML (TEXT(\"text/html\")) ")
  195. #pragma midl_echo("#define CFSTR_MIME_XML (TEXT(\"text/xml\")) ")
  196. #pragma midl_echo(" ")
  197. cpp_quote("// MessageId: MK_S_ASYNCHRONOUS ")
  198. cpp_quote("// MessageText: Operation is successful, but will complete asynchronously. ")
  199. cpp_quote("// ")
  200. cpp_quote("#define MK_S_ASYNCHRONOUS _HRESULT_TYPEDEF_(0x000401E8L) ")
  201. cpp_quote("#ifndef S_ASYNCHRONOUS ")
  202. cpp_quote("#define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS ")
  203. cpp_quote("#endif ")
  204. cpp_quote(" ")
  205. cpp_quote("#ifndef E_PENDING ")
  206. cpp_quote("#define E_PENDING _HRESULT_TYPEDEF_(0x8000000AL) ")
  207. cpp_quote("#endif ")
  208. cpp_quote(" ")
  209. cpp_quote("// ")
  210. cpp_quote("// ")
  211. cpp_quote("// WinINet and protocol specific errors are mapped to one of the following ")
  212. cpp_quote("// error which are returned in IBSC::OnStopBinding ")
  213. cpp_quote("// ")
  214. cpp_quote("// ")
  215. cpp_quote("// Note: FACILITY C is split into ranges of 1k ")
  216. cpp_quote("// C0000 - C03FF INET_E_ (URLMON's original hresult) ")
  217. cpp_quote("// C0400 - C07FF INET_E_CLIENT_xxx ")
  218. cpp_quote("// C0800 - C0BFF INET_E_SERVER_xxx ")
  219. cpp_quote("// C0C00 - C0FFF INET_E_???? ")
  220. cpp_quote("// C1000 - C13FF INET_E_AGENT_xxx (info delivery agents) ")
  221. //
  222. // url could not be parsed
  223. //
  224. cpp_quote("#define INET_E_INVALID_URL _HRESULT_TYPEDEF_(0x800C0002L) ")
  225. //
  226. // InternetOpen failed - no session was established
  227. //
  228. cpp_quote("#define INET_E_NO_SESSION _HRESULT_TYPEDEF_(0x800C0003L) ")
  229. //
  230. // InternetConnect failed - no
  231. //
  232. cpp_quote("#define INET_E_CANNOT_CONNECT _HRESULT_TYPEDEF_(0x800C0004L) ")
  233. //
  234. // the server or proxy was not found
  235. //
  236. cpp_quote("#define INET_E_RESOURCE_NOT_FOUND _HRESULT_TYPEDEF_(0x800C0005L) ")
  237. //
  238. // the actual object was not found - e.g. http: 404
  239. //
  240. cpp_quote("#define INET_E_OBJECT_NOT_FOUND _HRESULT_TYPEDEF_(0x800C0006L) ")
  241. //
  242. // connection was established but data can not be retrieved
  243. // no filename from cache invalid etc.
  244. //
  245. cpp_quote("#define INET_E_DATA_NOT_AVAILABLE _HRESULT_TYPEDEF_(0x800C0007L) ")
  246. //
  247. // generic download failure - connection broke
  248. //
  249. cpp_quote("#define INET_E_DOWNLOAD_FAILURE _HRESULT_TYPEDEF_(0x800C0008L) ")
  250. //
  251. // to access to this object need authentication e.g. http: 401
  252. //
  253. cpp_quote("#define INET_E_AUTHENTICATION_REQUIRED _HRESULT_TYPEDEF_(0x800C0009L) ")
  254. //
  255. // the object is not available of the required type http: 403 no object
  256. //
  257. cpp_quote("#define INET_E_NO_VALID_MEDIA _HRESULT_TYPEDEF_(0x800C000AL) ")
  258. //
  259. // the internet connection timed out
  260. //
  261. cpp_quote("#define INET_E_CONNECTION_TIMEOUT _HRESULT_TYPEDEF_(0x800C000BL) ")
  262. //
  263. // the request was invalid
  264. //
  265. cpp_quote("#define INET_E_INVALID_REQUEST _HRESULT_TYPEDEF_(0x800C000CL) ")
  266. //
  267. // protocol is not know and no plugable protocol is registered
  268. //
  269. cpp_quote("#define INET_E_UNKNOWN_PROTOCOL _HRESULT_TYPEDEF_(0x800C000DL) ")
  270. //
  271. // security problem encountered
  272. //
  273. cpp_quote("#define INET_E_SECURITY_PROBLEM _HRESULT_TYPEDEF_(0x800C000EL) ")
  274. //
  275. // object could not be loaded; IPersistXXX::Load failed
  276. //
  277. cpp_quote("#define INET_E_CANNOT_LOAD_DATA _HRESULT_TYPEDEF_(0x800C000FL) ")
  278. //
  279. // CoCreateInstance failed.
  280. //
  281. cpp_quote("#define INET_E_CANNOT_INSTANTIATE_OBJECT _HRESULT_TYPEDEF_(0x800C0010L) ")
  282. //
  283. // Redirect failed.
  284. //
  285. cpp_quote("#define INET_E_REDIRECT_FAILED _HRESULT_TYPEDEF_(0x800C0014L) ")
  286. //
  287. // Redirect to directory.
  288. //
  289. cpp_quote("#define INET_E_REDIRECT_TO_DIR _HRESULT_TYPEDEF_(0x800C0015L) ")
  290. //
  291. // HResult range returned in OnStopBinding
  292. //
  293. //
  294. // Data can not be locked
  295. //
  296. cpp_quote("#define INET_E_CANNOT_LOCK_REQUEST _HRESULT_TYPEDEF_(0x800C0016L) ")
  297. cpp_quote("#define INET_E_USE_EXTEND_BINDING _HRESULT_TYPEDEF_(0x800C0017L) ")
  298. cpp_quote("#define INET_E_TERMINATED_BIND _HRESULT_TYPEDEF_(0x800C0018L) ")
  299. cpp_quote("#define INET_E_ERROR_FIRST _HRESULT_TYPEDEF_(0x800C0002L) ")
  300. // User declined download of component
  301. cpp_quote("#define INET_E_CODE_DOWNLOAD_DECLINED _HRESULT_TYPEDEF_(0x800C0100L) ")
  302. cpp_quote("#define INET_E_RESULT_DISPATCHED _HRESULT_TYPEDEF_(0x800C0200L) ")
  303. // Exact code download version requested not found
  304. cpp_quote("#define INET_E_CANNOT_REPLACE_SFP_FILE _HRESULT_TYPEDEF_(0x800C0300L) ")
  305. // NOTE: Please update INET_E_ERROR_LAST if you add an error code with a higher number:
  306. cpp_quote("#define INET_E_ERROR_LAST INET_E_CANNOT_REPLACE_SFP_FILE")
  307. //+---------------------------------------------------------------------------
  308. //
  309. // Copyright (C) Microsoft Corporation, 1995-1998.
  310. //
  311. // Contents: IPersistMoniker interface definition
  312. //
  313. //----------------------------------------------------------------------------
  314. cpp_quote("#ifndef _LPPERSISTMONIKER_DEFINED")
  315. cpp_quote("#define _LPPERSISTMONIKER_DEFINED")
  316. [
  317. object,
  318. uuid(79eac9c9-baf9-11ce-8c82-00aa004ba90b),
  319. pointer_default(unique)
  320. ]
  321. interface IPersistMoniker : IUnknown
  322. {
  323. typedef [unique] IPersistMoniker *LPPERSISTMONIKER;
  324. HRESULT GetClassID(
  325. [out] CLSID *pClassID
  326. );
  327. HRESULT IsDirty(void);
  328. HRESULT Load(
  329. [in] BOOL fFullyAvailable,
  330. [in] IMoniker * pimkName,
  331. [in] LPBC pibc,
  332. [in] DWORD grfMode
  333. );
  334. HRESULT Save(
  335. [in] IMoniker * pimkName,
  336. [in] LPBC pbc,
  337. [in] BOOL fRemember);
  338. HRESULT SaveCompleted(
  339. [in] IMoniker * pimkName,
  340. [in] LPBC pibc);
  341. HRESULT GetCurMoniker(
  342. [out] IMoniker ** ppimkName);
  343. }
  344. cpp_quote("#endif")
  345. //+---------------------------------------------------------------------------
  346. //
  347. // Copyright (C) Microsoft Corporation, 1995-1998.
  348. //
  349. // Contents: IMonikerProp interface definition
  350. //
  351. //----------------------------------------------------------------------------
  352. cpp_quote("#ifndef _LPMONIKERPROP_DEFINED")
  353. cpp_quote("#define _LPMONIKERPROP_DEFINED")
  354. [
  355. object,
  356. uuid(a5ca5f7f-1847-4d87-9c5b-918509f7511d),
  357. pointer_default(unique)
  358. ]
  359. interface IMonikerProp : IUnknown
  360. {
  361. typedef [unique] IMonikerProp *LPMONIKERPROP;
  362. typedef enum {
  363. MIMETYPEPROP = 0x00000000,
  364. USE_SRC_URL = 0X00000001
  365. } MONIKERPROPERTY;
  366. HRESULT PutProperty (
  367. [in] MONIKERPROPERTY mkp,
  368. [in] LPCWSTR val
  369. );
  370. }
  371. cpp_quote("#endif")
  372. //+---------------------------------------------------------------------------
  373. //
  374. // Copyright (C) Microsoft Corporation, 1995-1998.
  375. //
  376. // Contents: IBindProtocol interface definition
  377. //
  378. //----------------------------------------------------------------------------
  379. cpp_quote("#ifndef _LPBINDPROTOCOL_DEFINED")
  380. cpp_quote("#define _LPBINDPROTOCOL_DEFINED")
  381. [
  382. local,
  383. object,
  384. uuid(79eac9cd-baf9-11ce-8c82-00aa004ba90b),
  385. pointer_default(unique)
  386. ]
  387. interface IBindProtocol : IUnknown
  388. {
  389. typedef [unique] IBindProtocol *LPBINDPROTOCOL;
  390. HRESULT CreateBinding(
  391. [in] LPCWSTR szUrl,
  392. [in] IBindCtx *pbc,
  393. [out] IBinding ** ppb);
  394. }
  395. cpp_quote("#endif")
  396. //+---------------------------------------------------------------------------
  397. //
  398. // Copyright (C) Microsoft Corporation, 1995-1998.
  399. //
  400. // Contents: IBinding interface definition
  401. //
  402. //----------------------------------------------------------------------------
  403. cpp_quote("#ifndef _LPBINDING_DEFINED")
  404. cpp_quote("#define _LPBINDING_DEFINED")
  405. [
  406. object,
  407. uuid(79eac9c0-baf9-11ce-8c82-00aa004ba90b),
  408. pointer_default(unique)
  409. ]
  410. interface IBinding: IUnknown
  411. {
  412. typedef [unique] IBinding *LPBINDING;
  413. HRESULT Abort();
  414. HRESULT Suspend();
  415. HRESULT Resume();
  416. HRESULT SetPriority(
  417. [in] LONG nPriority);
  418. HRESULT GetPriority(
  419. [out] LONG * pnPriority);
  420. [local]
  421. HRESULT GetBindResult(
  422. [out] CLSID *pclsidProtocol,
  423. [out] DWORD *pdwResult,
  424. [out] LPOLESTR *pszResult,
  425. [in, out] DWORD *pdwReserved);
  426. [call_as(GetBindResult)]
  427. HRESULT RemoteGetBindResult(
  428. [out] CLSID *pclsidProtocol,
  429. [out] DWORD *pdwResult,
  430. [out] LPOLESTR *pszResult,
  431. [in] DWORD dwReserved);
  432. }
  433. cpp_quote("#endif")
  434. //+---------------------------------------------------------------------------
  435. //
  436. // Copyright (C) Microsoft Corporation, 1995-1998.
  437. //
  438. // Contents: IBindStatusCallback interface definition
  439. //
  440. //----------------------------------------------------------------------------
  441. cpp_quote("#ifndef _LPBINDSTATUSCALLBACK_DEFINED")
  442. cpp_quote("#define _LPBINDSTATUSCALLBACK_DEFINED")
  443. [
  444. object,
  445. uuid(79eac9c1-baf9-11ce-8c82-00aa004ba90b),
  446. pointer_default(unique)
  447. ]
  448. interface IBindStatusCallback: IUnknown
  449. {
  450. typedef [unique] IBindStatusCallback *LPBINDSTATUSCALLBACK;
  451. typedef enum
  452. {
  453. BINDVERB_GET = 0x00000000, // default action
  454. BINDVERB_POST = 0x00000001, // post verb
  455. BINDVERB_PUT = 0x00000002, // put verb
  456. BINDVERB_CUSTOM = 0x00000003, // custom verb
  457. } BINDVERB;
  458. typedef enum
  459. {
  460. BINDINFOF_URLENCODESTGMEDDATA = 0x00000001, // url encode the stgmed data
  461. BINDINFOF_URLENCODEDEXTRAINFO = 0x00000002, // url encode the extra info
  462. } BINDINFOF;
  463. // flags that describe the type of transaction that caller wants
  464. typedef enum
  465. {
  466. BINDF_ASYNCHRONOUS = 0x00000001
  467. ,BINDF_ASYNCSTORAGE = 0x00000002
  468. ,BINDF_NOPROGRESSIVERENDERING = 0x00000004
  469. ,BINDF_OFFLINEOPERATION = 0x00000008
  470. ,BINDF_GETNEWESTVERSION = 0x00000010
  471. ,BINDF_NOWRITECACHE = 0x00000020
  472. ,BINDF_NEEDFILE = 0x00000040
  473. ,BINDF_PULLDATA = 0x00000080
  474. ,BINDF_IGNORESECURITYPROBLEM = 0x00000100
  475. ,BINDF_RESYNCHRONIZE = 0x00000200
  476. ,BINDF_HYPERLINK = 0x00000400
  477. ,BINDF_NO_UI = 0x00000800
  478. ,BINDF_SILENTOPERATION = 0x00001000
  479. ,BINDF_PRAGMA_NO_CACHE = 0x00002000
  480. ,BINDF_GETCLASSOBJECT = 0x00004000
  481. ,BINDF_RESERVED_1 = 0x00008000
  482. // bindstatus callback from client is free threaded
  483. ,BINDF_FREE_THREADED = 0x00010000
  484. // client does not need to know excat size of data available
  485. // hence the read goes directly to e.g. socket
  486. ,BINDF_DIRECT_READ = 0x00020000
  487. // is the transaction a forms submit.
  488. ,BINDF_FORMS_SUBMIT = 0x00040000
  489. ,BINDF_GETFROMCACHE_IF_NET_FAIL = 0x00080000
  490. // binding is from UrlMoniker
  491. ,BINDF_FROMURLMON = 0x00100000
  492. ,BINDF_FWD_BACK = 0x00200000
  493. ,BINDF_PREFERDEFAULTHANDLER = 0x00400000
  494. ,BINDF_ENFORCERESTRICTED = 0x00800000
  495. // Note:
  496. // the highest byte 0x??000000 is used internally
  497. // see other documentation
  498. } BINDF;
  499. typedef enum
  500. {
  501. URL_ENCODING_NONE = 0x00000000
  502. ,URL_ENCODING_ENABLE_UTF8 = 0x10000000
  503. ,URL_ENCODING_DISABLE_UTF8 = 0x20000000
  504. } URL_ENCODING;
  505. typedef struct _tagBINDINFO
  506. {
  507. ULONG cbSize;
  508. LPWSTR szExtraInfo; // e.g. string added to the URL string [range byte]
  509. STGMEDIUM stgmedData; // e.g. put or post data
  510. DWORD grfBindInfoF; // e.g. how meddata should be treaded
  511. DWORD dwBindVerb; // e.g. put, post, ...
  512. LPWSTR szCustomVerb; // e.g. custom verb
  513. DWORD cbstgmedData; // size of data in stgmedData
  514. DWORD dwOptions; // additional option
  515. DWORD dwOptionsFlags; // options flags
  516. DWORD dwCodePage; // the code used to convert the url
  517. SECURITY_ATTRIBUTES securityAttributes;
  518. IID iid; // iid of pUnk
  519. IUnknown *pUnk; // pUnk - whatever
  520. DWORD dwReserved; // should be null
  521. } BINDINFO;
  522. typedef struct _REMSECURITY_ATTRIBUTES
  523. {
  524. DWORD nLength;
  525. DWORD lpSecurityDescriptor;
  526. BOOL bInheritHandle;
  527. } REMSECURITY_ATTRIBUTES, *PREMSECURITY_ATTRIBUTES, *LPREMSECURITY_ATTRIBUTES;
  528. typedef struct _tagRemBINDINFO
  529. {
  530. ULONG cbSize;
  531. LPWSTR szExtraInfo; // e.g. string added to the URL string [range byte]
  532. DWORD grfBindInfoF; // e.g. how meddata should be treaded
  533. DWORD dwBindVerb; // e.g. put, post, ...
  534. LPWSTR szCustomVerb; // e.g. custom verb
  535. DWORD cbstgmedData; // size of data in stgmedData
  536. DWORD dwOptions; // additional options
  537. DWORD dwOptionsFlags; // options flags
  538. DWORD dwCodePage; // the code used to convert the url
  539. REMSECURITY_ATTRIBUTES securityAttributes;
  540. IID iid; // iid of pUnk
  541. IUnknown *pUnk; // pUnk - whatever
  542. DWORD dwReserved; // should be null
  543. } RemBINDINFO;
  544. typedef struct tagRemFORMATETC {
  545. DWORD cfFormat;
  546. DWORD ptd;
  547. DWORD dwAspect;
  548. LONG lindex;
  549. DWORD tymed;
  550. } RemFORMATETC, *LPREMFORMATETC;
  551. // Options flag
  552. typedef enum
  553. {
  554. BINDINFO_OPTIONS_WININETFLAG = 0x00010000
  555. ,BINDINFO_OPTIONS_ENABLE_UTF8 = 0x00020000
  556. ,BINDINFO_OPTIONS_DISABLE_UTF8 = 0x00040000
  557. ,BINDINFO_OPTIONS_USE_IE_ENCODING = 0x00080000
  558. ,BINDINFO_OPTIONS_BINDTOOBJECT = 0x00100000
  559. // Note:
  560. // the lowest byte 0xx0000???? is used extended binding
  561. } BINDINFO_OPTIONS;
  562. // Data notification flags
  563. typedef enum
  564. {
  565. BSCF_FIRSTDATANOTIFICATION = 0x00000001
  566. ,BSCF_INTERMEDIATEDATANOTIFICATION = 0x00000002
  567. ,BSCF_LASTDATANOTIFICATION = 0x00000004
  568. ,BSCF_DATAFULLYAVAILABLE = 0x00000008
  569. ,BSCF_AVAILABLEDATASIZEUNKNOWN = 0x00000010
  570. } BSCF;
  571. typedef enum tagBINDSTATUS
  572. {
  573. BINDSTATUS_FINDINGRESOURCE = 1
  574. ,BINDSTATUS_CONNECTING
  575. ,BINDSTATUS_REDIRECTING
  576. ,BINDSTATUS_BEGINDOWNLOADDATA
  577. ,BINDSTATUS_DOWNLOADINGDATA
  578. ,BINDSTATUS_ENDDOWNLOADDATA
  579. ,BINDSTATUS_BEGINDOWNLOADCOMPONENTS
  580. ,BINDSTATUS_INSTALLINGCOMPONENTS
  581. ,BINDSTATUS_ENDDOWNLOADCOMPONENTS
  582. ,BINDSTATUS_USINGCACHEDCOPY
  583. ,BINDSTATUS_SENDINGREQUEST
  584. ,BINDSTATUS_CLASSIDAVAILABLE
  585. ,BINDSTATUS_MIMETYPEAVAILABLE
  586. ,BINDSTATUS_CACHEFILENAMEAVAILABLE
  587. ,BINDSTATUS_BEGINSYNCOPERATION
  588. ,BINDSTATUS_ENDSYNCOPERATION
  589. ,BINDSTATUS_BEGINUPLOADDATA
  590. ,BINDSTATUS_UPLOADINGDATA
  591. ,BINDSTATUS_ENDUPLOADDATA
  592. ,BINDSTATUS_PROTOCOLCLASSID
  593. ,BINDSTATUS_ENCODING
  594. ,BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE
  595. ,BINDSTATUS_CLASSINSTALLLOCATION
  596. ,BINDSTATUS_DECODING
  597. ,BINDSTATUS_LOADINGMIMEHANDLER
  598. ,BINDSTATUS_CONTENTDISPOSITIONATTACH
  599. ,BINDSTATUS_FILTERREPORTMIMETYPE
  600. ,BINDSTATUS_CLSIDCANINSTANTIATE
  601. ,BINDSTATUS_IUNKNOWNAVAILABLE
  602. ,BINDSTATUS_DIRECTBIND
  603. ,BINDSTATUS_RAWMIMETYPE
  604. ,BINDSTATUS_PROXYDETECTING
  605. ,BINDSTATUS_ACCEPTRANGES
  606. ,BINDSTATUS_COOKIE_SENT
  607. ,BINDSTATUS_COMPACT_POLICY_RECEIVED
  608. ,BINDSTATUS_COOKIE_SUPPRESSED
  609. ,BINDSTATUS_COOKIE_STATE_UNKNOWN
  610. ,BINDSTATUS_COOKIE_STATE_ACCEPT
  611. ,BINDSTATUS_COOKIE_STATE_REJECT
  612. ,BINDSTATUS_COOKIE_STATE_PROMPT
  613. ,BINDSTATUS_COOKIE_STATE_LEASH
  614. ,BINDSTATUS_COOKIE_STATE_DOWNGRADE
  615. ,BINDSTATUS_POLICY_HREF
  616. ,BINDSTATUS_P3P_HEADER
  617. ,BINDSTATUS_SESSION_COOKIE_RECEIVED
  618. ,BINDSTATUS_PERSISTENT_COOKIE_RECEIVED
  619. ,BINDSTATUS_SESSION_COOKIES_ALLOWED
  620. } BINDSTATUS;
  621. HRESULT OnStartBinding(
  622. [in] DWORD dwReserved,
  623. [in] IBinding * pib);
  624. HRESULT GetPriority(
  625. [out] LONG * pnPriority);
  626. HRESULT OnLowResource(
  627. [in] DWORD reserved);
  628. HRESULT OnProgress(
  629. [in] ULONG ulProgress,
  630. [in] ULONG ulProgressMax,
  631. [in] ULONG ulStatusCode,
  632. [in] LPCWSTR szStatusText);
  633. HRESULT OnStopBinding(
  634. [in] HRESULT hresult,
  635. [in, unique] LPCWSTR szError
  636. );
  637. [local]
  638. HRESULT GetBindInfo(
  639. [out] DWORD *grfBINDF,
  640. [in, out, unique] BINDINFO * pbindinfo
  641. );
  642. [call_as(GetBindInfo)]
  643. HRESULT RemoteGetBindInfo(
  644. [out] DWORD *grfBINDF,
  645. [in, out, unique] RemBINDINFO * pbindinfo,
  646. [in, out, unique] RemSTGMEDIUM* pstgmed
  647. );
  648. [local]
  649. HRESULT OnDataAvailable(
  650. [in] DWORD grfBSCF,
  651. [in] DWORD dwSize,
  652. [in] FORMATETC* pformatetc,
  653. [in] STGMEDIUM* pstgmed
  654. );
  655. [call_as(OnDataAvailable)]
  656. HRESULT RemoteOnDataAvailable(
  657. [in] DWORD grfBSCF,
  658. [in] DWORD dwSize,
  659. [in] RemFORMATETC *pformatetc,
  660. [in] RemSTGMEDIUM* pstgmed
  661. );
  662. HRESULT OnObjectAvailable(
  663. [in] REFIID riid,
  664. [in, iid_is(riid)] IUnknown* punk
  665. );
  666. }
  667. cpp_quote("#endif")
  668. //+---------------------------------------------------------------------------
  669. //
  670. // Copyright (C) Microsoft Corporation, 1995-1998.
  671. //
  672. // Contents: IAuthenticate interface definition
  673. //
  674. //----------------------------------------------------------------------------
  675. cpp_quote("#ifndef _LPAUTHENTICATION_DEFINED")
  676. cpp_quote("#define _LPAUTHENTICATION_DEFINED")
  677. [
  678. object,
  679. uuid(79eac9d0-baf9-11ce-8c82-00aa004ba90b),
  680. pointer_default(unique)
  681. ]
  682. interface IAuthenticate : IUnknown
  683. {
  684. typedef [unique] IAuthenticate *LPAUTHENTICATION;
  685. HRESULT Authenticate(
  686. [out] HWND* phwnd,
  687. [out] LPWSTR *pszUsername,
  688. [out] LPWSTR *pszPassword
  689. );
  690. }
  691. cpp_quote("#endif")
  692. //+---------------------------------------------------------------------------
  693. //
  694. // Copyright (C) Microsoft Corporation, 1995-1998.
  695. //
  696. // Contents: IHttpNegotiate interface definition
  697. //
  698. //----------------------------------------------------------------------------
  699. cpp_quote("#ifndef _LPHTTPNEGOTIATE_DEFINED")
  700. cpp_quote("#define _LPHTTPNEGOTIATE_DEFINED")
  701. [
  702. object,
  703. uuid(79eac9d2-baf9-11ce-8c82-00aa004ba90b),
  704. pointer_default(unique)
  705. ]
  706. interface IHttpNegotiate : IUnknown
  707. {
  708. typedef [unique] IHttpNegotiate *LPHTTPNEGOTIATE;
  709. HRESULT BeginningTransaction(
  710. [in] LPCWSTR szURL,
  711. [in, unique] LPCWSTR szHeaders,
  712. [in] DWORD dwReserved,
  713. [out] LPWSTR *pszAdditionalHeaders
  714. );
  715. HRESULT OnResponse(
  716. [in] DWORD dwResponseCode,
  717. [in, unique] LPCWSTR szResponseHeaders,
  718. [in, unique] LPCWSTR szRequestHeaders,
  719. [out] LPWSTR *pszAdditionalRequestHeaders
  720. );
  721. }
  722. cpp_quote("#endif")
  723. //+---------------------------------------------------------------------------
  724. //
  725. // Copyright (C) Microsoft Corporation, 1995-1998.
  726. //
  727. // Contents: IHttpNegotiate2 interface definition
  728. //
  729. //----------------------------------------------------------------------------
  730. cpp_quote("#ifndef _LPHTTPNEGOTIATE2_DEFINED")
  731. cpp_quote("#define _LPHTTPNEGOTIATE2_DEFINED")
  732. [
  733. object,
  734. uuid(4F9F9FCB-E0F4-48eb-B7AB-FA2EA9365CB4),
  735. pointer_default(unique)
  736. ]
  737. interface IHttpNegotiate2 : IHttpNegotiate
  738. {
  739. typedef [unique] IHttpNegotiate2 *LPHTTPNEGOTIATE2;
  740. HRESULT GetRootSecurityId
  741. (
  742. [out, size_is(*pcbSecurityId)]
  743. BYTE* pbSecurityId,
  744. [in, out]
  745. DWORD* pcbSecurityId,
  746. [in] DWORD_PTR dwReserved
  747. );
  748. }
  749. cpp_quote("#endif")
  750. //+---------------------------------------------------------------------------
  751. //
  752. // Copyright (C) Microsoft Corporation, 1995-1998.
  753. //
  754. // Contents: IWindowForBindingUI interface definition
  755. //
  756. //----------------------------------------------------------------------------
  757. cpp_quote("#ifndef _LPWINDOWFORBINDINGUI_DEFINED")
  758. cpp_quote("#define _LPWINDOWFORBINDINGUI_DEFINED")
  759. [
  760. local,
  761. object,
  762. uuid(79eac9d5-bafa-11ce-8c82-00aa004ba90b),
  763. pointer_default(unique)
  764. ]
  765. interface IWindowForBindingUI : IUnknown
  766. {
  767. typedef [unique] IWindowForBindingUI *LPWINDOWFORBINDINGUI;
  768. HRESULT GetWindow(
  769. [in] REFGUID rguidReason,
  770. [out] HWND* phwnd);
  771. }
  772. cpp_quote("#endif")
  773. //+---------------------------------------------------------------------------
  774. //
  775. // Copyright (C) Microsoft Corporation, 1995-1998.
  776. //
  777. // Contents: ICodeDownloadClient interface definition
  778. //
  779. //----------------------------------------------------------------------------
  780. cpp_quote("#ifndef _LPCODEINSTALL_DEFINED")
  781. cpp_quote("#define _LPCODEINSTALL_DEFINED")
  782. [
  783. local,
  784. object,
  785. uuid(79eac9d1-baf9-11ce-8c82-00aa004ba90b),
  786. pointer_default(unique)
  787. ]
  788. interface ICodeInstall : IWindowForBindingUI
  789. {
  790. typedef [unique] ICodeInstall *LPCODEINSTALL;
  791. typedef enum {
  792. CIP_DISK_FULL,
  793. CIP_ACCESS_DENIED,
  794. CIP_NEWER_VERSION_EXISTS,
  795. CIP_OLDER_VERSION_EXISTS,
  796. CIP_NAME_CONFLICT,
  797. CIP_TRUST_VERIFICATION_COMPONENT_MISSING,
  798. CIP_EXE_SELF_REGISTERATION_TIMEOUT,
  799. CIP_UNSAFE_TO_ABORT,
  800. CIP_NEED_REBOOT
  801. } CIP_STATUS;
  802. HRESULT OnCodeInstallProblem(
  803. [in] ULONG ulStatusCode, // contingency status
  804. [in, unique] LPCWSTR szDestination, // file that needs to be updated
  805. [in, unique] LPCWSTR szSource, // new version from 'net (a temp file)
  806. [in] DWORD dwReserved
  807. );
  808. }
  809. cpp_quote("#endif")
  810. //+---------------------------------------------------------------------------
  811. //
  812. // Copyright (C) Microsoft Corporation, 1995-1998.
  813. //
  814. // Contents: IWinInetInfo interface definition
  815. //
  816. //----------------------------------------------------------------------------
  817. cpp_quote("#ifndef _LPWININETINFO_DEFINED")
  818. cpp_quote("#define _LPWININETINFO_DEFINED")
  819. [
  820. object,
  821. uuid(79eac9d6-bafa-11ce-8c82-00aa004ba90b),
  822. pointer_default(unique)
  823. ]
  824. interface IWinInetInfo : IUnknown
  825. {
  826. typedef [unique] IWinInetInfo *LPWININETINFO;
  827. [local]
  828. HRESULT QueryOption(
  829. [in] DWORD dwOption,
  830. [in, out, size_is(*pcbBuf)] LPVOID pBuffer,
  831. [in, out] DWORD *pcbBuf);
  832. [call_as(QueryOption)]
  833. HRESULT RemoteQueryOption(
  834. [in] DWORD dwOption,
  835. [in, out, size_is(*pcbBuf)] BYTE *pBuffer,
  836. [in, out] DWORD *pcbBuf);
  837. }
  838. cpp_quote("#endif")
  839. cpp_quote("#define WININETINFO_OPTION_LOCK_HANDLE 65534")
  840. //+---------------------------------------------------------------------------
  841. //
  842. // Copyright (C) Microsoft Corporation, 1995-1998.
  843. //
  844. // Contents: IHttpSecurity interface definition
  845. //
  846. //----------------------------------------------------------------------------
  847. cpp_quote("#ifndef _LPHTTPSECURITY_DEFINED")
  848. cpp_quote("#define _LPHTTPSECURITY_DEFINED")
  849. [
  850. local,
  851. object,
  852. uuid(79eac9d7-bafa-11ce-8c82-00aa004ba90b),
  853. pointer_default(unique)
  854. ]
  855. interface IHttpSecurity : IWindowForBindingUI
  856. {
  857. typedef [unique] IHttpSecurity *LPHTTPSECURITY;
  858. HRESULT OnSecurityProblem(
  859. [in] DWORD dwProblem);
  860. }
  861. cpp_quote("#endif")
  862. //+---------------------------------------------------------------------------
  863. //
  864. // Copyright (C) Microsoft Corporation, 1995-1998.
  865. //
  866. // Contents: IWinInetHttpInfo interface definition
  867. //
  868. //----------------------------------------------------------------------------
  869. cpp_quote("#ifndef _LPWININETHTTPINFO_DEFINED")
  870. cpp_quote("#define _LPWININETHTTPINFO_DEFINED")
  871. [
  872. object,
  873. uuid(79eac9d8-bafa-11ce-8c82-00aa004ba90b),
  874. pointer_default(unique)
  875. ]
  876. interface IWinInetHttpInfo : IWinInetInfo
  877. {
  878. typedef [unique] IWinInetHttpInfo *LPWININETHTTPINFO;
  879. [local]
  880. HRESULT QueryInfo(
  881. [in] DWORD dwOption,
  882. [in, out,size_is(*pcbBuf)] LPVOID pBuffer,
  883. [in, out] DWORD *pcbBuf,
  884. [in, out] DWORD *pdwFlags,
  885. [in, out] DWORD *pdwReserved
  886. );
  887. [call_as(QueryInfo)]
  888. HRESULT RemoteQueryInfo(
  889. [in] DWORD dwOption,
  890. [in,out,size_is(*pcbBuf)] BYTE *pBuffer,
  891. [in, out] DWORD *pcbBuf,
  892. [in, out] DWORD *pdwFlags,
  893. [in, out] DWORD *pdwReserved
  894. );
  895. }
  896. cpp_quote("#endif")
  897. cpp_quote("#define SID_IBindHost IID_IBindHost")
  898. cpp_quote("#define SID_SBindHost IID_IBindHost")
  899. //+---------------------------------------------------------------------------
  900. //
  901. // Copyright (C) Microsoft Corporation, 1995-1998.
  902. //
  903. // Contents: IBindHost definition
  904. //
  905. //---------------------------------------------------------------------------
  906. cpp_quote("#ifndef _LPBINDHOST_DEFINED")
  907. cpp_quote("#define _LPBINDHOST_DEFINED")
  908. cpp_quote("EXTERN_C const GUID SID_BindHost;")
  909. [
  910. object,
  911. uuid(fc4801a1-2ba9-11cf-a229-00aa003d7352),
  912. pointer_default(unique)
  913. ]
  914. interface IBindHost : IUnknown
  915. {
  916. typedef [unique] IBindHost *LPBINDHOST;
  917. HRESULT CreateMoniker(
  918. [in] LPOLESTR szName,
  919. [in] IBindCtx *pBC,
  920. [out] IMoniker** ppmk,
  921. [in] DWORD dwReserved);
  922. [local]
  923. HRESULT MonikerBindToStorage(
  924. [in] IMoniker *pMk,
  925. [in] IBindCtx *pBC,
  926. [in] IBindStatusCallback *pBSC,
  927. [in] REFIID riid,
  928. [out] void **ppvObj);
  929. [call_as(MonikerBindToStorage)]
  930. HRESULT RemoteMonikerBindToStorage(
  931. [in, unique] IMoniker *pMk,
  932. [in, unique] IBindCtx *pBC,
  933. [in, unique] IBindStatusCallback *pBSC,
  934. [in] REFIID riid,
  935. [out, iid_is(riid)] IUnknown **ppvObj);
  936. [local]
  937. HRESULT MonikerBindToObject(
  938. [in] IMoniker *pMk,
  939. [in] IBindCtx *pBC,
  940. [in] IBindStatusCallback *pBSC,
  941. [in] REFIID riid,
  942. [out] void **ppvObj);
  943. [call_as(MonikerBindToObject)]
  944. HRESULT RemoteMonikerBindToObject(
  945. [in, unique] IMoniker *pMk,
  946. [in, unique] IBindCtx *pBC,
  947. [in, unique] IBindStatusCallback *pBSC,
  948. [in] REFIID riid,
  949. [out, iid_is(riid)] IUnknown **ppvObj);
  950. }
  951. cpp_quote("#endif")
  952. // urlhlink stuff
  953. #pragma midl_echo(" ")
  954. cpp_quote("// These are for backwards compatibility with previous URLMON versions")
  955. #pragma midl_echo("// Flags for the UrlDownloadToCacheFile ")
  956. #pragma midl_echo("#define URLOSTRM_USECACHEDCOPY_ONLY 0x1 // Only get from cache ")
  957. #pragma midl_echo("#define URLOSTRM_USECACHEDCOPY 0x2 // Get from cache if available else download ")
  958. #pragma midl_echo("#define URLOSTRM_GETNEWESTVERSION 0x3 // Get new version only. But put it in cache too ")
  959. #pragma midl_echo(" ")
  960. #pragma midl_echo(" ")
  961. #pragma midl_echo("struct IBindStatusCallback; ")
  962. #pragma midl_echo("STDAPI HlinkSimpleNavigateToString( ")
  963. #pragma midl_echo(" /* [in] */ LPCWSTR szTarget, // required - target document - null if local jump w/in doc ")
  964. #pragma midl_echo(" /* [in] */ LPCWSTR szLocation, // optional, for navigation into middle of a doc ")
  965. #pragma midl_echo(" /* [in] */ LPCWSTR szTargetFrameName,// optional, for targeting frame-sets ")
  966. #pragma midl_echo(" /* [in] */ IUnknown *pUnk, // required - we'll search this for other necessary interfaces ")
  967. #pragma midl_echo(" /* [in] */ IBindCtx *pbc, // optional. caller may register an IBSC in this ")
  968. #pragma midl_echo(" /* [in] */ IBindStatusCallback *, ")
  969. #pragma midl_echo(" /* [in] */ DWORD grfHLNF, // flags ")
  970. #pragma midl_echo(" /* [in] */ DWORD dwReserved // for future use, must be NULL ")
  971. #pragma midl_echo("); ")
  972. #pragma midl_echo(" ")
  973. #pragma midl_echo("STDAPI HlinkSimpleNavigateToMoniker( ")
  974. #pragma midl_echo(" /* [in] */ IMoniker *pmkTarget, // required - target document - (may be null ")
  975. #pragma midl_echo(" /* [in] */ LPCWSTR szLocation, // optional, for navigation into middle of a doc ")
  976. #pragma midl_echo(" /* [in] */ LPCWSTR szTargetFrameName,// optional, for targeting frame-sets ")
  977. #pragma midl_echo(" /* [in] */ IUnknown *pUnk, // required - we'll search this for other necessary interfaces ")
  978. #pragma midl_echo(" /* [in] */ IBindCtx *pbc, // optional. caller may register an IBSC in this ")
  979. #pragma midl_echo(" /* [in] */ IBindStatusCallback *, ")
  980. #pragma midl_echo(" /* [in] */ DWORD grfHLNF, // flags ")
  981. #pragma midl_echo(" /* [in] */ DWORD dwReserved // for future use, must be NULL ")
  982. #pragma midl_echo("); ")
  983. //#pragma midl_echo("typedef HRESULT (STDAPICALLTYPE *LPFNUOSCALLBACK)(LPBINDSTATUSCALLBACK); ")
  984. #pragma midl_echo(" ")
  985. #pragma midl_echo("STDAPI URLOpenStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK); ")
  986. #pragma midl_echo("STDAPI URLOpenStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK); ")
  987. #pragma midl_echo("STDAPI URLOpenPullStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK); ")
  988. #pragma midl_echo("STDAPI URLOpenPullStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK); ")
  989. #pragma midl_echo("STDAPI URLDownloadToFileA(LPUNKNOWN,LPCSTR,LPCSTR,DWORD,LPBINDSTATUSCALLBACK); ")
  990. #pragma midl_echo("STDAPI URLDownloadToFileW(LPUNKNOWN,LPCWSTR,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK); ")
  991. #pragma midl_echo("STDAPI URLDownloadToCacheFileA(LPUNKNOWN,LPCSTR,LPTSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK); ")
  992. #pragma midl_echo("STDAPI URLDownloadToCacheFileW(LPUNKNOWN,LPCWSTR,LPWSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK); ")
  993. #pragma midl_echo("STDAPI URLOpenBlockingStreamA(LPUNKNOWN,LPCSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK); ")
  994. #pragma midl_echo("STDAPI URLOpenBlockingStreamW(LPUNKNOWN,LPCWSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK); ")
  995. #pragma midl_echo(" ")
  996. #pragma midl_echo("#ifdef UNICODE ")
  997. #pragma midl_echo("#define URLOpenStream URLOpenStreamW ")
  998. #pragma midl_echo("#define URLOpenPullStream URLOpenPullStreamW ")
  999. #pragma midl_echo("#define URLDownloadToFile URLDownloadToFileW ")
  1000. #pragma midl_echo("#define URLDownloadToCacheFile URLDownloadToCacheFileW ")
  1001. #pragma midl_echo("#define URLOpenBlockingStream URLOpenBlockingStreamW ")
  1002. #pragma midl_echo("#else ")
  1003. #pragma midl_echo("#define URLOpenStream URLOpenStreamA ")
  1004. #pragma midl_echo("#define URLOpenPullStream URLOpenPullStreamA ")
  1005. #pragma midl_echo("#define URLDownloadToFile URLDownloadToFileA ")
  1006. #pragma midl_echo("#define URLDownloadToCacheFile URLDownloadToCacheFileA ")
  1007. #pragma midl_echo("#define URLOpenBlockingStream URLOpenBlockingStreamA ")
  1008. #pragma midl_echo("#endif // !UNICODE ")
  1009. #pragma midl_echo(" ")
  1010. #pragma midl_echo(" ")
  1011. #pragma midl_echo("STDAPI HlinkGoBack(IUnknown *pUnk); ")
  1012. #pragma midl_echo("STDAPI HlinkGoForward(IUnknown *pUnk); ")
  1013. #pragma midl_echo("STDAPI HlinkNavigateString(IUnknown *pUnk, LPCWSTR szTarget); ")
  1014. #pragma midl_echo("STDAPI HlinkNavigateMoniker(IUnknown *pUnk, IMoniker *pmkTarget); ")
  1015. #pragma midl_echo(" ")
  1016. // urlhlink end
  1017. //
  1018. // Some components to not want the new async plugable protocol interfaces (e.g OLE)
  1019. //
  1020. #pragma midl_echo("#ifndef _URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS_ ")
  1021. interface IInternet;
  1022. interface IInternetBindInfo;
  1023. interface IInternetProtocolRoot;
  1024. interface IInternetProtocol;
  1025. interface IInternetProtocolSink;
  1026. interface IInternetProtocolInfo;
  1027. interface IInternetSession;
  1028. interface IInternetProtocolSinkStackable;
  1029. //+---------------------------------------------------------------------------
  1030. //
  1031. // Copyright (C) Microsoft Corporation, 1995-1998.
  1032. //
  1033. // Contents: IInternet interface definition
  1034. //
  1035. //----------------------------------------------------------------------------
  1036. cpp_quote("#ifndef _LPIINTERNET")
  1037. cpp_quote("#define _LPIINTERNET")
  1038. [
  1039. local,
  1040. object,
  1041. uuid(79eac9e0-baf9-11ce-8c82-00aa004ba90b),
  1042. pointer_default(unique)
  1043. ]
  1044. interface IInternet : IUnknown
  1045. {
  1046. typedef [unique] IInternet *LPIINTERNET;
  1047. }
  1048. cpp_quote("#endif")
  1049. //+---------------------------------------------------------------------------
  1050. //
  1051. // Copyright (C) Microsoft Corporation, 1995-1998.
  1052. //
  1053. // Contents: IInternetBindInfo interface definition
  1054. //
  1055. //----------------------------------------------------------------------------
  1056. cpp_quote("#ifndef _LPIINTERNETBINDINFO")
  1057. cpp_quote("#define _LPIINTERNETBINDINFO")
  1058. [
  1059. local,
  1060. object,
  1061. uuid(79eac9e1-baf9-11ce-8c82-00aa004ba90b),
  1062. pointer_default(unique)
  1063. ]
  1064. interface IInternetBindInfo : IUnknown
  1065. {
  1066. typedef [unique] IInternetBindInfo *LPIINTERNETBINDINFO;
  1067. typedef enum tagBINDSTRING
  1068. {
  1069. BINDSTRING_HEADERS = 1
  1070. ,BINDSTRING_ACCEPT_MIMES
  1071. ,BINDSTRING_EXTRA_URL
  1072. ,BINDSTRING_LANGUAGE
  1073. ,BINDSTRING_USERNAME
  1074. ,BINDSTRING_PASSWORD
  1075. ,BINDSTRING_UA_PIXELS
  1076. ,BINDSTRING_UA_COLOR
  1077. ,BINDSTRING_OS
  1078. ,BINDSTRING_USER_AGENT
  1079. ,BINDSTRING_ACCEPT_ENCODINGS
  1080. ,BINDSTRING_POST_COOKIE
  1081. ,BINDSTRING_POST_DATA_MIME
  1082. ,BINDSTRING_URL
  1083. ,BINDSTRING_IID
  1084. ,BINDSTRING_FLAG_BIND_TO_OBJECT
  1085. ,BINDSTRING_PTR_BIND_CONTEXT
  1086. } BINDSTRING;
  1087. HRESULT GetBindInfo(
  1088. [out] DWORD *grfBINDF,
  1089. [in, out, unique] BINDINFO * pbindinfo
  1090. );
  1091. HRESULT GetBindString(
  1092. [in] ULONG ulStringType,
  1093. [in, out] LPOLESTR *ppwzStr,
  1094. [in] ULONG cEl,
  1095. [in, out] ULONG *pcElFetched
  1096. );
  1097. }
  1098. cpp_quote("#endif")
  1099. //+---------------------------------------------------------------------------
  1100. //
  1101. // Copyright (C) Microsoft Corporation, 1995-1998.
  1102. //
  1103. // Contents: IInternetProtocolRoot interface definition
  1104. //
  1105. //----------------------------------------------------------------------------
  1106. cpp_quote("#ifndef _LPIINTERNETPROTOCOLROOT_DEFINED")
  1107. cpp_quote("#define _LPIINTERNETPROTOCOLROOT_DEFINED")
  1108. [
  1109. local,
  1110. object,
  1111. uuid(79eac9e3-baf9-11ce-8c82-00aa004ba90b),
  1112. pointer_default(unique)
  1113. ]
  1114. interface IInternetProtocolRoot : IUnknown
  1115. {
  1116. typedef [unique] IInternetProtocolRoot *LPIINTERNETPROTOCOLROOT;
  1117. typedef enum _tagPI_FLAGS
  1118. {
  1119. PI_PARSE_URL = 0x00000001
  1120. ,PI_FILTER_MODE = 0x00000002
  1121. ,PI_FORCE_ASYNC = 0x00000004
  1122. ,PI_USE_WORKERTHREAD = 0x00000008
  1123. ,PI_MIMEVERIFICATION = 0x00000010
  1124. ,PI_CLSIDLOOKUP = 0x00000020
  1125. ,PI_DATAPROGRESS = 0x00000040
  1126. ,PI_SYNCHRONOUS = 0x00000080
  1127. ,PI_APARTMENTTHREADED = 0x00000100
  1128. ,PI_CLASSINSTALL = 0x00000200
  1129. // new flags to deal with mime handler
  1130. // and to load app directly
  1131. ,PI_PASSONBINDCTX = 0x00002000
  1132. ,PI_NOMIMEHANDLER = 0x00008000
  1133. ,PI_LOADAPPDIRECT = 0x00004000
  1134. // flags used in the protocol data on switch
  1135. ,PD_FORCE_SWITCH = 0x00010000
  1136. ,PI_PREFERDEFAULTHANDLER = 0x00020000
  1137. } PI_FLAGS;
  1138. typedef struct _tagPROTOCOLDATA
  1139. {
  1140. DWORD grfFlags;
  1141. DWORD dwState;
  1142. LPVOID pData;
  1143. ULONG cbData;
  1144. } PROTOCOLDATA;
  1145. typedef struct _tagStartParam
  1146. {
  1147. IID iid;
  1148. IBindCtx *pIBindCtx;
  1149. IUnknown *pItf;
  1150. } StartParam;
  1151. HRESULT Start(
  1152. [in] LPCWSTR szUrl,
  1153. [in] IInternetProtocolSink *pOIProtSink,
  1154. [in] IInternetBindInfo *pOIBindInfo,
  1155. [in] DWORD grfPI,
  1156. [in] HANDLE_PTR dwReserved
  1157. );
  1158. HRESULT Continue(
  1159. [in] PROTOCOLDATA *pProtocolData
  1160. );
  1161. HRESULT Abort(
  1162. [in] HRESULT hrReason,
  1163. [in] DWORD dwOptions
  1164. );
  1165. HRESULT Terminate(
  1166. [in] DWORD dwOptions
  1167. );
  1168. HRESULT Suspend();
  1169. HRESULT Resume();
  1170. }
  1171. cpp_quote("#endif")
  1172. //+---------------------------------------------------------------------------
  1173. //
  1174. // Copyright (C) Microsoft Corporation, 1995-1998.
  1175. //
  1176. // Contents: IInternetProtocol interface definition
  1177. //
  1178. //----------------------------------------------------------------------------
  1179. cpp_quote("#ifndef _LPIINTERNETPROTOCOL_DEFINED")
  1180. cpp_quote("#define _LPIINTERNETPROTOCOL_DEFINED")
  1181. [
  1182. local,
  1183. object,
  1184. uuid(79eac9e4-baf9-11ce-8c82-00aa004ba90b),
  1185. pointer_default(unique)
  1186. ]
  1187. interface IInternetProtocol : IInternetProtocolRoot
  1188. {
  1189. typedef [unique] IInternetProtocol *LPIINTERNETPROTOCOL;
  1190. HRESULT Read(
  1191. [in,out, size_is(cb), length_is(*pcbRead)]
  1192. void *pv,
  1193. [in] ULONG cb,
  1194. [out] ULONG *pcbRead);
  1195. HRESULT Seek(
  1196. [in] LARGE_INTEGER dlibMove,
  1197. [in] DWORD dwOrigin,
  1198. [out] ULARGE_INTEGER *plibNewPosition);
  1199. HRESULT LockRequest(
  1200. [in] DWORD dwOptions
  1201. );
  1202. HRESULT UnlockRequest();
  1203. }
  1204. cpp_quote("#endif")
  1205. //+---------------------------------------------------------------------------
  1206. //
  1207. // Copyright (C) Microsoft Corporation, 1995-1998.
  1208. //
  1209. // Contents: IInternetProtocolSink interface definition
  1210. //
  1211. //----------------------------------------------------------------------------
  1212. cpp_quote("#ifndef _LPIINTERNETPROTOCOLSINK_DEFINED")
  1213. cpp_quote("#define _LPIINTERNETPROTOCOLSINK_DEFINED")
  1214. [
  1215. local,
  1216. object,
  1217. uuid(79eac9e5-baf9-11ce-8c82-00aa004ba90b),
  1218. pointer_default(unique)
  1219. ]
  1220. interface IInternetProtocolSink : IUnknown
  1221. {
  1222. typedef [unique] IInternetProtocolSink *LPIINTERNETPROTOCOLSINK;
  1223. HRESULT Switch(
  1224. [in] PROTOCOLDATA *pProtocolData
  1225. );
  1226. HRESULT ReportProgress(
  1227. [in] ULONG ulStatusCode,
  1228. [in] LPCWSTR szStatusText
  1229. );
  1230. HRESULT ReportData(
  1231. [in] DWORD grfBSCF,
  1232. [in] ULONG ulProgress,
  1233. [in] ULONG ulProgressMax
  1234. );
  1235. HRESULT ReportResult(
  1236. [in] HRESULT hrResult,
  1237. [in] DWORD dwError,
  1238. [in] LPCWSTR szResult
  1239. );
  1240. }
  1241. cpp_quote("#endif")
  1242. //+---------------------------------------------------------------------------
  1243. //
  1244. // Copyright (C) Microsoft Corporation, 1995-1998.
  1245. //
  1246. // Contents: IInternetProtocolSinkStackable interface definition
  1247. //
  1248. //----------------------------------------------------------------------------
  1249. cpp_quote("#ifndef _LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED")
  1250. cpp_quote("#define _LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED")
  1251. [
  1252. local,
  1253. object,
  1254. uuid(79eac9f0-baf9-11ce-8c82-00aa004ba90b),
  1255. pointer_default(unique)
  1256. ]
  1257. interface IInternetProtocolSinkStackable : IUnknown
  1258. {
  1259. typedef [unique] IInternetProtocolSinkStackable *LPIINTERNETPROTOCOLSINKStackable;
  1260. HRESULT SwitchSink(
  1261. [in] IInternetProtocolSink *pOIProtSink
  1262. );
  1263. HRESULT CommitSwitch();
  1264. HRESULT RollbackSwitch();
  1265. }
  1266. cpp_quote("#endif")
  1267. //+---------------------------------------------------------------------------
  1268. //
  1269. // Copyright (C) Microsoft Corporation, 1995 - 1997.
  1270. //
  1271. // Contents: IInternetSession interface definition
  1272. //
  1273. //----------------------------------------------------------------------------
  1274. cpp_quote("#ifndef _LPIINTERNETSESSION_DEFINED")
  1275. cpp_quote("#define _LPIINTERNETSESSION_DEFINED")
  1276. [
  1277. local,
  1278. object,
  1279. uuid(79eac9e7-baf9-11ce-8c82-00aa004ba90b),
  1280. pointer_default(unique)
  1281. ]
  1282. interface IInternetSession : IUnknown
  1283. {
  1284. typedef [unique] IInternetSession *LPIINTERNETSESSION;
  1285. typedef enum _tagOIBDG_FLAGS
  1286. {
  1287. // default is free threaded
  1288. OIBDG_APARTMENTTHREADED = 0x00000100
  1289. ,OIBDG_DATAONLY = 0x00001000
  1290. } OIBDG_FLAGS;
  1291. HRESULT RegisterNameSpace(
  1292. [in] IClassFactory *pCF,
  1293. [in] REFCLSID rclsid,
  1294. [in] LPCWSTR pwzProtocol,
  1295. [in] ULONG cPatterns,
  1296. [in] const LPCWSTR *ppwzPatterns,
  1297. [in] DWORD dwReserved
  1298. );
  1299. HRESULT UnregisterNameSpace(
  1300. [in] IClassFactory *pCF,
  1301. [in] LPCWSTR pszProtocol
  1302. );
  1303. HRESULT RegisterMimeFilter(
  1304. [in] IClassFactory *pCF,
  1305. [in] REFCLSID rclsid,
  1306. [in] LPCWSTR pwzType
  1307. );
  1308. HRESULT UnregisterMimeFilter(
  1309. [in] IClassFactory *pCF,
  1310. [in] LPCWSTR pwzType
  1311. );
  1312. HRESULT CreateBinding(
  1313. [in] LPBC pBC,
  1314. [in] LPCWSTR szUrl,
  1315. [in] IUnknown *pUnkOuter,
  1316. [out, unique] IUnknown **ppUnk,
  1317. [out, unique] IInternetProtocol **ppOInetProt,
  1318. [in] DWORD dwOption
  1319. );
  1320. HRESULT SetSessionOption(
  1321. [in] DWORD dwOption,
  1322. [in] LPVOID pBuffer,
  1323. [in] DWORD dwBufferLength,
  1324. [in] DWORD dwReserved
  1325. );
  1326. HRESULT GetSessionOption(
  1327. [in] DWORD dwOption,
  1328. [in, out] LPVOID pBuffer,
  1329. [in, out] DWORD *pdwBufferLength,
  1330. [in] DWORD dwReserved
  1331. );
  1332. }
  1333. cpp_quote("#endif")
  1334. //+---------------------------------------------------------------------------
  1335. //
  1336. // Copyright (C) Microsoft Corporation, 1995-1998.
  1337. //
  1338. // Contents: IInternetThreadSwitch interface definition
  1339. //
  1340. //----------------------------------------------------------------------------
  1341. cpp_quote("#ifndef _LPIINTERNETTHREADSWITCH_DEFINED")
  1342. cpp_quote("#define _LPIINTERNETTHREADSWITCH_DEFINED")
  1343. [
  1344. local,
  1345. object,
  1346. uuid(79eac9e8-baf9-11ce-8c82-00aa004ba90b),
  1347. pointer_default(unique)
  1348. ]
  1349. interface IInternetThreadSwitch : IUnknown
  1350. {
  1351. typedef [unique] IInternetThreadSwitch *LPIINTERNETTHREADSWITCH;
  1352. HRESULT Prepare();
  1353. HRESULT Continue();
  1354. }
  1355. cpp_quote("#endif")
  1356. //+---------------------------------------------------------------------------
  1357. //
  1358. // Copyright (C) Microsoft Corporation, 1995-1998.
  1359. //
  1360. // Contents: IInternetPriority interface definition
  1361. //
  1362. //----------------------------------------------------------------------------
  1363. cpp_quote("#ifndef _LPIINTERNETPRIORITY_DEFINED")
  1364. cpp_quote("#define _LPIINTERNETPRIORITY_DEFINED")
  1365. [
  1366. local,
  1367. object,
  1368. uuid(79eac9eb-baf9-11ce-8c82-00aa004ba90b),
  1369. pointer_default(unique)
  1370. ]
  1371. interface IInternetPriority : IUnknown
  1372. {
  1373. typedef [unique] IInternetPriority *LPIINTERNETPRIORITY;
  1374. HRESULT SetPriority(
  1375. [in] LONG nPriority
  1376. );
  1377. HRESULT GetPriority(
  1378. [out] LONG * pnPriority
  1379. );
  1380. }
  1381. cpp_quote("#endif")
  1382. //+---------------------------------------------------------------------------
  1383. //
  1384. // Copyright (C) Microsoft Corporation, 1995-1998.
  1385. //
  1386. // Contents: IInternetProtocolInfo interface definition
  1387. //
  1388. //----------------------------------------------------------------------------
  1389. cpp_quote("#ifndef _LPIINTERNETPROTOCOLINFO_DEFINED")
  1390. cpp_quote("#define _LPIINTERNETPROTOCOLINFO_DEFINED")
  1391. [
  1392. local,
  1393. object,
  1394. uuid(79eac9ec-baf9-11ce-8c82-00aa004ba90b),
  1395. pointer_default(unique)
  1396. ]
  1397. interface IInternetProtocolInfo : IUnknown
  1398. {
  1399. typedef [unique] IInternetProtocolInfo *LPIINTERNETPROTOCOLINFO;
  1400. typedef enum _tagPARSEACTION
  1401. {
  1402. PARSE_CANONICALIZE = 1 // compute canonical URL
  1403. ,PARSE_FRIENDLY // get user friendly name from URL
  1404. ,PARSE_SECURITY_URL // get security URL.
  1405. ,PARSE_ROOTDOCUMENT // returns URL of root document for site
  1406. ,PARSE_DOCUMENT // Strips of #anchor
  1407. ,PARSE_ANCHOR // Strips of everything before #anchor
  1408. ,PARSE_ENCODE // encode the url
  1409. ,PARSE_DECODE // decode the url
  1410. ,PARSE_PATH_FROM_URL // get the path if apply
  1411. ,PARSE_URL_FROM_PATH // create a url from the path
  1412. ,PARSE_MIME // return mime of this url
  1413. ,PARSE_SERVER // return server
  1414. ,PARSE_SCHEMA
  1415. ,PARSE_SITE
  1416. ,PARSE_DOMAIN
  1417. ,PARSE_LOCATION
  1418. ,PARSE_SECURITY_DOMAIN // returns the canonical security form of the URL.
  1419. ,PARSE_ESCAPE // encode the url
  1420. ,PARSE_UNESCAPE // decode the url
  1421. } PARSEACTION;
  1422. // Actions for CoInternetGetSecurityURL function.
  1423. typedef enum _tagPSUACTION
  1424. {
  1425. PSU_DEFAULT = 1 // gets security URL and returns its domain.
  1426. ,PSU_SECURITY_URL_ONLY // gets just the security URL
  1427. } PSUACTION;
  1428. //
  1429. // Query options - needs more work on possible options
  1430. //
  1431. typedef enum _tagQUERYOPTION
  1432. {
  1433. QUERY_EXPIRATION_DATE = 1 // the expiration date in form of systemtime
  1434. ,QUERY_TIME_OF_LAST_CHANGE // time of last change in form of systemtime
  1435. ,QUERY_CONTENT_ENCODING // the content concoding schema
  1436. ,QUERY_CONTENT_TYPE // the content type header (mime and charset)
  1437. ,QUERY_REFRESH // the refresh
  1438. ,QUERY_RECOMBINE // combine the page URL with the nearest base if TRUE
  1439. ,QUERY_CAN_NAVIGATE // does the protocol navigate (unlike mailto)
  1440. ,QUERY_USES_NETWORK // will URL hit network
  1441. ,QUERY_IS_CACHED // is data cached locally?
  1442. ,QUERY_IS_INSTALLEDENTRY // Is the entry installed locally (on cdrom)
  1443. ,QUERY_IS_CACHED_OR_MAPPED // is the entry in cache or is it on a mapped drive
  1444. // It may be mapped but may not actually be present
  1445. ,QUERY_USES_CACHE // does the protocol use the internet cache
  1446. ,QUERY_IS_SECURE // is the protocol encrypted
  1447. ,QUERY_IS_SAFE // the protocol serves only trusted (e.g. local resource) content
  1448. } QUERYOPTION;
  1449. //
  1450. // returns:
  1451. // S_OK on success
  1452. // S_FALSE on success but buffer is too small
  1453. // INET_E_DEFAULT_ACTION if action is not know should be handled be default implementation
  1454. //
  1455. HRESULT ParseUrl(
  1456. [in] LPCWSTR pwzUrl,
  1457. [in] PARSEACTION ParseAction,
  1458. [in] DWORD dwParseFlags,
  1459. [out] LPWSTR pwzResult,
  1460. [in] DWORD cchResult,
  1461. [out] DWORD *pcchResult,
  1462. [in] DWORD dwReserved
  1463. );
  1464. //
  1465. // returns:
  1466. // S_OK on success
  1467. // S_FALSE on success but buffer is too small
  1468. // INET_E_DEFAULT_ACTION if action is not know should be handled be default implementation
  1469. //
  1470. HRESULT CombineUrl(
  1471. [in] LPCWSTR pwzBaseUrl,
  1472. [in] LPCWSTR pwzRelativeUrl,
  1473. [in] DWORD dwCombineFlags,
  1474. [out] LPWSTR pwzResult,
  1475. [in] DWORD cchResult,
  1476. [out] DWORD *pcchResult,
  1477. [in] DWORD dwReserved
  1478. );
  1479. //
  1480. // returns:
  1481. // S_OK if equal
  1482. // S_FALSE otherwise
  1483. //
  1484. HRESULT CompareUrl(
  1485. [in] LPCWSTR pwzUrl1,
  1486. [in] LPCWSTR pwzUrl2,
  1487. [in] DWORD dwCompareFlags
  1488. );
  1489. //
  1490. // returns:
  1491. // S_OK on success
  1492. // S_FALSE on success but buffer is too small
  1493. // INET_E_QUERYOPTION_UNKNOWN
  1494. //
  1495. HRESULT QueryInfo(
  1496. [in] LPCWSTR pwzUrl,
  1497. [in] QUERYOPTION OueryOption,
  1498. [in] DWORD dwQueryFlags,
  1499. [in, out,size_is(*pcbBuf)] LPVOID pBuffer,
  1500. [in] DWORD cbBuffer,
  1501. [in, out] DWORD *pcbBuf,
  1502. [in] DWORD dwReserved
  1503. );
  1504. }
  1505. cpp_quote("#endif")
  1506. //
  1507. // compatablility defines
  1508. //
  1509. cpp_quote("#define IOInet IInternet ")
  1510. cpp_quote("#define IOInetBindInfo IInternetBindInfo ")
  1511. cpp_quote("#define IOInetProtocolRoot IInternetProtocolRoot")
  1512. cpp_quote("#define IOInetProtocol IInternetProtocol ")
  1513. cpp_quote("#define IOInetProtocolSink IInternetProtocolSink")
  1514. cpp_quote("#define IOInetProtocolInfo IInternetProtocolInfo")
  1515. cpp_quote("#define IOInetSession IInternetSession ")
  1516. cpp_quote("#define IOInetPriority IInternetPriority ")
  1517. cpp_quote("#define IOInetThreadSwitch IInternetThreadSwitch")
  1518. cpp_quote("#define IOInetProtocolSinkStackable IInternetProtocolSinkStackable")
  1519. cpp_quote("#define LPOINET LPIINTERNET ")
  1520. cpp_quote("#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO ")
  1521. cpp_quote("#define LPOINETBINDINFO LPIINTERNETBINDINFO ")
  1522. cpp_quote("#define LPOINETPROTOCOLROOT LPIINTERNETPROTOCOLROOT ")
  1523. cpp_quote("#define LPOINETPROTOCOL LPIINTERNETPROTOCOL ")
  1524. cpp_quote("#define LPOINETPROTOCOLSINK LPIINTERNETPROTOCOLSINK ")
  1525. cpp_quote("#define LPOINETSESSION LPIINTERNETSESSION ")
  1526. cpp_quote("#define LPOINETTHREADSWITCH LPIINTERNETTHREADSWITCH ")
  1527. cpp_quote("#define LPOINETPRIORITY LPIINTERNETPRIORITY ")
  1528. cpp_quote("#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO ")
  1529. cpp_quote("#define LPOINETPROTOCOLSINKSTACKABLE LPIINTERNETPROTOCOLSINKSTACKABLE ")
  1530. cpp_quote("#define IID_IOInet IID_IInternet ")
  1531. cpp_quote("#define IID_IOInetBindInfo IID_IInternetBindInfo ")
  1532. cpp_quote("#define IID_IOInetProtocolRoot IID_IInternetProtocolRoot")
  1533. cpp_quote("#define IID_IOInetProtocol IID_IInternetProtocol ")
  1534. cpp_quote("#define IID_IOInetProtocolSink IID_IInternetProtocolSink")
  1535. cpp_quote("#define IID_IOInetProtocolInfo IID_IInternetProtocolInfo")
  1536. cpp_quote("#define IID_IOInetSession IID_IInternetSession ")
  1537. cpp_quote("#define IID_IOInetPriority IID_IInternetPriority ")
  1538. cpp_quote("#define IID_IOInetThreadSwitch IID_IInternetThreadSwitch")
  1539. cpp_quote("#define IID_IOInetProtocolSinkStackable IID_IInternetProtocolSinkStackable")
  1540. //
  1541. // OInet helper functions for url parsing
  1542. //
  1543. #pragma midl_echo("STDAPI CoInternetParseUrl( ")
  1544. #pragma midl_echo(" LPCWSTR pwzUrl, ")
  1545. #pragma midl_echo(" PARSEACTION ParseAction, ")
  1546. #pragma midl_echo(" DWORD dwFlags, ")
  1547. #pragma midl_echo(" LPWSTR pszResult, ")
  1548. #pragma midl_echo(" DWORD cchResult, ")
  1549. #pragma midl_echo(" DWORD *pcchResult, ")
  1550. #pragma midl_echo(" DWORD dwReserved ")
  1551. #pragma midl_echo(" ); ")
  1552. #pragma midl_echo("STDAPI CoInternetCombineUrl( ")
  1553. #pragma midl_echo(" LPCWSTR pwzBaseUrl, ")
  1554. #pragma midl_echo(" LPCWSTR pwzRelativeUrl, ")
  1555. #pragma midl_echo(" DWORD dwCombineFlags, ")
  1556. #pragma midl_echo(" LPWSTR pszResult, ")
  1557. #pragma midl_echo(" DWORD cchResult, ")
  1558. #pragma midl_echo(" DWORD *pcchResult, ")
  1559. #pragma midl_echo(" DWORD dwReserved ")
  1560. #pragma midl_echo(" ); ")
  1561. #pragma midl_echo("STDAPI CoInternetCompareUrl( ")
  1562. #pragma midl_echo(" LPCWSTR pwzUrl1, ")
  1563. #pragma midl_echo(" LPCWSTR pwzUrl2, ")
  1564. #pragma midl_echo(" DWORD dwFlags ")
  1565. #pragma midl_echo(" ); ")
  1566. #pragma midl_echo("STDAPI CoInternetGetProtocolFlags( ")
  1567. #pragma midl_echo(" LPCWSTR pwzUrl, ")
  1568. #pragma midl_echo(" DWORD *pdwFlags, ")
  1569. #pragma midl_echo(" DWORD dwReserved ")
  1570. #pragma midl_echo(" ); ")
  1571. #pragma midl_echo("STDAPI CoInternetQueryInfo( ")
  1572. #pragma midl_echo(" LPCWSTR pwzUrl, ")
  1573. #pragma midl_echo(" QUERYOPTION QueryOptions, ")
  1574. #pragma midl_echo(" DWORD dwQueryFlags, ")
  1575. #pragma midl_echo(" LPVOID pvBuffer, ")
  1576. #pragma midl_echo(" DWORD cbBuffer, ")
  1577. #pragma midl_echo(" DWORD *pcbBuffer, ")
  1578. #pragma midl_echo(" DWORD dwReserved ")
  1579. #pragma midl_echo(" ); ")
  1580. #pragma midl_echo("STDAPI CoInternetGetSession( ")
  1581. #pragma midl_echo(" DWORD dwSessionMode, ")
  1582. #pragma midl_echo(" IInternetSession **ppIInternetSession,")
  1583. #pragma midl_echo(" DWORD dwReserved ")
  1584. #pragma midl_echo(" ); ")
  1585. #pragma midl_echo("STDAPI CoInternetGetSecurityUrl( ")
  1586. #pragma midl_echo(" LPCWSTR pwzUrl, ")
  1587. #pragma midl_echo(" LPWSTR *ppwzSecUrl, ")
  1588. #pragma midl_echo(" PSUACTION psuAction, ")
  1589. #pragma midl_echo(" DWORD dwReserved ")
  1590. #pragma midl_echo(" ); ")
  1591. #pragma midl_echo("STDAPI AsyncInstallDistributionUnit( ")
  1592. #pragma midl_echo(" LPCWSTR szDistUnit, ")
  1593. #pragma midl_echo(" LPCWSTR szTYPE, ")
  1594. #pragma midl_echo(" LPCWSTR szExt, ")
  1595. #pragma midl_echo(" DWORD dwFileVersionMS, ")
  1596. #pragma midl_echo(" DWORD dwFileVersionLS, ")
  1597. #pragma midl_echo(" LPCWSTR szURL, ")
  1598. #pragma midl_echo(" IBindCtx *pbc, ")
  1599. #pragma midl_echo(" LPVOID pvReserved, ")
  1600. #pragma midl_echo(" DWORD flags ")
  1601. #pragma midl_echo(" ); ")
  1602. //
  1603. // STGMEDIUMs and BINDINFO helper utils
  1604. //
  1605. #pragma midl_echo(" ")
  1606. #pragma midl_echo("STDAPI CopyStgMedium(const STGMEDIUM * pcstgmedSrc, ")
  1607. #pragma midl_echo(" STGMEDIUM * pstgmedDest); ")
  1608. #pragma midl_echo("STDAPI CopyBindInfo( const BINDINFO * pcbiSrc, ")
  1609. #pragma midl_echo(" BINDINFO * pbiDest ); ")
  1610. #pragma midl_echo("STDAPI_(void) ReleaseBindInfo( BINDINFO * pbindinfo ); ")
  1611. #pragma midl_echo(" ")
  1612. cpp_quote("#define INET_E_USE_DEFAULT_PROTOCOLHANDLER _HRESULT_TYPEDEF_(0x800C0011L) ")
  1613. cpp_quote("#define INET_E_USE_DEFAULT_SETTING _HRESULT_TYPEDEF_(0x800C0012L) ")
  1614. cpp_quote("#define INET_E_DEFAULT_ACTION INET_E_USE_DEFAULT_PROTOCOLHANDLER ")
  1615. cpp_quote("#define INET_E_QUERYOPTION_UNKNOWN _HRESULT_TYPEDEF_(0x800C0013L) ")
  1616. cpp_quote("#define INET_E_REDIRECTING _HRESULT_TYPEDEF_(0x800C0014L) ")
  1617. cpp_quote("#define OInetParseUrl CoInternetParseUrl ")
  1618. cpp_quote("#define OInetCombineUrl CoInternetCombineUrl ")
  1619. cpp_quote("#define OInetCompareUrl CoInternetCompareUrl ")
  1620. cpp_quote("#define OInetQueryInfo CoInternetQueryInfo ")
  1621. cpp_quote("#define OInetGetSession CoInternetGetSession ")
  1622. #pragma midl_echo("#endif // !_URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS_ ")
  1623. cpp_quote("//")
  1624. cpp_quote("// Static Protocol flags")
  1625. cpp_quote("//")
  1626. cpp_quote("#define PROTOCOLFLAG_NO_PICS_CHECK 0x00000001")
  1627. cpp_quote("")
  1628. cpp_quote("// Creates the security manager object. The first argument is the Service provider")
  1629. cpp_quote("// to allow for delegation")
  1630. cpp_quote("STDAPI CoInternetCreateSecurityManager(IServiceProvider *pSP, IInternetSecurityManager **ppSM, DWORD dwReserved);")
  1631. cpp_quote("")
  1632. cpp_quote("STDAPI CoInternetCreateZoneManager(IServiceProvider *pSP, IInternetZoneManager **ppZM, DWORD dwReserved);")
  1633. cpp_quote("")
  1634. cpp_quote("")
  1635. cpp_quote("// Security manager CLSID's")
  1636. cpp_quote("EXTERN_C const IID CLSID_InternetSecurityManager; ")
  1637. cpp_quote("EXTERN_C const IID CLSID_InternetZoneManager; ")
  1638. cpp_quote("// This service is used for delegation support on the Security Manager interface")
  1639. cpp_quote("#define SID_SInternetSecurityManager IID_IInternetSecurityManager")
  1640. cpp_quote("")
  1641. cpp_quote("#define SID_SInternetHostSecurityManager IID_IInternetHostSecurityManager")
  1642. cpp_quote("")
  1643. cpp_quote("#ifndef _LPINTERNETSECURITYMGRSITE_DEFINED")
  1644. cpp_quote("#define _LPINTERNETSECURITYMGRSITE_DEFINED")
  1645. [
  1646. local,
  1647. object,
  1648. uuid(79eac9ed-baf9-11ce-8c82-00aa004ba90b),
  1649. helpstring("IInternetSecurityMgrSite Interface"),
  1650. pointer_default(unique)
  1651. ]
  1652. interface IInternetSecurityMgrSite : IUnknown
  1653. {
  1654. HRESULT GetWindow (
  1655. [out] HWND* phwnd);
  1656. HRESULT EnableModeless (
  1657. [in] BOOL fEnable);
  1658. };
  1659. cpp_quote("#endif")
  1660. cpp_quote("#ifndef _LPINTERNETSECURITYMANANGER_DEFINED")
  1661. cpp_quote("#define _LPINTERNETSECURITYMANANGER_DEFINED")
  1662. [
  1663. uuid(79eac9ee-baf9-11ce-8c82-00aa004ba90b),
  1664. helpstring("IInternetSecurityManager Interface"),
  1665. pointer_default(unique)
  1666. ]
  1667. interface IInternetSecurityManager : IUnknown
  1668. {
  1669. HRESULT SetSecuritySite
  1670. (
  1671. [in,unique] IInternetSecurityMgrSite *pSite
  1672. );
  1673. HRESULT GetSecuritySite
  1674. (
  1675. [out] IInternetSecurityMgrSite **ppSite
  1676. );
  1677. cpp_quote("#define MUTZ_NOSAVEDFILECHECK 0x00000001 // don't check file: for saved file comment")
  1678. cpp_quote("#define MUTZ_ENFORCERESTRICTED 0x00000100 // enforce restricted zone independent of URL")
  1679. HRESULT MapUrlToZone
  1680. (
  1681. [in] LPCWSTR pwszUrl,
  1682. [out] DWORD* pdwZone,
  1683. [in] DWORD dwFlags
  1684. );
  1685. cpp_quote("// MapUrlToZone returns the zone index given a URL")
  1686. cpp_quote("#define MAX_SIZE_SECURITY_ID 512 // bytes")
  1687. HRESULT GetSecurityId
  1688. (
  1689. [in] LPCWSTR pwszUrl,
  1690. [out, size_is(*pcbSecurityId)]
  1691. BYTE* pbSecurityId,
  1692. [in, out]
  1693. DWORD* pcbSecurityId,
  1694. [in] DWORD_PTR dwReserved
  1695. );
  1696. // Flags passed into ProcessUrlAction.
  1697. typedef enum
  1698. {
  1699. PUAF_DEFAULT = 0x00000000,
  1700. PUAF_NOUI = 0x00000001,
  1701. PUAF_ISFILE = 0x00000002, // Assume URL if File, url does not need file://
  1702. PUAF_WARN_IF_DENIED = 0x00000004,
  1703. PUAF_FORCEUI_FOREGROUND = 0x00000008,
  1704. PUAF_CHECK_TIFS = 0x00000010,
  1705. PUAF_DONTCHECKBOXINDIALOG = 0x00000020,
  1706. PUAF_TRUSTED = 0x00000040,
  1707. PUAF_ACCEPT_WILDCARD_SCHEME = 0x00000080,
  1708. PUAF_ENFORCERESTRICTED = 0x00000100,
  1709. } PUAF ;
  1710. HRESULT ProcessUrlAction
  1711. (
  1712. [in] LPCWSTR pwszUrl,
  1713. [in] DWORD dwAction,
  1714. [out, size_is(cbPolicy)]
  1715. BYTE* pPolicy, // output buffer pointer
  1716. [in] DWORD cbPolicy, // output buffer size
  1717. [in] BYTE* pContext, // context (used by the delegation routines)
  1718. [in] DWORD cbContext, // size of the Context
  1719. [in] DWORD dwFlags, // See enum PUAF for details.
  1720. [in] DWORD dwReserved
  1721. );
  1722. cpp_quote("// This is the wrapper function that most clients will use.")
  1723. cpp_quote("// It figures out the current Policy for the passed in Action,")
  1724. cpp_quote("// and puts up UI if the current Policy indicates that the user")
  1725. cpp_quote("// should be queried. It returns back the Policy which the caller")
  1726. cpp_quote("// will use to determine if the action should be allowed")
  1727. HRESULT QueryCustomPolicy
  1728. (
  1729. [in] LPCWSTR pwszUrl,
  1730. [in] REFGUID guidKey,
  1731. [out, size_is(,*pcbPolicy)] // allocation via IMemAlloc; caller frees
  1732. BYTE** ppPolicy, // pointer to output buffer pointer
  1733. [out] DWORD* pcbPolicy, // pointer to output buffer size
  1734. [in] BYTE* pContext, // context (used by the delegation routines)
  1735. [in] DWORD cbContext, // size of the Context
  1736. [in] DWORD dwReserved
  1737. );
  1738. cpp_quote("// This is the wrapper function to conveniently read a custom policy.")
  1739. // create/enumerate mappings
  1740. typedef enum
  1741. {
  1742. SZM_CREATE = 0x00000000, // create new mapping, error's if mapping already exists.
  1743. SZM_DELETE = 0x00000001, // delete the mapping
  1744. }
  1745. SZM_FLAGS;
  1746. HRESULT SetZoneMapping
  1747. (
  1748. [in] DWORD dwZone, // absolute zone index
  1749. [in] LPCWSTR lpszPattern, // URL pattern with limited wildcarding
  1750. [in] DWORD dwFlags // add, change, delete
  1751. );
  1752. cpp_quote("// SetZoneMapping")
  1753. cpp_quote("// lpszPattern: string denoting a URL pattern")
  1754. cpp_quote("// Examples of valid patterns: ")
  1755. cpp_quote("// *://*.msn.com ")
  1756. cpp_quote("// http://*.sony.co.jp ")
  1757. cpp_quote("// *://et.msn.com ")
  1758. cpp_quote("// ftp://157.54.23.41/ ")
  1759. cpp_quote("// https://localsvr ")
  1760. cpp_quote("// file:\\localsvr\share ")
  1761. cpp_quote("// *://157.54.100-200.* ")
  1762. cpp_quote("// Examples of invalid patterns: ")
  1763. cpp_quote("// http://*.lcs.mit.edu ")
  1764. cpp_quote("// ftp://* ")
  1765. cpp_quote("// dwFlags: SZM_FLAGS values ")
  1766. HRESULT GetZoneMappings
  1767. (
  1768. [in] DWORD dwZone, // absolute zone index
  1769. [out] IEnumString **ppenumString, // output buffer size
  1770. [in] DWORD dwFlags // reserved, pass 0
  1771. );
  1772. // Returns an enumerator of strings for the mappings of a zone.
  1773. // dwFlags is for future use; pass in 0.
  1774. };
  1775. cpp_quote("#endif")
  1776. cpp_quote("#ifndef _LPINTERNETHOSTSECURITYMANANGER_DEFINED")
  1777. cpp_quote("#define _LPINTERNETHOSTSECURITYMANANGER_DEFINED")
  1778. cpp_quote("//This is the interface MSHTML exposes to its clients")
  1779. cpp_quote("//The clients need not pass in a URL to these functions")
  1780. cpp_quote("//since MSHTML maintains the notion of the current URL")
  1781. [
  1782. local,
  1783. object,
  1784. uuid(3af280b6-cb3f-11d0-891e-00c04fb6bfc4),
  1785. helpstring("IInternetHostSecurityManager Interface"),
  1786. pointer_default(unique)
  1787. ]
  1788. interface IInternetHostSecurityManager : IUnknown
  1789. {
  1790. HRESULT GetSecurityId
  1791. (
  1792. [out, size_is(*pcbSecurityId)]
  1793. BYTE* pbSecurityId,
  1794. [in, out]
  1795. DWORD* pcbSecurityId,
  1796. [in] DWORD_PTR dwReserved
  1797. );
  1798. HRESULT ProcessUrlAction
  1799. (
  1800. [in] DWORD dwAction,
  1801. [out, size_is(cbPolicy)]
  1802. BYTE* pPolicy, // output buffer pointer
  1803. [in] DWORD cbPolicy, // output buffer size
  1804. [in] BYTE* pContext, // context (used by the delegation routines)
  1805. [in] DWORD cbContext, // size of the Context
  1806. [in] DWORD dwFlags, // See enum PUAF for details.
  1807. [in] DWORD dwReserved
  1808. );
  1809. HRESULT QueryCustomPolicy
  1810. (
  1811. [in] REFGUID guidKey,
  1812. [out, size_is(,*pcbPolicy)] // allocation via IMemAlloc; caller frees
  1813. BYTE** ppPolicy, // pointer to output buffer pointer
  1814. [out] DWORD* pcbPolicy, // pointer to output buffer size
  1815. [in] BYTE* pContext, // context (used by the delegation routines)
  1816. [in] DWORD cbContext, // size of the Context
  1817. [in] DWORD dwReserved
  1818. );
  1819. };
  1820. cpp_quote("#endif")
  1821. cpp_quote("")
  1822. cpp_quote("// The zone manager maintains policies for a set of standard actions. ")
  1823. cpp_quote("// These actions are identified by integral values (called action indexes)")
  1824. cpp_quote("// specified below.")
  1825. cpp_quote("")
  1826. cpp_quote("// Minimum legal value for an action ")
  1827. cpp_quote("#define URLACTION_MIN 0x00001000")
  1828. cpp_quote("")
  1829. cpp_quote("#define URLACTION_DOWNLOAD_MIN 0x00001000")
  1830. cpp_quote("#define URLACTION_DOWNLOAD_SIGNED_ACTIVEX 0x00001001")
  1831. cpp_quote("#define URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX 0x00001004")
  1832. cpp_quote("#define URLACTION_DOWNLOAD_CURR_MAX 0x00001004")
  1833. cpp_quote("#define URLACTION_DOWNLOAD_MAX 0x000011FF")
  1834. cpp_quote("")
  1835. cpp_quote("#define URLACTION_ACTIVEX_MIN 0x00001200")
  1836. cpp_quote("#define URLACTION_ACTIVEX_RUN 0x00001200")
  1837. cpp_quote("#define URLPOLICY_ACTIVEX_CHECK_LIST 0x00010000")
  1838. cpp_quote("#define URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY 0x00001201 // aggregate next four")
  1839. cpp_quote("#define URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY 0x00001202 //")
  1840. cpp_quote("#define URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY 0x00001203 //")
  1841. cpp_quote("#define URLACTION_SCRIPT_OVERRIDE_SAFETY 0x00001401 //")
  1842. cpp_quote("#define URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY 0x00001204 //")
  1843. cpp_quote("#define URLACTION_ACTIVEX_TREATASUNTRUSTED 0x00001205")
  1844. cpp_quote("#define URLACTION_ACTIVEX_NO_WEBOC_SCRIPT 0x00001206")
  1845. cpp_quote("#define URLACTION_ACTIVEX_CURR_MAX 0x00001206")
  1846. cpp_quote("#define URLACTION_ACTIVEX_MAX 0x000013ff")
  1847. cpp_quote("")
  1848. cpp_quote("#define URLACTION_SCRIPT_MIN 0x00001400")
  1849. cpp_quote("#define URLACTION_SCRIPT_RUN 0x00001400")
  1850. cpp_quote("#define URLACTION_SCRIPT_JAVA_USE 0x00001402")
  1851. cpp_quote("#define URLACTION_SCRIPT_SAFE_ACTIVEX 0x00001405")
  1852. cpp_quote("#define URLACTION_CROSS_DOMAIN_DATA 0x00001406")
  1853. cpp_quote("#define URLACTION_SCRIPT_PASTE 0x00001407")
  1854. cpp_quote("#define URLACTION_SCRIPT_CURR_MAX 0x00001407")
  1855. cpp_quote("#define URLACTION_SCRIPT_MAX 0x000015ff")
  1856. cpp_quote("")
  1857. cpp_quote("#define URLACTION_HTML_MIN 0x00001600")
  1858. cpp_quote("#define URLACTION_HTML_SUBMIT_FORMS 0x00001601 // aggregate next two")
  1859. cpp_quote("#define URLACTION_HTML_SUBMIT_FORMS_FROM 0x00001602 //")
  1860. cpp_quote("#define URLACTION_HTML_SUBMIT_FORMS_TO 0x00001603 //")
  1861. cpp_quote("#define URLACTION_HTML_FONT_DOWNLOAD 0x00001604")
  1862. cpp_quote("#define URLACTION_HTML_JAVA_RUN 0x00001605 // derive from Java custom policy")
  1863. cpp_quote("#define URLACTION_HTML_USERDATA_SAVE 0x00001606")
  1864. cpp_quote("#define URLACTION_HTML_SUBFRAME_NAVIGATE 0x00001607")
  1865. cpp_quote("#define URLACTION_HTML_META_REFRESH 0x00001608")
  1866. cpp_quote("#define URLACTION_HTML_MIXED_CONTENT 0x00001609")
  1867. //cpp_quote("#define URLACTION_HTML_CURR_MAX 0x00001609")
  1868. cpp_quote("#define URLACTION_HTML_MAX 0x000017ff")
  1869. cpp_quote("")
  1870. cpp_quote("#define URLACTION_SHELL_MIN 0x00001800")
  1871. cpp_quote("#define URLACTION_SHELL_INSTALL_DTITEMS 0x00001800")
  1872. cpp_quote("#define URLACTION_SHELL_MOVE_OR_COPY 0x00001802")
  1873. cpp_quote("#define URLACTION_SHELL_FILE_DOWNLOAD 0x00001803")
  1874. cpp_quote("#define URLACTION_SHELL_VERB 0x00001804")
  1875. cpp_quote("#define URLACTION_SHELL_WEBVIEW_VERB 0x00001805")
  1876. cpp_quote("#define URLACTION_SHELL_SHELLEXECUTE 0x00001806")
  1877. cpp_quote("#define URLACTION_SHELL_CURR_MAX 0x00001806")
  1878. cpp_quote("#define URLACTION_SHELL_MAX 0x000019ff")
  1879. cpp_quote("")
  1880. cpp_quote("#define URLACTION_NETWORK_MIN 0x00001A00")
  1881. cpp_quote("")
  1882. cpp_quote("#define URLACTION_CREDENTIALS_USE 0x00001A00")
  1883. cpp_quote("#define URLPOLICY_CREDENTIALS_SILENT_LOGON_OK 0x00000000")
  1884. cpp_quote("#define URLPOLICY_CREDENTIALS_MUST_PROMPT_USER 0x00010000")
  1885. cpp_quote("#define URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT 0x00020000")
  1886. cpp_quote("#define URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY 0x00030000")
  1887. cpp_quote("")
  1888. cpp_quote("#define URLACTION_AUTHENTICATE_CLIENT 0x00001A01")
  1889. cpp_quote("#define URLPOLICY_AUTHENTICATE_CLEARTEXT_OK 0x00000000")
  1890. cpp_quote("#define URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE 0x00010000")
  1891. cpp_quote("#define URLPOLICY_AUTHENTICATE_MUTUAL_ONLY 0x00030000")
  1892. cpp_quote("")
  1893. cpp_quote("")
  1894. cpp_quote("#define URLACTION_COOKIES 0x00001A02")
  1895. cpp_quote("#define URLACTION_COOKIES_SESSION 0x00001A03")
  1896. cpp_quote("")
  1897. cpp_quote("#define URLACTION_CLIENT_CERT_PROMPT 0x00001A04")
  1898. cpp_quote("")
  1899. cpp_quote("#define URLACTION_COOKIES_THIRD_PARTY 0x00001A05")
  1900. cpp_quote("#define URLACTION_COOKIES_SESSION_THIRD_PARTY 0x00001A06")
  1901. cpp_quote("")
  1902. cpp_quote("#define URLACTION_COOKIES_ENABLED 0x00001A10")
  1903. cpp_quote("")
  1904. cpp_quote("#define URLACTION_NETWORK_CURR_MAX 0x00001A10")
  1905. cpp_quote("#define URLACTION_NETWORK_MAX 0x00001Bff")
  1906. cpp_quote("")
  1907. cpp_quote("")
  1908. cpp_quote("#define URLACTION_JAVA_MIN 0x00001C00")
  1909. cpp_quote("#define URLACTION_JAVA_PERMISSIONS 0x00001C00")
  1910. cpp_quote("#define URLPOLICY_JAVA_PROHIBIT 0x00000000")
  1911. cpp_quote("#define URLPOLICY_JAVA_HIGH 0x00010000")
  1912. cpp_quote("#define URLPOLICY_JAVA_MEDIUM 0x00020000")
  1913. cpp_quote("#define URLPOLICY_JAVA_LOW 0x00030000")
  1914. cpp_quote("#define URLPOLICY_JAVA_CUSTOM 0x00800000")
  1915. cpp_quote("#define URLACTION_JAVA_CURR_MAX 0x00001C00")
  1916. cpp_quote("#define URLACTION_JAVA_MAX 0x00001Cff")
  1917. cpp_quote("")
  1918. cpp_quote("")
  1919. cpp_quote("// The following Infodelivery actions should have no default policies")
  1920. cpp_quote("// in the registry. They assume that no default policy means fall")
  1921. cpp_quote("// back to the global restriction. If an admin sets a policy per")
  1922. cpp_quote("// zone, then it overrides the global restriction.")
  1923. cpp_quote("")
  1924. cpp_quote("#define URLACTION_INFODELIVERY_MIN 0x00001D00")
  1925. cpp_quote("#define URLACTION_INFODELIVERY_NO_ADDING_CHANNELS 0x00001D00")
  1926. cpp_quote("#define URLACTION_INFODELIVERY_NO_EDITING_CHANNELS 0x00001D01")
  1927. cpp_quote("#define URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS 0x00001D02")
  1928. cpp_quote("#define URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS 0x00001D03")
  1929. cpp_quote("#define URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS 0x00001D04")
  1930. cpp_quote("#define URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS 0x00001D05")
  1931. cpp_quote("#define URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING 0x00001D06")
  1932. cpp_quote("#define URLACTION_INFODELIVERY_CURR_MAX 0x00001D06")
  1933. cpp_quote("#define URLACTION_INFODELIVERY_MAX 0x00001Dff")
  1934. cpp_quote("#define URLACTION_CHANNEL_SOFTDIST_MIN 0x00001E00")
  1935. cpp_quote("#define URLACTION_CHANNEL_SOFTDIST_PERMISSIONS 0x00001E05")
  1936. cpp_quote("#define URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT 0x00010000")
  1937. cpp_quote("#define URLPOLICY_CHANNEL_SOFTDIST_PRECACHE 0x00020000")
  1938. cpp_quote("#define URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL 0x00030000")
  1939. cpp_quote("#define URLACTION_CHANNEL_SOFTDIST_MAX 0x00001Eff")
  1940. cpp_quote("")
  1941. cpp_quote("// For each action specified above the system maintains")
  1942. cpp_quote("// a set of policies for the action. ")
  1943. cpp_quote("// The only policies supported currently are permissions (i.e. is something allowed)")
  1944. cpp_quote("// and logging status. ")
  1945. cpp_quote("// IMPORTANT: If you are defining your own policies don't overload the meaning of the")
  1946. cpp_quote("// loword of the policy. You can use the hiword to store any policy bits which are only")
  1947. cpp_quote("// meaningful to your action.")
  1948. cpp_quote("// For an example of how to do this look at the URLPOLICY_JAVA above")
  1949. cpp_quote("")
  1950. cpp_quote("// Permissions ")
  1951. cpp_quote("#define URLPOLICY_ALLOW 0x00")
  1952. cpp_quote("#define URLPOLICY_QUERY 0x01")
  1953. cpp_quote("#define URLPOLICY_DISALLOW 0x03")
  1954. cpp_quote("")
  1955. cpp_quote("// Notifications are not done when user already queried.") // CUT
  1956. cpp_quote("#define URLPOLICY_NOTIFY_ON_ALLOW 0x10")
  1957. cpp_quote("#define URLPOLICY_NOTIFY_ON_DISALLOW 0x20")
  1958. cpp_quote("")
  1959. cpp_quote("// Logging is done regardless of whether user was queried.") // CUT
  1960. cpp_quote("#define URLPOLICY_LOG_ON_ALLOW 0x40")
  1961. cpp_quote("#define URLPOLICY_LOG_ON_DISALLOW 0x80")
  1962. cpp_quote("")
  1963. cpp_quote("#define URLPOLICY_MASK_PERMISSIONS 0x0f")
  1964. cpp_quote("#define GetUrlPolicyPermissions(dw) (dw & URLPOLICY_MASK_PERMISSIONS)")
  1965. cpp_quote("#define SetUrlPolicyPermissions(dw,dw2) ((dw) = ((dw) & ~(URLPOLICY_MASK_PERMISSIONS)) | (dw2))")
  1966. cpp_quote("")
  1967. cpp_quote("")
  1968. cpp_quote("#define URLPOLICY_DONTCHECKDLGBOX 0x100")
  1969. cpp_quote("// The ordinal #'s that define the predefined zones internet explorer knows about. ")
  1970. cpp_quote("// When we support user-defined zones their zone numbers should be between ")
  1971. cpp_quote("// URLZONE_USER_MIN and URLZONE_USER_MAX")
  1972. //+---------------------------------------------------------------------------
  1973. //
  1974. // Copyright (C) Microsoft Corporation, 1995-1998.
  1975. //
  1976. // Contents: IInternetZoneManager interface definition
  1977. //
  1978. //----------------------------------------------------------------------------
  1979. cpp_quote("#ifndef _LPINTERNETZONEMANAGER_DEFINED")
  1980. cpp_quote("#define _LPINTERNETZONEMANAGER_DEFINED")
  1981. [
  1982. local,
  1983. object,
  1984. uuid(79eac9ef-baf9-11ce-8c82-00aa004ba90b),
  1985. helpstring("IInternetZoneManager Interface"),
  1986. pointer_default(unique)
  1987. ]
  1988. interface IInternetZoneManager : IUnknown
  1989. {
  1990. typedef [unique] IInternetZoneManager *LPURLZONEMANAGER;
  1991. typedef enum tagURLZONE
  1992. {
  1993. URLZONE_PREDEFINED_MIN = 0,
  1994. URLZONE_LOCAL_MACHINE = 0, // local machine zone is not exposed in UI
  1995. URLZONE_INTRANET, // My Intranet zone
  1996. URLZONE_TRUSTED, // Trusted Web sites zone
  1997. URLZONE_INTERNET, // The Internet zone
  1998. URLZONE_UNTRUSTED, // Untrusted sites zone
  1999. URLZONE_PREDEFINED_MAX = 999,
  2000. URLZONE_USER_MIN = 1000,
  2001. URLZONE_USER_MAX = 10000,
  2002. } URLZONE;
  2003. typedef enum tagURLTEMPLATE
  2004. {
  2005. // This value is just used to indicate the current set
  2006. // of policies are not based on any template.
  2007. URLTEMPLATE_CUSTOM = 0x000000,
  2008. URLTEMPLATE_PREDEFINED_MIN = 0x10000,
  2009. URLTEMPLATE_LOW = 0x10000,
  2010. URLTEMPLATE_MEDLOW = 0x10500,
  2011. URLTEMPLATE_MEDIUM = 0x11000,
  2012. URLTEMPLATE_HIGH = 0x12000,
  2013. URLTEMPLATE_PREDEFINED_MAX = 0x20000
  2014. } URLTEMPLATE ;
  2015. enum { MAX_ZONE_PATH = 260, MAX_ZONE_DESCRIPTION = 200 };
  2016. typedef enum {
  2017. ZAFLAGS_CUSTOM_EDIT = 0x00000001,
  2018. ZAFLAGS_ADD_SITES = 0x00000002,
  2019. ZAFLAGS_REQUIRE_VERIFICATION = 0x00000004,
  2020. ZAFLAGS_INCLUDE_PROXY_OVERRIDE = 0x00000008, // Intranet only.
  2021. ZAFLAGS_INCLUDE_INTRANET_SITES = 0x00000010, // Intranet only.
  2022. ZAFLAGS_NO_UI = 0x00000020, // Don't display UI (used for local machine)
  2023. ZAFLAGS_SUPPORTS_VERIFICATION = 0x00000040, // Supports server verification.
  2024. ZAFLAGS_UNC_AS_INTRANET = 0x00000080,
  2025. } ZAFLAGS ;
  2026. typedef struct _ZONEATTRIBUTES
  2027. {
  2028. ULONG cbSize;
  2029. WCHAR szDisplayName[MAX_ZONE_PATH];
  2030. WCHAR szDescription[MAX_ZONE_DESCRIPTION];
  2031. WCHAR szIconPath[MAX_ZONE_PATH];
  2032. DWORD dwTemplateMinLevel;
  2033. DWORD dwTemplateRecommended;
  2034. DWORD dwTemplateCurrentLevel;
  2035. DWORD dwFlags; // ZAFLAGS.
  2036. } ZONEATTRIBUTES, *LPZONEATTRIBUTES;
  2037. HRESULT GetZoneAttributes
  2038. (
  2039. [in] DWORD dwZone,
  2040. [in, out, unique]
  2041. ZONEATTRIBUTES* pZoneAttributes
  2042. );
  2043. cpp_quote("// Gets the zone attributes (information in registry other than actual security")
  2044. cpp_quote("// policies associated with the zone). Zone attributes are fixed as:")
  2045. HRESULT SetZoneAttributes
  2046. (
  2047. [in] DWORD dwZone,
  2048. [in] ZONEATTRIBUTES* pZoneAttributes
  2049. );
  2050. cpp_quote("// Sets the zone attributes (information in registry other than actual security")
  2051. cpp_quote("// policies associated with the zone). Zone attributes as above.")
  2052. cpp_quote("// Returns S_OK or ??? if failed to write the zone attributes.")
  2053. cpp_quote("/* Registry Flags")
  2054. cpp_quote("")
  2055. cpp_quote(" When reading, default behavior is:")
  2056. cpp_quote(" If HKLM allows override and HKCU value exists")
  2057. cpp_quote(" Then use HKCU value")
  2058. cpp_quote(" Else use HKLM value")
  2059. cpp_quote(" When writing, default behavior is same as HKCU")
  2060. cpp_quote(" If HKLM allows override")
  2061. cpp_quote(" Then Write to HKCU")
  2062. cpp_quote(" Else Fail")
  2063. cpp_quote("*/")
  2064. typedef enum _URLZONEREG
  2065. {
  2066. URLZONEREG_DEFAULT=0,
  2067. URLZONEREG_HKLM,
  2068. URLZONEREG_HKCU
  2069. } URLZONEREG;
  2070. HRESULT GetZoneCustomPolicy
  2071. (
  2072. [in] DWORD dwZone, // zone index
  2073. [in] REFGUID guidKey, // key to lookup value
  2074. [out, size_is(,*pcbPolicy)] // allocation via IMemAlloc; caller frees
  2075. BYTE** ppPolicy, // pointer to output buffer pointer
  2076. [out] DWORD* pcbPolicy, // pointer to output buffer size
  2077. [in] URLZONEREG urlZoneReg // effective, HKCU, or HKLM
  2078. );
  2079. cpp_quote("// Gets a named custom policy associated with a zone;")
  2080. cpp_quote("// e.g. the Java VM settings can be defined with a unique key such as 'Java'.")
  2081. cpp_quote("// Custom policy support is intended to allow extensibility from the predefined")
  2082. cpp_quote("// set of policies that IE4 has built in.")
  2083. cpp_quote("// ")
  2084. cpp_quote("// pwszKey is the string name designating the custom policy. Components are")
  2085. cpp_quote("// responsible for having unique names.")
  2086. cpp_quote("// ppPolicy is the callee allocated buffer for the policy byte blob; caller is")
  2087. cpp_quote("// responsible for freeing this buffer eventually.")
  2088. cpp_quote("// pcbPolicy is the size of the byte blob returned.")
  2089. cpp_quote("// dwRegFlags determines how registry is accessed (see above).")
  2090. cpp_quote("// Returns S_OK if key is found and buffer allocated; ??? if key is not found (no buffer alloced).")
  2091. HRESULT SetZoneCustomPolicy
  2092. (
  2093. [in] DWORD dwZone, // zone index
  2094. [in] REFGUID guidKey, // key to lookup value
  2095. [in, size_is(cbPolicy)]
  2096. BYTE* pPolicy, // input buffer pointer
  2097. [in] DWORD cbPolicy, // input data size
  2098. [in] URLZONEREG urlZoneReg // default, HKCU, or HKLM
  2099. );
  2100. cpp_quote("// Sets a named custom policy associated with a zone;")
  2101. cpp_quote("// e.g. the Java VM settings can be defined with a unique key such as 'Java'.")
  2102. cpp_quote("// Custom policy support is intended to allow extensibility from the predefined")
  2103. cpp_quote("// set of policies that IE4 has built in. ")
  2104. cpp_quote("// ")
  2105. cpp_quote("// pwszKey is the string name designating the custom policy. Components are")
  2106. cpp_quote("// responsible for having unique names.")
  2107. cpp_quote("// ppPolicy is the caller allocated buffer for the policy byte blob.")
  2108. cpp_quote("// pcbPolicy is the size of the byte blob to be set.")
  2109. cpp_quote("// dwRegFlags determines if HTCU or HKLM is set.")
  2110. cpp_quote("// Returns S_OK or ??? if failed to write the zone custom policy.")
  2111. HRESULT GetZoneActionPolicy
  2112. (
  2113. [in] DWORD dwZone, // zone index
  2114. [in] DWORD dwAction, // index number of action
  2115. [out, size_is(cbPolicy)]
  2116. BYTE* pPolicy, // output buffer pointer
  2117. [in] DWORD cbPolicy, // output buffer size
  2118. [in] URLZONEREG urlZoneReg // effective, HKCU, or HKLM
  2119. );
  2120. cpp_quote("// Gets action policy associated with a zone, the builtin, fixed-length policies info.")
  2121. cpp_quote("")
  2122. cpp_quote("// dwAction is the action code for the action as defined above.")
  2123. cpp_quote("// pPolicy is the caller allocated buffer for the policy data.")
  2124. cpp_quote("// cbPolicy is the size of the caller allocated buffer.")
  2125. cpp_quote("// dwRegFlags determines how registry is accessed (see above).")
  2126. cpp_quote("// Returns S_OK if action is valid; ??? if action is not valid.")
  2127. HRESULT SetZoneActionPolicy
  2128. (
  2129. [in] DWORD dwZone, // zone index
  2130. [in] DWORD dwAction, // index number of action
  2131. [in, size_is(cbPolicy)]
  2132. BYTE* pPolicy, // input buffer pointer
  2133. [in] DWORD cbPolicy, // input data size
  2134. [in] URLZONEREG urlZoneReg // HKCU, or HKLM
  2135. );
  2136. // Sets action policy associated with a zone, the builtin, fixed-length policies info.
  2137. //
  2138. // dwAction is the action code as defined above.
  2139. // pPolicy is the caller allocated buffer for the policy data.
  2140. // cbPolicy is the size of the caller allocated buffer.
  2141. // dwRegFlags determines how registry is accessed (see above).
  2142. // Returns S_OK if action is valid; ??? if action is not valid.
  2143. // UI, logging, and wrapper for both
  2144. // This function is not implemented yet.
  2145. HRESULT PromptAction
  2146. (
  2147. [in] DWORD dwAction, // action type
  2148. [in] HWND hwndParent, // parent window handle
  2149. [in] LPCWSTR pwszUrl, // URL to display
  2150. [in] LPCWSTR pwszText, // dialog text
  2151. [in] DWORD dwPromptFlags // reserved, pass 0
  2152. );
  2153. // This method presents UI to ask user about specified action
  2154. // This function is not implemented.
  2155. HRESULT LogAction
  2156. (
  2157. [in] DWORD dwAction, // action type
  2158. [in] LPCWSTR pwszUrl, // URL to log
  2159. [in] LPCWSTR pwszText, // associated text
  2160. [in] DWORD dwLogFlags // reserved, pass 0
  2161. );
  2162. // zone enumeration
  2163. HRESULT CreateZoneEnumerator
  2164. (
  2165. [out] DWORD* pdwEnum, // enum handle
  2166. [out] DWORD* pdwCount, // # of elements in the list.
  2167. [in] DWORD dwFlags // reserved, pass 0
  2168. );
  2169. // Returns enumerator handle needed to enumerate defined zones.
  2170. // The zone enumeration corresponds to a snap-shot of the zones when
  2171. // the Create call is made.
  2172. HRESULT GetZoneAt
  2173. (
  2174. [in] DWORD dwEnum, // returned by CreateZoneEnumerator
  2175. [in] DWORD dwIndex, // 0-based
  2176. [out] DWORD* pdwZone // absolute zone index.
  2177. );
  2178. HRESULT DestroyZoneEnumerator
  2179. (
  2180. [in] DWORD dwEnum // enum handle
  2181. );
  2182. // Destroys resources associated with an enumerator
  2183. HRESULT CopyTemplatePoliciesToZone
  2184. (
  2185. [in] DWORD dwTemplate, // High, medium or low
  2186. [in] DWORD dwZone, // Zone to copy policies to.
  2187. [in] DWORD dwReserved
  2188. );
  2189. }
  2190. cpp_quote("#endif")
  2191. cpp_quote("EXTERN_C const IID CLSID_SoftDistExt; ")
  2192. //+---------------------------------------------------------------------------
  2193. //
  2194. // Copyright (C) Microsoft Corporation, 1995-1998.
  2195. //
  2196. // Contents: ISoftDistExt interface definition
  2197. //
  2198. //----------------------------------------------------------------------------
  2199. cpp_quote("#ifndef _LPSOFTDISTEXT_DEFINED")
  2200. cpp_quote("#define _LPSOFTDISTEXT_DEFINED")
  2201. cpp_quote("")
  2202. cpp_quote("#define SOFTDIST_FLAG_USAGE_EMAIL 0x00000001")
  2203. cpp_quote("#define SOFTDIST_FLAG_USAGE_PRECACHE 0x00000002")
  2204. cpp_quote("#define SOFTDIST_FLAG_USAGE_AUTOINSTALL 0x00000004")
  2205. cpp_quote("#define SOFTDIST_FLAG_DELETE_SUBSCRIPTION 0x00000008")
  2206. cpp_quote("")
  2207. cpp_quote("")
  2208. cpp_quote("#define SOFTDIST_ADSTATE_NONE 0x00000000")
  2209. cpp_quote("#define SOFTDIST_ADSTATE_AVAILABLE 0x00000001")
  2210. cpp_quote("#define SOFTDIST_ADSTATE_DOWNLOADED 0x00000002")
  2211. cpp_quote("#define SOFTDIST_ADSTATE_INSTALLED 0x00000003")
  2212. cpp_quote("")
  2213. typedef struct _tagCODEBASEHOLD
  2214. {
  2215. ULONG cbSize;
  2216. LPWSTR szDistUnit;
  2217. LPWSTR szCodeBase;
  2218. DWORD dwVersionMS;
  2219. DWORD dwVersionLS;
  2220. DWORD dwStyle;
  2221. } CODEBASEHOLD, *LPCODEBASEHOLD;
  2222. typedef struct _tagSOFTDISTINFO
  2223. {
  2224. ULONG cbSize;
  2225. DWORD dwFlags;
  2226. DWORD dwAdState;
  2227. LPWSTR szTitle;
  2228. LPWSTR szAbstract;
  2229. LPWSTR szHREF;
  2230. DWORD dwInstalledVersionMS;
  2231. DWORD dwInstalledVersionLS;
  2232. DWORD dwUpdateVersionMS;
  2233. DWORD dwUpdateVersionLS;
  2234. DWORD dwAdvertisedVersionMS;
  2235. DWORD dwAdvertisedVersionLS;
  2236. DWORD dwReserved;
  2237. } SOFTDISTINFO, *LPSOFTDISTINFO;
  2238. [
  2239. local,
  2240. object,
  2241. uuid(B15B8DC1-C7E1-11d0-8680-00AA00BDCB71),
  2242. helpstring("ISoftDistExt Interface"),
  2243. pointer_default(unique)
  2244. ]
  2245. interface ISoftDistExt : IUnknown
  2246. {
  2247. HRESULT ProcessSoftDist
  2248. (
  2249. [in] LPCWSTR szCDFURL,
  2250. [in] IXMLElement *pSoftDistElement,
  2251. [in, out] LPSOFTDISTINFO lpsdi
  2252. );
  2253. HRESULT GetFirstCodeBase
  2254. (
  2255. [in] LPWSTR *szCodeBase,
  2256. [in] LPDWORD dwMaxSize
  2257. );
  2258. HRESULT GetNextCodeBase
  2259. (
  2260. [in] LPWSTR *szCodeBase,
  2261. [in] LPDWORD dwMaxSize
  2262. );
  2263. HRESULT AsyncInstallDistributionUnit
  2264. (
  2265. [in] IBindCtx *pbc,
  2266. [in] LPVOID pvReserved,
  2267. [in] DWORD flags,
  2268. [in] LPCODEBASEHOLD lpcbh
  2269. );
  2270. }
  2271. cpp_quote("STDAPI GetSoftwareUpdateInfo( LPCWSTR szDistUnit, LPSOFTDISTINFO psdi );")
  2272. cpp_quote("STDAPI SetSoftwareUpdateAdvertisementState( LPCWSTR szDistUnit, DWORD dwAdState, DWORD dwAdvertisedVersionMS, DWORD dwAdvertisedVersionLS );")
  2273. cpp_quote("#endif")
  2274. //+---------------------------------------------------------------------------
  2275. //
  2276. // Copyright (C) Microsoft Corporation, 1995-1998.
  2277. //
  2278. // Contents: ICatalogFileInfo interface definition
  2279. //
  2280. //----------------------------------------------------------------------------
  2281. cpp_quote("#ifndef _LPCATALOGFILEINFO_DEFINED")
  2282. cpp_quote("#define _LPCATALOGFILEINFO_DEFINED")
  2283. [
  2284. local,
  2285. object,
  2286. uuid(711C7600-6B48-11d1-B403-00AA00B92AF1),
  2287. pointer_default(unique)
  2288. ]
  2289. interface ICatalogFileInfo : IUnknown
  2290. {
  2291. typedef [unique] ICatalogFileInfo *LPCATALOGFILEINFO;
  2292. HRESULT GetCatalogFile(
  2293. [out] LPSTR *ppszCatalogFile // Catalog file path
  2294. );
  2295. HRESULT GetJavaTrust(
  2296. [out] void **ppJavaTrust // Java Trust structure
  2297. );
  2298. }
  2299. cpp_quote("#endif")
  2300. //+---------------------------------------------------------------------------
  2301. //
  2302. // Copyright (C) Microsoft Corporation, 1995-1998.
  2303. //
  2304. // Contents: IDataFilter definition
  2305. //
  2306. //---------------------------------------------------------------------------
  2307. cpp_quote("#ifndef _LPDATAFILTER_DEFINED")
  2308. cpp_quote("#define _LPDATAFILTER_DEFINED")
  2309. [
  2310. object,
  2311. uuid(69d14c80-c18e-11d0-a9ce-006097942311),
  2312. pointer_default(unique)
  2313. ]
  2314. interface IDataFilter: IUnknown
  2315. {
  2316. typedef [unique] IDataFilter *LPDATAFILTER;
  2317. HRESULT DoEncode(
  2318. [in] DWORD dwFlags,
  2319. [in] LONG lInBufferSize,
  2320. [in, size_is(lInBufferSize)]
  2321. BYTE* pbInBuffer,
  2322. [in] LONG lOutBufferSize,
  2323. [out, size_is(lOutBufferSize)]
  2324. BYTE* pbOutBuffer,
  2325. [in] LONG lInBytesAvailable,
  2326. [out] LONG* plInBytesRead,
  2327. [out] LONG* plOutBytesWritten,
  2328. [in] DWORD dwReserved
  2329. );
  2330. HRESULT DoDecode(
  2331. [in] DWORD dwFlags,
  2332. [in] LONG lInBufferSize,
  2333. [in, size_is(lInBufferSize)]
  2334. BYTE* pbInBuffer,
  2335. [in] LONG lOutBufferSize,
  2336. [out, size_is(lOutBufferSize)]
  2337. BYTE* pbOutBuffer,
  2338. [in] LONG lInBytesAvailable,
  2339. [out] LONG* plInBytesRead,
  2340. [out] LONG* plOutBytesWritten,
  2341. [in] DWORD dwReserved
  2342. );
  2343. HRESULT SetEncodingLevel(
  2344. [in] DWORD dwEncLevel
  2345. );
  2346. }
  2347. cpp_quote("#endif")
  2348. //+---------------------------------------------------------------------------
  2349. //
  2350. // Copyright (C) Microsoft Corporation, 1995-1998.
  2351. //
  2352. // Contents: IEncodingFilterFactory definition
  2353. //
  2354. //---------------------------------------------------------------------------
  2355. cpp_quote("#ifndef _LPENCODINGFILTERFACTORY_DEFINED")
  2356. cpp_quote("#define _LPENCODINGFILTERFACTORY_DEFINED")
  2357. typedef struct _tagPROTOCOLFILTERDATA
  2358. {
  2359. DWORD cbSize;
  2360. IInternetProtocolSink *pProtocolSink; // out parameter
  2361. IInternetProtocol *pProtocol; // in parameter
  2362. IUnknown *pUnk;
  2363. DWORD dwFilterFlags;
  2364. } PROTOCOLFILTERDATA;
  2365. [
  2366. local,
  2367. object,
  2368. uuid(70bdde00-c18e-11d0-a9ce-006097942311),
  2369. pointer_default(unique)
  2370. ]
  2371. interface IEncodingFilterFactory : IUnknown
  2372. {
  2373. typedef [unique] IEncodingFilterFactory *LPENCODINGFILTERFACTORY;
  2374. typedef struct _tagDATAINFO
  2375. {
  2376. ULONG ulTotalSize;
  2377. ULONG ulavrPacketSize;
  2378. ULONG ulConnectSpeed;
  2379. ULONG ulProcessorSpeed;
  2380. } DATAINFO ;
  2381. HRESULT FindBestFilter(
  2382. [in] LPCWSTR pwzCodeIn,
  2383. [in] LPCWSTR pwzCodeOut,
  2384. [in] DATAINFO info,
  2385. [out] IDataFilter** ppDF
  2386. );
  2387. HRESULT GetDefaultFilter(
  2388. [in] LPCWSTR pwzCodeIn,
  2389. [in] LPCWSTR pwzCodeOut,
  2390. [out] IDataFilter** ppDF
  2391. );
  2392. }
  2393. cpp_quote("#endif")
  2394. //+---------------------------------------------------------------------------
  2395. //
  2396. // Copyright (C) Microsoft Corporation, 1995-1998.
  2397. //
  2398. // Contents: Hit Logging Apis definition
  2399. //
  2400. //---------------------------------------------------------------------------
  2401. cpp_quote("#ifndef _HITLOGGING_DEFINED")
  2402. cpp_quote("#define _HITLOGGING_DEFINED")
  2403. cpp_quote("// Logging-specific apis")
  2404. #pragma midl_echo("BOOL WINAPI IsLoggingEnabledA(IN LPCSTR pszUrl); ")
  2405. #pragma midl_echo("BOOL WINAPI IsLoggingEnabledW(IN LPCWSTR pwszUrl); ")
  2406. cpp_quote("#ifdef UNICODE ")
  2407. cpp_quote("#define IsLoggingEnabled IsLoggingEnabledW ")
  2408. cpp_quote("#else ")
  2409. cpp_quote("#define IsLoggingEnabled IsLoggingEnabledA ")
  2410. cpp_quote("#endif // !UNICODE ")
  2411. // HIT_LOGGING_INFO
  2412. typedef struct _tagHIT_LOGGING_INFO {
  2413. DWORD dwStructSize;
  2414. LPSTR lpszLoggedUrlName;
  2415. SYSTEMTIME StartTime;
  2416. SYSTEMTIME EndTime;
  2417. LPSTR lpszExtendedInfo;
  2418. } HIT_LOGGING_INFO, * LPHIT_LOGGING_INFO;
  2419. #pragma midl_echo("BOOL WINAPI WriteHitLogging(IN LPHIT_LOGGING_INFO lpLogginginfo); ")
  2420. cpp_quote("#define CONFIRMSAFETYACTION_LOADOBJECT 0x00000001")
  2421. struct CONFIRMSAFETY
  2422. {
  2423. CLSID clsid;
  2424. IUnknown * pUnk;
  2425. DWORD dwFlags;
  2426. };
  2427. cpp_quote("EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY; ")
  2428. cpp_quote("#endif")
  2429. //+---------------------------------------------------------------------------
  2430. //
  2431. // Copyright (C) Microsoft Corporation, 2000.
  2432. //
  2433. // Contents: IWrappedProtocol definition
  2434. //
  2435. //---------------------------------------------------------------------------
  2436. cpp_quote("#ifndef _LPIWRAPPEDPROTOCOL_DEFINED")
  2437. cpp_quote("#define _LPIWRAPPEDPROTOCOL_DEFINED")
  2438. [
  2439. local,
  2440. object,
  2441. uuid(53c84785-8425-4dc5-971b-e58d9c19f9b6),
  2442. pointer_default(unique)
  2443. ]
  2444. interface IWrappedProtocol : IUnknown
  2445. {
  2446. typedef [unique] IWrappedProtocol *LPIWRAPPEDPROTOCOL;
  2447. HRESULT GetWrapperCode(
  2448. [out] LONG * pnCode,
  2449. [in] DWORD_PTR dwReserved
  2450. );
  2451. }
  2452. cpp_quote("#endif")