UrlMon.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:114k
源码类别:

模拟服务器

开发平台:

C/C++

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