home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Urlmon.idl < prev    next >
Encoding:
Text File  |  1996-08-14  |  38.0 KB  |  904 lines

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. //  File:       urlmon.idl
  7. //
  8. //  Contents:   async moniker interfaces
  9. //
  10. //  Classes:
  11. //
  12. //  Functions:
  13. //
  14. //  History:    11-02-95     Created
  15. //
  16. //----------------------------------------------------------------------------
  17. cpp_quote("//=--------------------------------------------------------------------------=")
  18. cpp_quote("// UrlMon.h")
  19. cpp_quote("//=--------------------------------------------------------------------------=")
  20. cpp_quote("// (C) Copyright 1995-1996 Microsoft Corporation.  All Rights Reserved.")
  21. cpp_quote("//")
  22. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  23. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  24. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  25. cpp_quote("// PARTICULAR PURPOSE.")
  26. cpp_quote("//=--------------------------------------------------------------------------=")
  27. cpp_quote("")
  28. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  29. cpp_quote("")
  30. cpp_quote("//---------------------------------------------------------------------------=")
  31. cpp_quote("// URL Moniker Interfaces.")
  32. cpp_quote("")
  33.  
  34. import "objidl.idl";
  35. import "oleidl.idl";
  36. import "servprov.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. interface IServiceProvider;
  48.  
  49. cpp_quote("// These are for backwards compatibility with previous URLMON versions")
  50. cpp_quote("#define BINDF_DONTUSECACHE BINDF_GETNEWESTVERSION")
  51. cpp_quote("#define BINDF_DONTPUTINCACHE BINDF_NOWRITECACHE")
  52. cpp_quote("#define BINDF_NOCOPYDATA BINDF_PULLDATA")
  53.  
  54. cpp_quote("EXTERN_C const IID IID_IAsyncMoniker;    ")
  55. cpp_quote("EXTERN_C const IID CLSID_StdURLMoniker;  ")
  56. cpp_quote("EXTERN_C const IID CLSID_HttpProtocol;   ")
  57. cpp_quote("EXTERN_C const IID CLSID_FtpProtocol;    ")
  58. cpp_quote("EXTERN_C const IID CLSID_GopherProtocol; ")
  59. cpp_quote("EXTERN_C const IID CLSID_HttpSProtocol;  ")
  60. cpp_quote("EXTERN_C const IID CLSID_FileProtocol;   ")
  61. cpp_quote("EXTERN_C const IID CLSID_MkProtocol;     ")
  62.  
  63. #pragma midl_echo(" ")
  64. #pragma midl_echo("#define SZ_URLCONTEXT           OLESTR(\"URL Context\")")
  65. #pragma midl_echo("#define SZ_ASYNC_CALLEE         OLESTR(\"AsyncCallee\")")
  66.  
  67. #pragma midl_echo("#define MKSYS_URLMONIKER    6                 ")
  68. #pragma midl_echo(" ")
  69. #pragma midl_echo("STDAPI CreateURLMoniker(LPMONIKER pMkCtx, LPCWSTR szURL, LPMONIKER FAR * ppmk);             ")
  70. #pragma midl_echo("STDAPI GetClassURL(LPCWSTR szURL, CLSID *pClsID);                                           ")
  71. #pragma midl_echo("STDAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *pBSCb,                       ")
  72. #pragma midl_echo("                                IEnumFORMATETC *pEFetc, IBindCtx **ppBC);                   ")
  73. #pragma midl_echo("STDAPI MkParseDisplayNameEx(IBindCtx *pbc, LPCWSTR szDisplayName, ULONG *pchEaten,          ")
  74. #pragma midl_echo("                                LPMONIKER *ppmk);                                           ")
  75. #pragma midl_echo("STDAPI RegisterBindStatusCallback(LPBC pBC, IBindStatusCallback *pBSCb,                     ")
  76. #pragma midl_echo("                                IBindStatusCallback**  ppBSCBPrev, DWORD dwReserved);       ")
  77. #pragma midl_echo("STDAPI RevokeBindStatusCallback(LPBC pBC, IBindStatusCallback *pBSCb);                      ")
  78.  
  79. #pragma midl_echo("STDAPI GetClassFileOrMime(LPBC pBC, LPCWSTR szFilename, LPVOID pBuffer, DWORD cbSize, LPCWSTR szMime, DWORD dwReserved, CLSID *pclsid); ")
  80. #pragma midl_echo("STDAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved);                               ")
  81.  
  82.  
  83. #pragma midl_echo("STDAPI CoGetClassObjectFromURL( REFCLSID rCLASSID,")
  84. #pragma midl_echo("            LPCWSTR szCODE, DWORD dwFileVersionMS, ")
  85. #pragma midl_echo("            DWORD dwFileVersionLS, LPCWSTR szTYPE,")
  86. #pragma midl_echo("            LPBINDCTX pBindCtx, DWORD dwClsContext,")
  87. #pragma midl_echo("            LPVOID pvReserved, REFIID riid, LPVOID * ppv);")
  88.  
  89.  
  90. #pragma midl_echo(" ")
  91. #pragma midl_echo("//helper apis                                                                               ")
  92. #pragma midl_echo("STDAPI IsAsyncMoniker(IMoniker* pmk);                                                       ")
  93. #pragma midl_echo("STDAPI CreateURLBinding(LPCWSTR lpszUrl, IBindCtx *pbc, IBinding **ppBdg);                  ")
  94. #pragma midl_echo(" ")
  95. #pragma midl_echo("STDAPI RegisterMediaTypesW(UINT ctypes, const LPCWSTR* rgszTypes, CLIPFORMAT* rgcfTypes);          ")
  96. #pragma midl_echo("STDAPI RegisterMediaTypes(UINT ctypes, const LPCSTR* rgszTypes, CLIPFORMAT* rgcfTypes);            ")
  97. #pragma midl_echo("STDAPI FindMediaType(LPCSTR rgszTypes, CLIPFORMAT* rgcfTypes);                                       ")
  98. #pragma midl_echo("STDAPI CreateFormatEnumerator( UINT cfmtetc, FORMATETC* rgfmtetc, IEnumFORMATETC** ppenumfmtetc); ")
  99. #pragma midl_echo("STDAPI RegisterFormatEnumerator(LPBC pBC, IEnumFORMATETC *pEFetc, DWORD reserved);          ")
  100. #pragma midl_echo("STDAPI RevokeFormatEnumerator(LPBC pBC, IEnumFORMATETC *pEFetc);                            ")
  101. #pragma midl_echo("STDAPI RegisterMediaTypeClass(LPBC pBC,UINT ctypes, const LPCSTR* rgszTypes, CLSID *rgclsID, DWORD reserved);    ")
  102. #pragma midl_echo("STDAPI FindMediaTypeClass(LPBC pBC, LPCSTR szType, CLSID *pclsID, DWORD reserved);                          ")
  103. #pragma midl_echo("STDAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, DWORD dwReserved);       ")
  104.  
  105. #pragma midl_echo(" ")
  106. #pragma midl_echo("// URLMON-specific defines for UrlMkSetSessionOption() above")
  107. #pragma midl_echo("#define URLMON_OPTION_USERAGENT  0x10000001")
  108.  
  109. #pragma midl_echo(" ")
  110. #pragma midl_echo("#define CF_NULL                 0                                  ")
  111. #pragma midl_echo("#define CFSTR_MIME_NULL         NULL                               ")
  112. // 7 bit MIME Types
  113. #pragma midl_echo("#define CFSTR_MIME_TEXT         (TEXT(\"text/plain\"))             ")
  114. #pragma midl_echo("#define CFSTR_MIME_RICHTEXT     (TEXT(\"text/richtext\"))          ")
  115. #pragma midl_echo("#define CFSTR_MIME_X_BITMAP     (TEXT(\"image/x-xbitmap\"))        ")
  116. #pragma midl_echo("#define CFSTR_MIME_POSTSCRIPT   (TEXT(\"application/postscript\")) ")
  117. // 8 bit MIME Types
  118. #pragma midl_echo("#define CFSTR_MIME_AIFF         (TEXT(\"audio/aiff\"))             ")
  119. #pragma midl_echo("#define CFSTR_MIME_BASICAUDIO   (TEXT(\"audio/basic\"))            ")
  120. #pragma midl_echo("#define CFSTR_MIME_WAV          (TEXT(\"audio/wav\"))              ")
  121. #pragma midl_echo("#define CFSTR_MIME_X_WAV        (TEXT(\"audio/x-wav\"))            ")
  122. #pragma midl_echo("#define CFSTR_MIME_GIF          (TEXT(\"image/gif\"))              ")
  123. #pragma midl_echo("#define CFSTR_MIME_PJPEG        (TEXT(\"image/pjpeg\"))            ")
  124. #pragma midl_echo("#define CFSTR_MIME_JPEG         (TEXT(\"image/jpeg\"))             ")
  125. #pragma midl_echo("#define CFSTR_MIME_TIFF         (TEXT(\"image/tiff\"))             ")
  126. #pragma midl_echo("#define CFSTR_MIME_X_PNG        (TEXT(\"image/x-png\"))            ")
  127. #pragma midl_echo("#define CFSTR_MIME_BMP          (TEXT(\"image/bmp\"))              ")
  128. #pragma midl_echo("#define CFSTR_MIME_X_ART        (TEXT(\"image/x-jg\"))             ")
  129. #pragma midl_echo("#define CFSTR_MIME_AVI          (TEXT(\"video/avi\"))              ")
  130. #pragma midl_echo("#define CFSTR_MIME_MPEG         (TEXT(\"video/mpeg\"))             ")
  131. #pragma midl_echo("#define CFSTR_MIME_FRACTALS     (TEXT(\"application/fractals\"))   ")
  132. #pragma midl_echo("#define CFSTR_MIME_RAWDATA      (TEXT(\"application/octet-stream\"))")
  133. #pragma midl_echo("#define CFSTR_MIME_RAWDATASTRM  (TEXT(\"application/octet-stream\"))")
  134. #pragma midl_echo("#define CFSTR_MIME_PDF          (TEXT(\"application/pdf\"))        ")
  135. #pragma midl_echo("#define CFSTR_MIME_X_AIFF       (TEXT(\"audio/x-aiff\"))           ")
  136. #pragma midl_echo("#define CFSTR_MIME_X_REALAUDIO  (TEXT(\"audio/x-pn-realaudio\"))   ")
  137. #pragma midl_echo("#define CFSTR_MIME_XBM          (TEXT(\"image/xbm\"))              ")
  138. #pragma midl_echo("#define CFSTR_MIME_QUICKTIME    (TEXT(\"video/quicktime\"))        ")
  139. #pragma midl_echo("#define CFSTR_MIME_X_MSVIDEO    (TEXT(\"video/x-msvideo\"))        ")
  140. #pragma midl_echo("#define CFSTR_MIME_X_SGI_MOVIE  (TEXT(\"video/x-sgi-movie\"))      ")
  141. // 7 or 8 bit MIME Types
  142. #pragma midl_echo("#define CFSTR_MIME_HTML         (TEXT(\"text/html\"))              ")
  143. #pragma midl_echo(" ")
  144.  
  145. cpp_quote("// MessageId: MK_S_ASYNCHRONOUS                                              ")
  146. cpp_quote("// MessageText: Operation is successful, but will complete asynchronously.   ")
  147. cpp_quote("//                                                                           ")
  148. cpp_quote("#define MK_S_ASYNCHRONOUS    _HRESULT_TYPEDEF_(0x000401E8L)                  ")
  149. cpp_quote("#define S_ASYNCHRONOUS       MK_S_ASYNCHRONOUS                               ")
  150. cpp_quote("                                                                             ")
  151. cpp_quote("#ifndef E_PENDING                                                            ")
  152. cpp_quote("#define E_PENDING _HRESULT_TYPEDEF_(0x8000000AL)                             ")
  153. cpp_quote("#endif                                                                       ")
  154. cpp_quote("                                                                             ")
  155. cpp_quote("//                                                                           ")
  156. cpp_quote("//                                                                           ")
  157. cpp_quote("// WinINet and protocol specific errors are mapped to one of the following   ")
  158. cpp_quote("// error which are returned in IBSC::OnStopBinding                           ")
  159. cpp_quote("//                                                                           ")
  160. cpp_quote("//                                                                           ")
  161.  
  162. //
  163. // url could not be parsed
  164. //
  165. cpp_quote("#define INET_E_INVALID_URL               _HRESULT_TYPEDEF_(0x800C0002L)      ")
  166. //
  167. // InternetOpen failed - no session was established
  168. //
  169. cpp_quote("#define INET_E_NO_SESSION                _HRESULT_TYPEDEF_(0x800C0003L)      ")
  170. //
  171. //  InternetConnect failed - no
  172. //
  173. cpp_quote("#define INET_E_CANNOT_CONNECT            _HRESULT_TYPEDEF_(0x800C0004L)      ")
  174. //
  175. // the server or proxy was not found
  176. //
  177. cpp_quote("#define INET_E_RESOURCE_NOT_FOUND        _HRESULT_TYPEDEF_(0x800C0005L)      ")
  178. //
  179. // the actual object was not found - e.g. http: 404
  180. //
  181. cpp_quote("#define INET_E_OBJECT_NOT_FOUND          _HRESULT_TYPEDEF_(0x800C0006L)      ")
  182. //
  183. //  connection was established but data can not be retrieved
  184. //  no filename from cache invalid etc.
  185. //
  186. cpp_quote("#define INET_E_DATA_NOT_AVAILABLE        _HRESULT_TYPEDEF_(0x800C0007L)      ")
  187. //
  188. //  generic download failure - connection broke
  189. //
  190. cpp_quote("#define INET_E_DOWNLOAD_FAILURE          _HRESULT_TYPEDEF_(0x800C0008L)      ")
  191. //
  192. //  to access to this object need authentication    e.g. http: 401
  193. //
  194. cpp_quote("#define INET_E_AUTHENTICATION_REQUIRED   _HRESULT_TYPEDEF_(0x800C0009L)      ")
  195. //
  196. // the object is not available of the required type             http: 403 no object
  197. //
  198. cpp_quote("#define INET_E_NO_VALID_MEDIA            _HRESULT_TYPEDEF_(0x800C000AL)      ")
  199. //
  200. // the internet connection timed out
  201. //
  202. cpp_quote("#define INET_E_CONNECTION_TIMEOUT        _HRESULT_TYPEDEF_(0x800C000BL)      ")
  203. //
  204. // the request was invalid
  205. //
  206. cpp_quote("#define INET_E_INVALID_REQUEST           _HRESULT_TYPEDEF_(0x800C000CL)      ")
  207. //
  208. // protocol is not know and no plugable protocol is registered
  209. //
  210. cpp_quote("#define INET_E_UNKNOWN_PROTOCOL          _HRESULT_TYPEDEF_(0x800C000DL)      ")
  211. //
  212. // security problem encountered
  213. //
  214. cpp_quote("#define INET_E_SECURITY_PROBLEM          _HRESULT_TYPEDEF_(0x800C000EL)      ")
  215. //
  216. // object could not be loaded; IPersistXXX::Load failed
  217. //
  218. cpp_quote("#define INET_E_CANNOT_LOAD_DATA          _HRESULT_TYPEDEF_(0x800C000FL)      ")
  219. //
  220. // CoCreateInstance failed.
  221. //
  222. cpp_quote("#define INET_E_CANNOT_INSTANTIATE_OBJECT _HRESULT_TYPEDEF_(0x800C0010L)      ")
  223. //
  224. // HResult range returned in OnStopBinding
  225. //
  226. cpp_quote("#define INET_E_ERROR_FIRST               _HRESULT_TYPEDEF_(0x800C0002L)      ")
  227. cpp_quote("#define INET_E_ERROR_LAST                INET_E_CANNOT_INSTANTIATE_OBJECT    ")
  228.  
  229.  
  230. //+---------------------------------------------------------------------------
  231. //
  232. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  233. //
  234. //  Contents:  IPersistMoniker interface definition
  235. //
  236. //----------------------------------------------------------------------------
  237.  
  238. cpp_quote("#ifndef _LPPERSISTMONIKER_DEFINED")
  239. cpp_quote("#define _LPPERSISTMONIKER_DEFINED")
  240.  
  241. [
  242.         object,
  243.         uuid(79eac9c9-baf9-11ce-8c82-00aa004ba90b),
  244.         pointer_default(unique)
  245. ]
  246.  
  247.  
  248. //interface IPersistMoniker : IPersist
  249. interface IPersistMoniker : IUnknown
  250. {
  251.     typedef [unique] IPersistMoniker *LPPERSISTMONIKER;
  252.  
  253.     HRESULT GetClassID(
  254.         [out] CLSID *pClassID
  255.         );
  256.  
  257.     HRESULT IsDirty(void);
  258.  
  259.     HRESULT Load(
  260.         [in] BOOL fFullyAvailable,
  261.         [in] IMoniker * pimkName,
  262.         [in] LPBC pibc,
  263.         [in] DWORD grfMode
  264.         );
  265.  
  266.     HRESULT Save(
  267.         [in] IMoniker * pimkName,
  268.         [in] LPBC pbc,
  269.         [in] BOOL fRemember);
  270.  
  271.     HRESULT SaveCompleted(
  272.         [in] IMoniker * pimkName,
  273.         [in] LPBC pibc);
  274.  
  275.     HRESULT GetCurMoniker(
  276.         [out] IMoniker ** ppimkName);
  277. }
  278.  
  279. cpp_quote("#endif")
  280.  
  281.  
  282. //+---------------------------------------------------------------------------
  283. //
  284. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  285. //
  286. //  Contents:  IBindProtocol interface definition
  287. //
  288. //----------------------------------------------------------------------------
  289. cpp_quote("#ifndef _LPBINDPROTOCOL_DEFINED")
  290. cpp_quote("#define _LPBINDPROTOCOL_DEFINED")
  291.  
  292. [
  293.         local,
  294.         object,
  295.         uuid(79eac9cd-baf9-11ce-8c82-00aa004ba90b),
  296.         pointer_default(unique)
  297. ]
  298.  
  299.  
  300. interface IBindProtocol : IUnknown
  301. {
  302.         typedef [unique] IBindProtocol *LPBINDPROTOCOL;
  303.  
  304.         HRESULT CreateBinding(
  305.                 [in] LPCWSTR szUrl,
  306.                 [in] IBindCtx *pbc,
  307.                 [out] IBinding ** ppb);
  308. }
  309.  
  310. cpp_quote("#endif")
  311.  
  312.  
  313. //+---------------------------------------------------------------------------
  314. //
  315. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  316. //
  317. //  Contents:   IBinding interface definition
  318. //
  319. //----------------------------------------------------------------------------
  320.  
  321. cpp_quote("#ifndef _LPBINDING_DEFINED")
  322. cpp_quote("#define _LPBINDING_DEFINED")
  323.  
  324. [
  325.         object,
  326.         uuid(79eac9c0-baf9-11ce-8c82-00aa004ba90b),
  327.         pointer_default(unique)
  328. ]
  329.  
  330. interface IBinding: IUnknown
  331. {
  332.         typedef [unique] IBinding *LPBINDING;
  333.  
  334.         HRESULT Abort();
  335.  
  336.         HRESULT Suspend();
  337.  
  338.         HRESULT Resume();
  339.  
  340.         HRESULT SetPriority(
  341.                 [in] LONG nPriority);
  342.  
  343.         HRESULT GetPriority(
  344.                 [out] LONG * pnPriority);
  345.  
  346.         [local]
  347.         HRESULT GetBindResult(
  348.                 [out]       CLSID *pclsidProtocol,
  349.                 [out]       DWORD *pdwResult,
  350.                 [out]       LPOLESTR *pszResult,
  351.                 [in, out]   DWORD   *pdwReserved);
  352.  
  353.         [call_as(GetBindResult)]
  354.         HRESULT RemoteGetBindResult(
  355.                 [out]   CLSID       *pclsidProtocol,
  356.                 [out]   DWORD       *pdwResult,
  357.                 [out]   LPOLESTR    *pszResult,
  358.                 [in]    DWORD       dwReserved);
  359.  
  360. }
  361.  
  362. cpp_quote("#endif")
  363.  
  364.  
  365. //+---------------------------------------------------------------------------
  366. //
  367. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  368. //
  369. //  Contents:   IBindStatusCallback interface definition
  370. //
  371. //----------------------------------------------------------------------------
  372. cpp_quote("#ifndef _LPBINDSTATUSCALLBACK_DEFINED")
  373. cpp_quote("#define _LPBINDSTATUSCALLBACK_DEFINED")
  374.  
  375. [
  376.         object,
  377.         uuid(79eac9c1-baf9-11ce-8c82-00aa004ba90b),
  378.         pointer_default(unique)
  379. ]
  380.  
  381. interface IBindStatusCallback: IUnknown
  382. {
  383.         typedef [unique] IBindStatusCallback *LPBINDSTATUSCALLBACK;
  384.  
  385.         typedef enum
  386.         {
  387.             BINDVERB_GET       = 0x00000000,       // default action
  388.             BINDVERB_POST      = 0x00000001,       // post verb
  389.             BINDVERB_PUT       = 0x00000002,       // put verb
  390.             BINDVERB_CUSTOM    = 0x00000003,       // custom verb
  391.         } BINDVERB;
  392.  
  393.         typedef enum
  394.         {
  395.             BINDINFOF_URLENCODESTGMEDDATA   = 0x00000001,       // url encode the stgmed data
  396.             BINDINFOF_URLENCODEDEXTRAINFO   = 0x00000002,       // url encode the extra info
  397.         } BINDINFOF;
  398.  
  399.  
  400.         // flags that describe the type of transaction that caller wants
  401.         typedef enum
  402.         {
  403.             BINDF_ASYNCHRONOUS              = 0x00000001,
  404.             BINDF_ASYNCSTORAGE              = 0x00000002,
  405.             BINDF_NOPROGRESSIVERENDERING    = 0x00000004,
  406.             BINDF_OFFLINEOPERATION          = 0x00000008,
  407.             BINDF_GETNEWESTVERSION          = 0x00000010,
  408.             BINDF_NOWRITECACHE              = 0x00000020,
  409.             BINDF_PULLDATA                  = 0x00000080,
  410.             BINDF_IGNORESECURITYPROBLEM     = 0x00000100,
  411.             BINDF_RESYNCHRONIZE             = 0x00000200,
  412.             BINDF_HYPERLINK                 = 0x00000400,
  413.             BINDF_INLINESGETNEWESTVERSION   = 0x10000000, //  need to remove from SDK
  414.             BINDF_INLINESRESYNCHRONIZE      = 0x20000000, // need to remove from SDK
  415.             BINDF_CONTAINER_NOWRITECACHE    = 0x40000000  // need to remove from SDK
  416.         } BINDF;
  417.  
  418.         typedef struct _tagBINDINFO
  419.         {
  420.             ULONG       cbSize;
  421.             LPWSTR      szExtraInfo;        // e.g. string added to the URL string [range byte]
  422.             STGMEDIUM   stgmedData;         // e.g. put or post data
  423.             DWORD       grfBindInfoF;       // e.g. how meddata should be treaded
  424.             DWORD       dwBindVerb;         // e.g. put, post, ...
  425.             LPWSTR      szCustomVerb;       // e.g. custom verb
  426.             DWORD       cbstgmedData;       // size of data in stgmedData
  427.         } BINDINFO;
  428.  
  429.         typedef struct _tagRemBINDINFO
  430.         {
  431.             ULONG       cbSize;
  432.             LPWSTR      szExtraInfo;        // e.g. string added to the URL string [range byte]
  433.             DWORD       grfBindInfoF;       // e.g. how meddata should be treaded
  434.             DWORD       dwBindVerb;         // e.g. put, post, ...
  435.             LPWSTR      szCustomVerb;       // e.g. custom verb
  436.             DWORD       cbstgmedData;       // size of data in stgmedData
  437.         } RemBINDINFO;
  438.  
  439.         typedef struct tagRemFORMATETC {
  440.             DWORD cfFormat;
  441.             DWORD ptd;
  442.             DWORD dwAspect;
  443.             LONG lindex;
  444.             DWORD tymed;
  445.         } RemFORMATETC, *LPREMFORMATETC;
  446.  
  447.         // Data notification flags
  448.         typedef enum
  449.         {
  450.             BSCF_FIRSTDATANOTIFICATION          = 0x00000001,
  451.             BSCF_INTERMEDIATEDATANOTIFICATION   = 0x00000002,
  452.             BSCF_LASTDATANOTIFICATION           = 0x00000004
  453.         } BSCF;
  454.  
  455.         typedef enum tagBINDSTATUS
  456.         {
  457.              BINDSTATUS_FINDINGRESOURCE          = 1
  458.             ,BINDSTATUS_CONNECTING
  459.             ,BINDSTATUS_REDIRECTING
  460.             ,BINDSTATUS_BEGINDOWNLOADDATA
  461.             ,BINDSTATUS_DOWNLOADINGDATA
  462.             ,BINDSTATUS_ENDDOWNLOADDATA
  463.             ,BINDSTATUS_BEGINDOWNLOADCOMPONENTS
  464.             ,BINDSTATUS_INSTALLINGCOMPONENTS
  465.             ,BINDSTATUS_ENDDOWNLOADCOMPONENTS
  466.             ,BINDSTATUS_USINGCACHEDCOPY
  467.             ,BINDSTATUS_SENDINGREQUEST
  468.             ,BINDSTATUS_CLASSIDAVAILABLE
  469.             ,BINDSTATUS_MIMETYPEAVAILABLE
  470.             ,BINDSTATUS_CACHEFILENAMEAVAILABLE
  471.         } BINDSTATUS;
  472.  
  473.  
  474.         HRESULT OnStartBinding(
  475.                 [in] DWORD dwReserved,
  476.                 [in] IBinding * pib);
  477.  
  478.         HRESULT GetPriority(
  479.                 [out] LONG * pnPriority);
  480.  
  481.         HRESULT OnLowResource(
  482.                 [in] DWORD reserved);
  483.  
  484.         HRESULT OnProgress(
  485.                 [in] ULONG ulProgress,
  486.                 [in] ULONG ulProgressMax,
  487.                 [in] ULONG ulStatusCode,
  488.                 [in] LPCWSTR szStatusText);
  489.  
  490.         HRESULT OnStopBinding(
  491.                 [in] HRESULT hresult,
  492.                 [in, unique] LPCWSTR szError
  493.                 );
  494.  
  495.         [local]
  496.         HRESULT GetBindInfo(
  497.                 [out] DWORD *grfBINDF,
  498.                 [in, out, unique] BINDINFO * pbindinfo
  499.                 );
  500.  
  501.         [call_as(GetBindInfo)]
  502.         HRESULT RemoteGetBindInfo(
  503.                 [out] DWORD *grfBINDF,
  504.                 [in, out, unique] RemBINDINFO * pbindinfo,
  505.                 [in, out, unique] RemSTGMEDIUM* pstgmed
  506.                 );
  507.  
  508.         [local]
  509.         HRESULT OnDataAvailable(
  510.                 [in] DWORD grfBSCF,
  511.                 [in] DWORD dwSize,
  512.                 [in] FORMATETC* pformatetc,
  513.                 [in] STGMEDIUM* pstgmed
  514.                 );
  515.  
  516.         [call_as(OnDataAvailable)]
  517.         HRESULT RemoteOnDataAvailable(
  518.                 [in] DWORD grfBSCF,
  519.                 [in] DWORD dwSize,
  520.                 [in] RemFORMATETC *pformatetc,
  521.                 [in] RemSTGMEDIUM* pstgmed
  522.                 );
  523.  
  524.         HRESULT OnObjectAvailable(
  525.                 [in] REFIID riid,
  526.                 [in, iid_is(riid)] IUnknown* punk
  527.                 );
  528.  
  529. }
  530. cpp_quote("#endif")
  531.  
  532.  
  533. //+---------------------------------------------------------------------------
  534. //
  535. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  536. //
  537. //  Contents:   IAuthenticate interface definition
  538. //
  539. //----------------------------------------------------------------------------
  540. cpp_quote("#ifndef _LPAUTHENTICATION_DEFINED")
  541. cpp_quote("#define _LPAUTHENTICATION_DEFINED")
  542.  
  543. [
  544.     local,
  545.     object,
  546.     uuid(79eac9d0-baf9-11ce-8c82-00aa004ba90b),
  547.     pointer_default(unique)
  548. ]
  549.  
  550.  
  551. interface IAuthenticate : IUnknown
  552. {
  553.     typedef [unique] IAuthenticate *LPAUTHENTICATION;
  554.  
  555.     HRESULT Authenticate(
  556.                 [out] HWND* phwnd,
  557.                 [out] LPWSTR *pszUsername,
  558.                 [out] LPWSTR *pszPassword
  559.                 );
  560. }
  561.  
  562. cpp_quote("#endif")
  563.  
  564.  
  565. //+---------------------------------------------------------------------------
  566. //
  567. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  568. //
  569. //  Contents:   IHttpNegotiate interface definition
  570. //
  571. //----------------------------------------------------------------------------
  572. cpp_quote("#ifndef _LPHTTPNEGOTIATE_DEFINED")
  573. cpp_quote("#define _LPHTTPNEGOTIATE_DEFINED")
  574.  
  575. [
  576.     object,
  577.     uuid(79eac9d2-baf9-11ce-8c82-00aa004ba90b),
  578.     pointer_default(unique)
  579. ]
  580.  
  581. interface IHttpNegotiate : IUnknown
  582. {
  583.     typedef [unique] IHttpNegotiate *LPHTTPNEGOTIATE;
  584.  
  585.     HRESULT BeginningTransaction(
  586.                 [in]         LPCWSTR szURL,
  587.                 [in, unique] LPCWSTR szHeaders,
  588.                 [in]         DWORD dwReserved,
  589.                 [out]        LPWSTR *pszAdditionalHeaders
  590.                 );
  591.  
  592.     HRESULT OnResponse(
  593.                 [in]         DWORD dwResponseCode,
  594.                 [in, unique] LPCWSTR szResponseHeaders,
  595.                 [in, unique] LPCWSTR szRequestHeaders,
  596.                 [out]        LPWSTR *pszAdditionalRequestHeaders
  597.                 );
  598. }
  599.  
  600. cpp_quote("#endif")
  601.  
  602.  
  603.  
  604. //+---------------------------------------------------------------------------
  605. //
  606. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  607. //
  608. //  Contents:   IWindowForBindingUI interface definition
  609. //
  610. //----------------------------------------------------------------------------
  611. cpp_quote("#ifndef _LPWINDOWFORBINDINGUI_DEFINED")
  612. cpp_quote("#define _LPWINDOWFORBINDINGUI_DEFINED")
  613.  
  614. [
  615.     local,
  616.     object,
  617.     uuid(79eac9d5-bafa-11ce-8c82-00aa004ba90b),
  618.     pointer_default(unique)
  619. ]
  620.  
  621. interface IWindowForBindingUI : IUnknown
  622. {
  623.     typedef [unique] IWindowForBindingUI *LPWINDOWFORBINDINGUI;
  624.  
  625.     HRESULT GetWindow(
  626.                 [in]  REFGUID rguidReason,
  627.                 [out] HWND* phwnd);
  628. }
  629.  
  630. cpp_quote("#endif")
  631.  
  632.  
  633. //+---------------------------------------------------------------------------
  634. //
  635. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  636. //
  637. //  Contents:   ICodeDownloadClient interface definition
  638. //
  639. //----------------------------------------------------------------------------
  640. cpp_quote("#ifndef _LPCODEINSTALL_DEFINED")
  641. cpp_quote("#define _LPCODEINSTALL_DEFINED")
  642.  
  643. [
  644.     local,
  645.     object,
  646.     uuid(79eac9d1-baf9-11ce-8c82-00aa004ba90b),
  647.     pointer_default(unique)
  648. ]
  649.  
  650.  
  651. interface ICodeInstall : IWindowForBindingUI
  652. {
  653.     typedef [unique] ICodeInstall *LPCODEINSTALL;
  654.  
  655.     typedef enum {
  656.         CIP_DISK_FULL,
  657.         CIP_ACCESS_DENIED,
  658.         CIP_NEWER_VERSION_EXISTS,
  659.         CIP_OLDER_VERSION_EXISTS,
  660.         CIP_NAME_CONFLICT,
  661.         CIP_TRUST_VERIFICATION_COMPONENT_MISSING,
  662.         CIP_EXE_SELF_REGISTERATION_TIMEOUT,
  663.         CIP_UNSAFE_TO_ABORT,
  664.         CIP_NEED_REBOOT
  665.     } CIP_STATUS;
  666.  
  667.     HRESULT OnCodeInstallProblem(
  668.             [in] ULONG ulStatusCode,            // contingency status
  669.             [in, unique] LPCWSTR szDestination,         // file that needs to be updated
  670.             [in, unique] LPCWSTR szSource,              // new version from 'net (a temp file)
  671.             [in] DWORD dwReserved               // for future use
  672.             );
  673.  
  674. }
  675.  
  676. cpp_quote("#endif")
  677.  
  678. //+---------------------------------------------------------------------------
  679. //
  680. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  681. //
  682. //  Contents:   IWinInetInfo interface definition
  683. //
  684. //----------------------------------------------------------------------------
  685. cpp_quote("#ifndef _LPWININETINFO_DEFINED")
  686. cpp_quote("#define _LPWININETINFO_DEFINED")
  687.  
  688. [
  689.     local,
  690.     object,
  691.     uuid(79eac9d6-bafa-11ce-8c82-00aa004ba90b),
  692.  
  693.     pointer_default(unique)
  694. ]
  695.  
  696. interface IWinInetInfo : IUnknown
  697. {
  698.  
  699.     typedef [unique] IWinInetInfo *LPWININETINFO;
  700.  
  701.     HRESULT QueryOption(
  702.             [in]      DWORD  dwOption,
  703.             [out]     LPVOID pBuffer,
  704.             [in, out] DWORD *pcbBuf);
  705.  
  706.  
  707. }
  708. cpp_quote("#endif")
  709.  
  710.  
  711.  
  712.  
  713. //+---------------------------------------------------------------------------
  714. //
  715. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  716. //
  717. //  Contents:   IHttpSecurity interface definition
  718. //
  719. //----------------------------------------------------------------------------
  720. cpp_quote("#ifndef _LPHTTPSECURITY_DEFINED")
  721. cpp_quote("#define _LPHTTPSECURITY_DEFINED")
  722.  
  723. [
  724.     local,
  725.     object,
  726.     uuid(79eac9d7-bafa-11ce-8c82-00aa004ba90b),
  727.  
  728.     pointer_default(unique)
  729. ]
  730.  
  731.  
  732. interface IHttpSecurity : IWindowForBindingUI
  733. {
  734.     typedef [unique] IHttpSecurity *LPHTTPSECURITY;
  735.  
  736.    HRESULT OnSecurityProblem(
  737.             [in] DWORD dwProblem);
  738.  
  739. }
  740. cpp_quote("#endif")
  741.  
  742.  
  743. //+---------------------------------------------------------------------------
  744. //
  745. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  746. //
  747. //  Contents:   IWinInetHttpInfo interface definition
  748. //
  749. //----------------------------------------------------------------------------
  750. cpp_quote("#ifndef _LPWININETHTTPINFO_DEFINED")
  751. cpp_quote("#define _LPWININETHTTPINFO_DEFINED")
  752.  
  753. [
  754.     local,
  755.     object,
  756.     uuid(79eac9d8-bafa-11ce-8c82-00aa004ba90b),
  757.  
  758.     pointer_default(unique)
  759. ]
  760.  
  761. interface IWinInetHttpInfo : IWinInetInfo
  762. {
  763.     typedef [unique] IWinInetHttpInfo *LPWININETHTTPINFO;
  764.  
  765.     HRESULT QueryInfo(
  766.             [in]      DWORD  dwOption,
  767.             [out]     LPVOID pBuffer,
  768.             [in, out] DWORD *pcbBuf,
  769.             [in, out] DWORD *pdwFlags,
  770.             [in, out] DWORD *pdwReserved
  771.             );
  772. }
  773. cpp_quote("#endif")
  774.  
  775. cpp_quote("#define SID_IBindHost IID_IBindHost")
  776. cpp_quote("#define SID_SBindHost IID_IBindHost")
  777.  
  778. //+---------------------------------------------------------------------------
  779. //
  780. //  Copyright (C) Microsoft Corporation, 1995 - 1996.
  781. //
  782. //  Contents:   IBindHost definition
  783. //
  784. //---------------------------------------------------------------------------
  785. cpp_quote("#ifndef _LPBINDHOST_DEFINED")
  786. cpp_quote("#define _LPBINDHOST_DEFINED")
  787.  
  788. cpp_quote("EXTERN_C const GUID SID_BindHost;")
  789. [
  790.         object,
  791.         uuid(fc4801a1-2ba9-11cf-a229-00aa003d7352),
  792.         pointer_default(unique)
  793. ]
  794. interface IBindHost : IUnknown
  795. {
  796.         typedef [unique] IBindHost *LPBINDHOST;
  797.  
  798.         HRESULT CreateMoniker(
  799.             [in]    LPOLESTR    szName,
  800.             [in]    IBindCtx   *pBC,
  801.             [out]   IMoniker**  ppmk,
  802.             [in]    DWORD       dwReserved);
  803.  
  804.         [local]
  805.         HRESULT MonikerBindToStorage(
  806.             [in]    IMoniker            *pMk,
  807.             [in]    IBindCtx            *pBC,
  808.             [in]    IBindStatusCallback *pBSC,
  809.             [in]    REFIID              riid,
  810.             [out]   void                **ppvObj);
  811.  
  812.         [call_as(MonikerBindToStorage)]
  813.         HRESULT RemoteMonikerBindToStorage(
  814.             [in, unique]    IMoniker            *pMk,
  815.             [in, unique]    IBindCtx            *pBC,
  816.             [in, unique]    IBindStatusCallback *pBSC,
  817.             [in]            REFIID riid,
  818.             [out, iid_is(riid)] IUnknown **ppvObj);
  819.  
  820.         [local]
  821.         HRESULT MonikerBindToObject(
  822.             [in]    IMoniker            *pMk,
  823.             [in]    IBindCtx            *pBC,
  824.             [in]    IBindStatusCallback *pBSC,
  825.             [in]    REFIID              riid,
  826.             [out]   void                **ppvObj);
  827.  
  828.         [call_as(MonikerBindToObject)]
  829.         HRESULT RemoteMonikerBindToObject(
  830.             [in, unique]    IMoniker            *pMk,
  831.             [in, unique]    IBindCtx            *pBC,
  832.             [in, unique]    IBindStatusCallback *pBSC,
  833.             [in]            REFIID riid,
  834.             [out, iid_is(riid)] IUnknown **ppvObj);
  835. }
  836.  
  837. cpp_quote("#endif")
  838.  
  839. // urlhlink stuff
  840. #pragma midl_echo("                                                                                                           ")
  841. cpp_quote("// These are for backwards compatibility with previous URLMON versions")
  842. #pragma midl_echo("// Flags for the UrlDownloadToCacheFile                                                                    ")
  843. #pragma midl_echo("#define URLOSTRM_USECACHEDCOPY_ONLY             0x1      // Only get from cache                            ")
  844. #pragma midl_echo("#define URLOSTRM_USECACHEDCOPY                  0x2      // Get from cache if available else download      ")
  845. #pragma midl_echo("#define URLOSTRM_GETNEWESTVERSION               0x3      // Get new version only. But put it in cache too  ")
  846. #pragma midl_echo("                                                                                                           ")
  847. #pragma midl_echo("                                                                                                           ")
  848. #pragma midl_echo("struct IBindStatusCallback;                                                                                ")
  849. #pragma midl_echo("STDAPI HlinkSimpleNavigateToString(                                                                        ")
  850. #pragma midl_echo("    /* [in] */ LPCWSTR szTarget,         // required - target document - null if local jump w/in doc       ")
  851. #pragma midl_echo("    /* [in] */ LPCWSTR szLocation,       // optional, for navigation into middle of a doc                  ")
  852. #pragma midl_echo("    /* [in] */ LPCWSTR szTargetFrameName,// optional, for targeting frame-sets                             ")
  853. #pragma midl_echo("    /* [in] */ IUnknown *pUnk,           // required - we'll search this for other necessary interfaces    ")
  854. #pragma midl_echo("    /* [in] */ IBindCtx *pbc,            // optional. caller may register an IBSC in this                  ")
  855. #pragma midl_echo("    /* [in] */ IBindStatusCallback *,                                                                      ")
  856. #pragma midl_echo("    /* [in] */ DWORD grfHLNF,            // flags                                                          ")
  857. #pragma midl_echo("    /* [in] */ DWORD dwReserved          // for future use, must be NULL                                   ")
  858. #pragma midl_echo(");                                                                                                         ")
  859. #pragma midl_echo("                                                                                                           ")
  860. #pragma midl_echo("STDAPI HlinkSimpleNavigateToMoniker(                                                                       ")
  861. #pragma midl_echo("    /* [in] */ IMoniker *pmkTarget,      // required - target document - (may be null                      ")
  862. #pragma midl_echo("    /* [in] */ LPCWSTR szLocation,       // optional, for navigation into middle of a doc                  ")
  863. #pragma midl_echo("    /* [in] */ LPCWSTR szTargetFrameName,// optional, for targeting frame-sets                             ")
  864. #pragma midl_echo("    /* [in] */ IUnknown *pUnk,           // required - we'll search this for other necessary interfaces    ")
  865. #pragma midl_echo("    /* [in] */ IBindCtx *pbc,            // optional. caller may register an IBSC in this                  ")
  866. #pragma midl_echo("    /* [in] */ IBindStatusCallback *,                                                                      ")
  867. #pragma midl_echo("    /* [in] */ DWORD grfHLNF,            // flags                                                          ")
  868. #pragma midl_echo("    /* [in] */ DWORD dwReserved          // for future use, must be NULL                                   ")
  869. #pragma midl_echo(");                                                                                                         ")
  870. //#pragma midl_echo("typedef HRESULT (STDAPICALLTYPE *LPFNUOSCALLBACK)(LPBINDSTATUSCALLBACK);                                   ")
  871. #pragma midl_echo("                                                                                                           ")
  872. #pragma midl_echo("STDAPI URLOpenStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);                                        ")
  873. #pragma midl_echo("STDAPI URLOpenStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);                                       ")
  874. #pragma midl_echo("STDAPI URLOpenPullStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);                                    ")
  875. #pragma midl_echo("STDAPI URLOpenPullStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);                                   ")
  876. #pragma midl_echo("STDAPI URLDownloadToFileA(LPUNKNOWN,LPCSTR,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);                             ")
  877. #pragma midl_echo("STDAPI URLDownloadToFileW(LPUNKNOWN,LPCWSTR,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);                           ")
  878. #pragma midl_echo("STDAPI URLDownloadToCacheFileA(LPUNKNOWN,LPCSTR,LPTSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK);                  ")
  879. #pragma midl_echo("STDAPI URLDownloadToCacheFileW(LPUNKNOWN,LPCWSTR,LPWSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK);                 ")
  880. #pragma midl_echo("STDAPI URLOpenBlockingStreamA(LPUNKNOWN,LPCSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK);                      ")
  881. #pragma midl_echo("STDAPI URLOpenBlockingStreamW(LPUNKNOWN,LPCWSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK);                     ")
  882. #pragma midl_echo("                                                                                                           ")
  883. #pragma midl_echo("#ifdef UNICODE                                                                                             ")
  884. #pragma midl_echo("#define URLOpenStream            URLOpenStreamW                                                            ")
  885. #pragma midl_echo("#define URLOpenPullStream        URLOpenPullStreamW                                                        ")
  886. #pragma midl_echo("#define URLDownloadToFile        URLDownloadToFileW                                                        ")
  887. #pragma midl_echo("#define URLDownloadToCacheFile   URLDownloadToCacheFileW                                                   ")
  888. #pragma midl_echo("#define URLOpenBlockingStream    URLOpenBlockingStreamW                                                    ")
  889. #pragma midl_echo("#else                                                                                                      ")
  890. #pragma midl_echo("#define URLOpenStream            URLOpenStreamA                                                            ")
  891. #pragma midl_echo("#define URLOpenPullStream        URLOpenPullStreamA                                                        ")
  892. #pragma midl_echo("#define URLDownloadToFile        URLDownloadToFileA                                                        ")
  893. #pragma midl_echo("#define URLDownloadToCacheFile   URLDownloadToCacheFileA                                                   ")
  894. #pragma midl_echo("#define URLOpenBlockingStream    URLOpenBlockingStreamA                                                    ")
  895. #pragma midl_echo("#endif // !UNICODE                                                                                         ")
  896. #pragma midl_echo("                                                                                                           ")
  897. #pragma midl_echo("                                                                                                           ")
  898. #pragma midl_echo("STDAPI HlinkGoBack(IUnknown *pUnk);                                                                        ")
  899. #pragma midl_echo("STDAPI HlinkGoForward(IUnknown *pUnk);                                                                     ")
  900. #pragma midl_echo("STDAPI HlinkNavigateString(IUnknown *pUnk, LPCWSTR szTarget);                                              ")
  901. #pragma midl_echo("STDAPI HlinkNavigateMoniker(IUnknown *pUnk, IMoniker *pmkTarget);                                          ")
  902. #pragma midl_echo("                                                                                                           ")
  903. // urlhlink end
  904.