home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / urlmon.idl < prev    next >
Text File  |  1998-04-25  |  104KB  |  2,531 lines

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