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

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