/*** Autogenerated by WIDL 0.1 from urlmon.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.h>

#ifndef __WIDL_URLMON_H
#define __WIDL_URLMON_H
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long HANDLE_PTR;

#include "objidl.h"
#include "oleidl.h"
#include "servprov.h"
typedef struct IPersistMoniker IPersistMoniker;
typedef struct IBindProtocol IBindProtocol;
typedef struct IBinding IBinding;
typedef struct IBindStatusCallback IBindStatusCallback;
typedef struct IBindStatusCallbackMsg IBindStatusCallbackMsg;
typedef struct IAuthenticate IAuthenticate;
typedef struct IWindowForBindingUI IWindowForBindingUI;
typedef struct ICodeInstall ICodeInstall;
typedef struct IHttpNegotiate IHttpNegotiate;
typedef struct IHttpNegotiate2 IHttpNegotiate2;
#define MK_S_ASYNCHRONOUS                0x000401E8
#define S_ASYNCHRONOUS                   MK_S_ASYNCHRONOUS
#define INET_E_ERROR_FIRST               0x800C0002L
#define INET_E_INVALID_URL               0x800C0002L
#define INET_E_NO_SESSION                0x800C0003L
#define INET_E_CANNOT_CONNECT            0x800C0004L
#define INET_E_RESOURCE_NOT_FOUND        0x800C0005L
#define INET_E_OBJECT_NOT_FOUND          0x800C0006L
#define INET_E_DATA_NOT_AVAILABLE        0x800C0007L
#define INET_E_DOWNLOAD_FAILURE          0x800C0008L
#define INET_E_AUTHENTICATION_REQUIRED   0x800C0009L
#define INET_E_NO_VALID_MEDIA            0x800C000AL
#define INET_E_CONNECTION_TIMEOUT        0x800C000BL
#define INET_E_INVALID_REQUEST           0x800C000CL
#define INET_E_UNKNOWN_PROTOCOL          0x800C000DL
#define INET_E_SECURITY_PROBLEM          0x800C000EL
#define INET_E_CANNOT_LOAD_DATA          0x800C000FL
#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
#define INET_E_QUERYOPTION_UNKNOWN       0x800C0013L
#define INET_E_REDIRECT_FAILED           0x800C0014L
#define INET_E_REDIRECT_TO_DIR           0x800C0015L
#define INET_E_CANNOT_LOCK_REQUEST       0x800C0016L
#define INET_E_ERROR_LAST                INET_E_REDIRECT_TO_DIR
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk);
HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbsc, DWORD dwReserved);
HRESULT WINAPI CompareSecurityIds(BYTE*,DWORD,BYTE*,DWORD,DWORD);
HRESULT WINAPI CoInternetGetSession(DWORD,/*IInternetSession*/void**,DWORD);
HRESULT WINAPI MkParseDisplayNameEx(IBindCtx*,LPCWSTR,ULONG*,IMoniker**);
HRESULT WINAPI IsAsyncMoniker(IMoniker* pmk);
HRESULT WINAPI CreateAsyncBindCtx(DWORD, IBindStatusCallback*, IEnumFORMATETC*, IBindCtx**);
typedef IPersistMoniker *LPPERSISTMONIKER;

/*****************************************************************************
 * IPersistMoniker interface
 */
#ifndef __IPersistMoniker_INTERFACE_DEFINED__
#define __IPersistMoniker_INTERFACE_DEFINED__

DEFINE_GUID(IID_IPersistMoniker, 0x79eac9c9, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IPersistMoniker: IUnknown {

    virtual HRESULT CALLBACK GetClassID(
        CLSID* pClassID) = 0;

    virtual HRESULT CALLBACK IsDirty(
        ) = 0;

    virtual HRESULT CALLBACK Load(
        BOOL fFullyAvailable,
        IMoniker* pimkName,
        LPBC pibc,
        DWORD grfMode) = 0;

    virtual HRESULT CALLBACK Save(
        IMoniker* pimkName,
        LPBC pbc,
        BOOL fRemember) = 0;

    virtual HRESULT CALLBACK SaveCompleted(
        IMoniker* pimkName,
        LPBC pibc) = 0;

    virtual HRESULT CALLBACK GetCurMoniker(
        IMoniker** ppimkName) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IPersistMonikerVtbl IPersistMonikerVtbl;
struct IPersistMoniker {
    const IPersistMonikerVtbl* lpVtbl;
};
struct IPersistMonikerVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IPersistMoniker* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IPersistMoniker* This);

    ULONG (CALLBACK *Release)(
        IPersistMoniker* This);

    /*** IPersistMoniker methods ***/
    HRESULT (CALLBACK *GetClassID)(
        IPersistMoniker* This,
        CLSID* pClassID);

    HRESULT (CALLBACK *IsDirty)(
        IPersistMoniker* This);

    HRESULT (CALLBACK *Load)(
        IPersistMoniker* This,
        BOOL fFullyAvailable,
        IMoniker* pimkName,
        LPBC pibc,
        DWORD grfMode);

    HRESULT (CALLBACK *Save)(
        IPersistMoniker* This,
        IMoniker* pimkName,
        LPBC pbc,
        BOOL fRemember);

    HRESULT (CALLBACK *SaveCompleted)(
        IPersistMoniker* This,
        IMoniker* pimkName,
        LPBC pibc);

    HRESULT (CALLBACK *GetCurMoniker)(
        IPersistMoniker* This,
        IMoniker** ppimkName);

};

#define IPersistMoniker_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,GetClassID,CLSID*,pClassID) \
    ICOM_METHOD  (HRESULT,IsDirty) \
    ICOM_METHOD4 (HRESULT,Load,BOOL,fFullyAvailable,IMoniker*,pimkName,LPBC,pibc,DWORD,grfMode) \
    ICOM_METHOD3 (HRESULT,Save,IMoniker*,pimkName,LPBC,pbc,BOOL,fRemember) \
    ICOM_METHOD2 (HRESULT,SaveCompleted,IMoniker*,pimkName,LPBC,pibc) \
    ICOM_METHOD1 (HRESULT,GetCurMoniker,IMoniker**,ppimkName)

/*** IUnknown methods ***/
#define IPersistMoniker_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IPersistMoniker_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IPersistMoniker_Release(p) (p)->lpVtbl->Release(p)
/*** IPersistMoniker methods ***/
#define IPersistMoniker_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
#define IPersistMoniker_IsDirty(p) (p)->lpVtbl->IsDirty(p)
#define IPersistMoniker_Load(p,a,b,c,d) (p)->lpVtbl->Load(p,a,b,c,d)
#define IPersistMoniker_Save(p,a,b,c) (p)->lpVtbl->Save(p,a,b,c)
#define IPersistMoniker_SaveCompleted(p,a,b) (p)->lpVtbl->SaveCompleted(p,a,b)
#define IPersistMoniker_GetCurMoniker(p,a) (p)->lpVtbl->GetCurMoniker(p,a)

#endif

HRESULT CALLBACK IPersistMoniker_GetClassID_Proxy(
    IPersistMoniker* This,
    CLSID* pClassID);
void __RPC_STUB IPersistMoniker_GetClassID_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IPersistMoniker_IsDirty_Proxy(
    IPersistMoniker* This);
void __RPC_STUB IPersistMoniker_IsDirty_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IPersistMoniker_Load_Proxy(
    IPersistMoniker* This,
    BOOL fFullyAvailable,
    IMoniker* pimkName,
    LPBC pibc,
    DWORD grfMode);
void __RPC_STUB IPersistMoniker_Load_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IPersistMoniker_Save_Proxy(
    IPersistMoniker* This,
    IMoniker* pimkName,
    LPBC pbc,
    BOOL fRemember);
void __RPC_STUB IPersistMoniker_Save_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IPersistMoniker_SaveCompleted_Proxy(
    IPersistMoniker* This,
    IMoniker* pimkName,
    LPBC pibc);
void __RPC_STUB IPersistMoniker_SaveCompleted_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IPersistMoniker_GetCurMoniker_Proxy(
    IPersistMoniker* This,
    IMoniker** ppimkName);
void __RPC_STUB IPersistMoniker_GetCurMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IPersistMoniker_INTERFACE_DEFINED__ */

typedef struct IMonikerProp IMonikerProp;
typedef IMonikerProp *LPMONIKERPROP;

typedef enum {
    MIMETYPEPROP = 0x0
} MONIKERPROPERTY;

/*****************************************************************************
 * IMonikerProp interface
 */
#ifndef __IMonikerProp_INTERFACE_DEFINED__
#define __IMonikerProp_INTERFACE_DEFINED__

DEFINE_GUID(IID_IMonikerProp, 0xa5ca5f7f, 0x1847, 0x4d87, 0x9c,0x5b, 0x91,0x85,0x09,0xf7,0x51,0x1d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMonikerProp: IUnknown {

    virtual HRESULT CALLBACK PutProperty(
        MONIKERPROPERTY mkp,
        LPCWSTR val) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IMonikerPropVtbl IMonikerPropVtbl;
struct IMonikerProp {
    const IMonikerPropVtbl* lpVtbl;
};
struct IMonikerPropVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IMonikerProp* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IMonikerProp* This);

    ULONG (CALLBACK *Release)(
        IMonikerProp* This);

    /*** IMonikerProp methods ***/
    HRESULT (CALLBACK *PutProperty)(
        IMonikerProp* This,
        MONIKERPROPERTY mkp,
        LPCWSTR val);

};

#define IMonikerProp_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,PutProperty,MONIKERPROPERTY,mkp,LPCWSTR,val)

/*** IUnknown methods ***/
#define IMonikerProp_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMonikerProp_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMonikerProp_Release(p) (p)->lpVtbl->Release(p)
/*** IMonikerProp methods ***/
#define IMonikerProp_PutProperty(p,a,b) (p)->lpVtbl->PutProperty(p,a,b)

#endif

HRESULT CALLBACK IMonikerProp_PutProperty_Proxy(
    IMonikerProp* This,
    MONIKERPROPERTY mkp,
    LPCWSTR val);
void __RPC_STUB IMonikerProp_PutProperty_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IMonikerProp_INTERFACE_DEFINED__ */

typedef IBindProtocol *LPBINDPROTOCOL;

/*****************************************************************************
 * IBindProtocol interface
 */
#ifndef __IBindProtocol_INTERFACE_DEFINED__
#define __IBindProtocol_INTERFACE_DEFINED__

DEFINE_GUID(IID_IBindProtocol, 0x79eac9cd, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IBindProtocol: IUnknown {

    virtual HRESULT CALLBACK CreateBinding(
        LPCWSTR szUrl,
        IBindCtx* pbc,
        IBinding** ppb) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IBindProtocolVtbl IBindProtocolVtbl;
struct IBindProtocol {
    const IBindProtocolVtbl* lpVtbl;
};
struct IBindProtocolVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IBindProtocol* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IBindProtocol* This);

    ULONG (CALLBACK *Release)(
        IBindProtocol* This);

    /*** IBindProtocol methods ***/
    HRESULT (CALLBACK *CreateBinding)(
        IBindProtocol* This,
        LPCWSTR szUrl,
        IBindCtx* pbc,
        IBinding** ppb);

};

#define IBindProtocol_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,CreateBinding,LPCWSTR,szUrl,IBindCtx*,pbc,IBinding**,ppb)

/*** IUnknown methods ***/
#define IBindProtocol_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IBindProtocol_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IBindProtocol_Release(p) (p)->lpVtbl->Release(p)
/*** IBindProtocol methods ***/
#define IBindProtocol_CreateBinding(p,a,b,c) (p)->lpVtbl->CreateBinding(p,a,b,c)

#endif

HRESULT CALLBACK IBindProtocol_CreateBinding_Proxy(
    IBindProtocol* This,
    LPCWSTR szUrl,
    IBindCtx* pbc,
    IBinding** ppb);
void __RPC_STUB IBindProtocol_CreateBinding_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IBindProtocol_INTERFACE_DEFINED__ */

typedef IBinding *LPBINDING;

/*****************************************************************************
 * IBinding interface
 */
#ifndef __IBinding_INTERFACE_DEFINED__
#define __IBinding_INTERFACE_DEFINED__

DEFINE_GUID(IID_IBinding, 0x79eac9c0, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IBinding: IUnknown {

    virtual HRESULT CALLBACK Abort(
        ) = 0;

    virtual HRESULT CALLBACK Suspend(
        ) = 0;

    virtual HRESULT CALLBACK Resume(
        ) = 0;

    virtual HRESULT CALLBACK SetPriority(
        LONG nPriority) = 0;

    virtual HRESULT CALLBACK GetPriority(
        LONG* pnPriority) = 0;

    virtual HRESULT CALLBACK GetBindResult(
        CLSID* pclsidProtocol,
        DWORD* pdwResult,
        LPOLESTR* pszResult,
        DWORD* pdwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IBindingVtbl IBindingVtbl;
struct IBinding {
    const IBindingVtbl* lpVtbl;
};
struct IBindingVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IBinding* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IBinding* This);

    ULONG (CALLBACK *Release)(
        IBinding* This);

    /*** IBinding methods ***/
    HRESULT (CALLBACK *Abort)(
        IBinding* This);

    HRESULT (CALLBACK *Suspend)(
        IBinding* This);

    HRESULT (CALLBACK *Resume)(
        IBinding* This);

    HRESULT (CALLBACK *SetPriority)(
        IBinding* This,
        LONG nPriority);

    HRESULT (CALLBACK *GetPriority)(
        IBinding* This,
        LONG* pnPriority);

    HRESULT (CALLBACK *GetBindResult)(
        IBinding* This,
        CLSID* pclsidProtocol,
        DWORD* pdwResult,
        LPOLESTR* pszResult,
        DWORD* pdwReserved);

};

#define IBinding_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD  (HRESULT,Abort) \
    ICOM_METHOD  (HRESULT,Suspend) \
    ICOM_METHOD  (HRESULT,Resume) \
    ICOM_METHOD1 (HRESULT,SetPriority,LONG,nPriority) \
    ICOM_METHOD1 (HRESULT,GetPriority,LONG*,pnPriority) \
    ICOM_METHOD4 (HRESULT,GetBindResult,CLSID*,pclsidProtocol,DWORD*,pdwResult,LPOLESTR*,pszResult,DWORD*,pdwReserved)

/*** IUnknown methods ***/
#define IBinding_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IBinding_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IBinding_Release(p) (p)->lpVtbl->Release(p)
/*** IBinding methods ***/
#define IBinding_Abort(p) (p)->lpVtbl->Abort(p)
#define IBinding_Suspend(p) (p)->lpVtbl->Suspend(p)
#define IBinding_Resume(p) (p)->lpVtbl->Resume(p)
#define IBinding_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
#define IBinding_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
#define IBinding_GetBindResult(p,a,b,c,d) (p)->lpVtbl->GetBindResult(p,a,b,c,d)

#endif

HRESULT CALLBACK IBinding_Abort_Proxy(
    IBinding* This);
void __RPC_STUB IBinding_Abort_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBinding_Suspend_Proxy(
    IBinding* This);
void __RPC_STUB IBinding_Suspend_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBinding_Resume_Proxy(
    IBinding* This);
void __RPC_STUB IBinding_Resume_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBinding_SetPriority_Proxy(
    IBinding* This,
    LONG nPriority);
void __RPC_STUB IBinding_SetPriority_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBinding_GetPriority_Proxy(
    IBinding* This,
    LONG* pnPriority);
void __RPC_STUB IBinding_GetPriority_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBinding_RemoteGetBindResult_Proxy(
    IBinding* This,
    CLSID* pclsidProtocol,
    DWORD* pdwResult,
    LPOLESTR* pszResult,
    DWORD dwReserved);
void __RPC_STUB IBinding_RemoteGetBindResult_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBinding_GetBindResult_Proxy(
    IBinding* This,
    CLSID* pclsidProtocol,
    DWORD* pdwResult,
    LPOLESTR* pszResult,
    DWORD* pdwReserved);
HRESULT __RPC_STUB IBinding_GetBindResult_Stub(
    IBinding* This,
    CLSID* pclsidProtocol,
    DWORD* pdwResult,
    LPOLESTR* pszResult,
    DWORD dwReserved);

#endif  /* __IBinding_INTERFACE_DEFINED__ */

typedef IBindStatusCallback *LPBINDSTATUSCALLBACK;

typedef enum {
    BINDVERB_GET = 0x0,
    BINDVERB_POST = 0x1,
    BINDVERB_PUT = 0x2,
    BINDVERB_CUSTOM = 0x3
} BINDVERB;

typedef enum {
    BINDINFOF_URLENCODESTGMEDDATA = 0x1,
    BINDINFOF_URLENCODEDEXTRAINFO = 0x2
} BINDINFOF;

typedef enum {
    BINDF_ASYNCHRONOUS = 0x1,
    BINDF_ASYNCSTORAGE = 0x2,
    BINDF_NOPROGRESSIVERENDERING = 0x4,
    BINDF_OFFLINEOPERATION = 0x8,
    BINDF_GETNEWESTVERSION = 0x10,
    BINDF_NOWRITECACHE = 0x20,
    BINDF_NEEDFILE = 0x40,
    BINDF_PULLDATA = 0x80,
    BINDF_IGNORESECURITYPROBLEM = 0x100,
    BINDF_RESYNCHRONIZE = 0x200,
    BINDF_HYPERLINK = 0x400,
    BINDF_NO_UI = 0x800,
    BINDF_SILENTOPERATION = 0x1000,
    BINDF_PRAGMA_NO_CACHE = 0x2000,
    BINDF_GETCLASSOBJECT = 0x4000,
    BINDF_RESERVED_1 = 0x8000,
    BINDF_FREE_THREADED = 0x10000,
    BINDF_DIRECT_READ = 0x20000,
    BINDF_FORMS_SUBMIT = 0x40000,
    BINDF_GETFROMCACHE_IF_NET_FAIL = 0x80000,
    BINDF_FROMURLMON = 0x100000,
    BINDF_FWD_BACK = 0x200000,
    BINDF_PREFERDEFAULTHANDLER = 0x400000,
    BINDF_ENFORCERESTRICTED = 0x800000
} BINDF;

typedef enum {
    URL_ENCODING_NONE = 0x0,
    URL_ENCODING_ENABLE_UTF8 = 0x10000000,
    URL_ENCODING_DISABLE_UTF8 = 0x20000000
} URL_ENCODING;

typedef struct _tagBINDINFO {
    ULONG cbSize;
    LPWSTR szExtraInfo;
    STGMEDIUM stgmedData;
    DWORD grfBindInfoF;
    DWORD dwBindVerb;
    LPWSTR szCustomVerb;
    DWORD cbstgmedData;
    DWORD dwOptions;
    DWORD dwOptionsFlags;
    DWORD dwCodePage;
    SECURITY_ATTRIBUTES securityAttributes;
    IID iid;
    IUnknown *pUnk;
    DWORD dwReserved;
} BINDINFO;

typedef struct _REMSECURITY_ATTRIBUTES {
    DWORD nLength;
    DWORD lpSecurityDescriptor;
    BOOL bInheritHandle;
} REMSECURITY_ATTRIBUTES, *PREMSECURITY_ATTRIBUTES, *LPREMSECURITY_ATTRIBUTES;

typedef struct _tagRemBINDINFO {
    ULONG cbSize;
    LPWSTR szExtraInfo;
    DWORD grfBindInfoF;
    DWORD dwBindVerb;
    LPWSTR szCustomVerb;
    DWORD cbstgmedData;
    DWORD dwOptions;
    DWORD dwOptionsFlags;
    DWORD dwCodePage;
    REMSECURITY_ATTRIBUTES securityAttributes;
    IID iid;
    IUnknown *pUnk;
    DWORD dwReserved;
} RemBINDINFO;

typedef struct tagRemFORMATETC {
    DWORD cfFormat;
    DWORD ptd;
    DWORD dwAspect;
    LONG lindex;
    DWORD tymed;
} RemFORMATETC, *LPREMFORMATETC;

typedef enum {
    BINDINFO_OPTIONS_WININETFLAG = 0x10000,
    BINDINFO_OPTIONS_ENABLE_UTF8 = 0x20000,
    BINDINFO_OPTIONS_DISABLE_UTF8 = 0x40000,
    BINDINFO_OPTIONS_USE_IE_ENCODING = 0x80000,
    BINDINFO_OPTIONS_BINDTOOBJECT = 0x100000
} BINDINFO_OPTIONS;

typedef enum {
    BSCF_FIRSTDATANOTIFICATION = 0x1,
    BSCF_INTERMEDIATEDATANOTIFICATION = 0x2,
    BSCF_LASTDATANOTIFICATION = 0x4,
    BSCF_DATAFULLYAVAILABLE = 0x8,
    BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10
} BSCF;

typedef enum tagBINDSTATUS {
    BINDSTATUS_FINDINGRESOURCE = 1,
    BINDSTATUS_CONNECTING,
    BINDSTATUS_REDIRECTING,
    BINDSTATUS_BEGINDOWNLOADDATA,
    BINDSTATUS_DOWNLOADINGDATA,
    BINDSTATUS_ENDDOWNLOADDATA,
    BINDSTATUS_BEGINDOWNLOADCOMPONENTS,
    BINDSTATUS_INSTALLINGCOMPONENTS,
    BINDSTATUS_ENDDOWNLOADCOMPONENTS,
    BINDSTATUS_USINGCACHEDCOPY,
    BINDSTATUS_SENDINGREQUEST,
    BINDSTATUS_CLASSIDAVAILABLE,
    BINDSTATUS_MIMETYPEAVAILABLE,
    BINDSTATUS_CACHEFILENAMEAVAILABLE,
    BINDSTATUS_BEGINSYNCOPERATION,
    BINDSTATUS_ENDSYNCOPERATION,
    BINDSTATUS_BEGINUPLOADDATA,
    BINDSTATUS_UPLOADINGDATA,
    BINDSTATUS_ENDUPLOADDATA,
    BINDSTATUS_PROTOCOLCLASSID,
    BINDSTATUS_ENCODING,
    BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
    BINDSTATUS_CLASSINSTALLLOCATION,
    BINDSTATUS_DECODING,
    BINDSTATUS_LOADINGMIMEHANDLER,
    BINDSTATUS_CONTENTDISPOSITIONATTACH,
    BINDSTATUS_FILTERREPORTMIMETYPE,
    BINDSTATUS_CLSIDCANINSTANTIATE,
    BINDSTATUS_IUNKNOWNAVAILABLE,
    BINDSTATUS_DIRECTBIND,
    BINDSTATUS_RAWMIMETYPE,
    BINDSTATUS_PROXYDETECTING,
    BINDSTATUS_ACCEPTRANGES,
    BINDSTATUS_COOKIE_SENT,
    BINDSTATUS_COMPACT_POLICY_RECEIVED,
    BINDSTATUS_COOKIE_SUPPRESSED,
    BINDSTATUS_COOKIE_STATE_UNKNOWN,
    BINDSTATUS_COOKIE_STATE_ACCEPT,
    BINDSTATUS_COOKIE_STATE_REJECT,
    BINDSTATUS_COOKIE_STATE_PROMPT,
    BINDSTATUS_COOKIE_STATE_LEASH,
    BINDSTATUS_COOKIE_STATE_DOWNGRADE,
    BINDSTATUS_POLICY_HREF,
    BINDSTATUS_P3P_HEADER,
    BINDSTATUS_SESSION_COOKIE_RECEIVED,
    BINDSTATUS_PERSISTENT_COOKIE_RECEIVED,
    BINDSTATUS_SESSION_COOKIES_ALLOWED
} BINDSTATUS;

/*****************************************************************************
 * IBindStatusCallback interface
 */
#ifndef __IBindStatusCallback_INTERFACE_DEFINED__
#define __IBindStatusCallback_INTERFACE_DEFINED__

DEFINE_GUID(IID_IBindStatusCallback, 0x79eac9c1, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IBindStatusCallback: IUnknown {

    virtual HRESULT CALLBACK OnStartBinding(
        DWORD dwReserved,
        IBinding* pib) = 0;

    virtual HRESULT CALLBACK GetPriority(
        LONG* pnPriority) = 0;

    virtual HRESULT CALLBACK OnLowResource(
        DWORD reserved) = 0;

    virtual HRESULT CALLBACK OnProgress(
        ULONG ulProgress,
        ULONG ulProgressMax,
        ULONG ulStatusCode,
        LPCWSTR szStatusText) = 0;

    virtual HRESULT CALLBACK OnStopBinding(
        HRESULT hresult,
        LPCWSTR szError) = 0;

    virtual HRESULT CALLBACK GetBindInfo(
        DWORD* grfBINDF,
        BINDINFO* pbindinfo) = 0;

    virtual HRESULT CALLBACK OnDataAvailable(
        DWORD grfBSCF,
        DWORD dwSize,
        FORMATETC* pformatetc,
        STGMEDIUM* pstgmed) = 0;

    virtual HRESULT CALLBACK OnObjectAvailable(
        REFIID riid,
        IUnknown* punk) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IBindStatusCallbackVtbl IBindStatusCallbackVtbl;
struct IBindStatusCallback {
    const IBindStatusCallbackVtbl* lpVtbl;
};
struct IBindStatusCallbackVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IBindStatusCallback* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IBindStatusCallback* This);

    ULONG (CALLBACK *Release)(
        IBindStatusCallback* This);

    /*** IBindStatusCallback methods ***/
    HRESULT (CALLBACK *OnStartBinding)(
        IBindStatusCallback* This,
        DWORD dwReserved,
        IBinding* pib);

    HRESULT (CALLBACK *GetPriority)(
        IBindStatusCallback* This,
        LONG* pnPriority);

    HRESULT (CALLBACK *OnLowResource)(
        IBindStatusCallback* This,
        DWORD reserved);

    HRESULT (CALLBACK *OnProgress)(
        IBindStatusCallback* This,
        ULONG ulProgress,
        ULONG ulProgressMax,
        ULONG ulStatusCode,
        LPCWSTR szStatusText);

    HRESULT (CALLBACK *OnStopBinding)(
        IBindStatusCallback* This,
        HRESULT hresult,
        LPCWSTR szError);

    HRESULT (CALLBACK *GetBindInfo)(
        IBindStatusCallback* This,
        DWORD* grfBINDF,
        BINDINFO* pbindinfo);

    HRESULT (CALLBACK *OnDataAvailable)(
        IBindStatusCallback* This,
        DWORD grfBSCF,
        DWORD dwSize,
        FORMATETC* pformatetc,
        STGMEDIUM* pstgmed);

    HRESULT (CALLBACK *OnObjectAvailable)(
        IBindStatusCallback* This,
        REFIID riid,
        IUnknown* punk);

};

#define IBindStatusCallback_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,OnStartBinding,DWORD,dwReserved,IBinding*,pib) \
    ICOM_METHOD1 (HRESULT,GetPriority,LONG*,pnPriority) \
    ICOM_METHOD1 (HRESULT,OnLowResource,DWORD,reserved) \
    ICOM_METHOD4 (HRESULT,OnProgress,ULONG,ulProgress,ULONG,ulProgressMax,ULONG,ulStatusCode,LPCWSTR,szStatusText) \
    ICOM_METHOD2 (HRESULT,OnStopBinding,HRESULT,hresult,LPCWSTR,szError) \
    ICOM_METHOD2 (HRESULT,GetBindInfo,DWORD*,grfBINDF,BINDINFO*,pbindinfo) \
    ICOM_METHOD4 (HRESULT,OnDataAvailable,DWORD,grfBSCF,DWORD,dwSize,FORMATETC*,pformatetc,STGMEDIUM*,pstgmed) \
    ICOM_METHOD2 (HRESULT,OnObjectAvailable,REFIID,riid,IUnknown*,punk)

/*** IUnknown methods ***/
#define IBindStatusCallback_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IBindStatusCallback_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IBindStatusCallback_Release(p) (p)->lpVtbl->Release(p)
/*** IBindStatusCallback methods ***/
#define IBindStatusCallback_OnStartBinding(p,a,b) (p)->lpVtbl->OnStartBinding(p,a,b)
#define IBindStatusCallback_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
#define IBindStatusCallback_OnLowResource(p,a) (p)->lpVtbl->OnLowResource(p,a)
#define IBindStatusCallback_OnProgress(p,a,b,c,d) (p)->lpVtbl->OnProgress(p,a,b,c,d)
#define IBindStatusCallback_OnStopBinding(p,a,b) (p)->lpVtbl->OnStopBinding(p,a,b)
#define IBindStatusCallback_GetBindInfo(p,a,b) (p)->lpVtbl->GetBindInfo(p,a,b)
#define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) (p)->lpVtbl->OnDataAvailable(p,a,b,c,d)
#define IBindStatusCallback_OnObjectAvailable(p,a,b) (p)->lpVtbl->OnObjectAvailable(p,a,b)

#endif

HRESULT CALLBACK IBindStatusCallback_OnStartBinding_Proxy(
    IBindStatusCallback* This,
    DWORD dwReserved,
    IBinding* pib);
void __RPC_STUB IBindStatusCallback_OnStartBinding_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_GetPriority_Proxy(
    IBindStatusCallback* This,
    LONG* pnPriority);
void __RPC_STUB IBindStatusCallback_GetPriority_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_OnLowResource_Proxy(
    IBindStatusCallback* This,
    DWORD reserved);
void __RPC_STUB IBindStatusCallback_OnLowResource_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_OnProgress_Proxy(
    IBindStatusCallback* This,
    ULONG ulProgress,
    ULONG ulProgressMax,
    ULONG ulStatusCode,
    LPCWSTR szStatusText);
void __RPC_STUB IBindStatusCallback_OnProgress_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_OnStopBinding_Proxy(
    IBindStatusCallback* This,
    HRESULT hresult,
    LPCWSTR szError);
void __RPC_STUB IBindStatusCallback_OnStopBinding_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_RemoteGetBindInfo_Proxy(
    IBindStatusCallback* This,
    DWORD* grfBINDF,
    RemBINDINFO* pbindinfo,
    RemSTGMEDIUM* pstgmed);
void __RPC_STUB IBindStatusCallback_RemoteGetBindInfo_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_GetBindInfo_Proxy(
    IBindStatusCallback* This,
    DWORD* grfBINDF,
    BINDINFO* pbindinfo);
HRESULT __RPC_STUB IBindStatusCallback_GetBindInfo_Stub(
    IBindStatusCallback* This,
    DWORD* grfBINDF,
    RemBINDINFO* pbindinfo,
    RemSTGMEDIUM* pstgmed);
HRESULT CALLBACK IBindStatusCallback_RemoteOnDataAvailable_Proxy(
    IBindStatusCallback* This,
    DWORD grfBSCF,
    DWORD dwSize,
    RemFORMATETC* pformatetc,
    RemSTGMEDIUM* pstgmed);
void __RPC_STUB IBindStatusCallback_RemoteOnDataAvailable_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindStatusCallback_OnDataAvailable_Proxy(
    IBindStatusCallback* This,
    DWORD grfBSCF,
    DWORD dwSize,
    FORMATETC* pformatetc,
    STGMEDIUM* pstgmed);
HRESULT __RPC_STUB IBindStatusCallback_OnDataAvailable_Stub(
    IBindStatusCallback* This,
    DWORD grfBSCF,
    DWORD dwSize,
    RemFORMATETC* pformatetc,
    RemSTGMEDIUM* pstgmed);
HRESULT CALLBACK IBindStatusCallback_OnObjectAvailable_Proxy(
    IBindStatusCallback* This,
    REFIID riid,
    IUnknown* punk);
void __RPC_STUB IBindStatusCallback_OnObjectAvailable_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IBindStatusCallback_INTERFACE_DEFINED__ */

typedef IAuthenticate *LPAUTHENTICATION;

/*****************************************************************************
 * IAuthenticate interface
 */
#ifndef __IAuthenticate_INTERFACE_DEFINED__
#define __IAuthenticate_INTERFACE_DEFINED__

DEFINE_GUID(IID_IAuthenticate, 0x79eac9d0, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAuthenticate: IUnknown {

    virtual HRESULT CALLBACK Authenticate(
        HWND* phwnd,
        LPWSTR* pszUsername,
        LPWSTR* pszPassword) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IAuthenticateVtbl IAuthenticateVtbl;
struct IAuthenticate {
    const IAuthenticateVtbl* lpVtbl;
};
struct IAuthenticateVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IAuthenticate* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IAuthenticate* This);

    ULONG (CALLBACK *Release)(
        IAuthenticate* This);

    /*** IAuthenticate methods ***/
    HRESULT (CALLBACK *Authenticate)(
        IAuthenticate* This,
        HWND* phwnd,
        LPWSTR* pszUsername,
        LPWSTR* pszPassword);

};

#define IAuthenticate_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,Authenticate,HWND*,phwnd,LPWSTR*,pszUsername,LPWSTR*,pszPassword)

/*** IUnknown methods ***/
#define IAuthenticate_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAuthenticate_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAuthenticate_Release(p) (p)->lpVtbl->Release(p)
/*** IAuthenticate methods ***/
#define IAuthenticate_Authenticate(p,a,b,c) (p)->lpVtbl->Authenticate(p,a,b,c)

#endif

HRESULT CALLBACK IAuthenticate_Authenticate_Proxy(
    IAuthenticate* This,
    HWND* phwnd,
    LPWSTR* pszUsername,
    LPWSTR* pszPassword);
void __RPC_STUB IAuthenticate_Authenticate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IAuthenticate_INTERFACE_DEFINED__ */

typedef IHttpNegotiate *LPHTTPNEGOTIATE;

/*****************************************************************************
 * IHttpNegotiate interface
 */
#ifndef __IHttpNegotiate_INTERFACE_DEFINED__
#define __IHttpNegotiate_INTERFACE_DEFINED__

DEFINE_GUID(IID_IHttpNegotiate, 0x79eac9d2, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IHttpNegotiate: IUnknown {

    virtual HRESULT CALLBACK BeginningTransaction(
        LPCWSTR szURL,
        LPCWSTR szHeaders,
        DWORD dwReserved,
        LPWSTR* pszAdditionalHeaders) = 0;

    virtual HRESULT CALLBACK OnResponse(
        DWORD dwResponseCode,
        LPCWSTR szResponseHeaders,
        LPCWSTR szRequestHeaders,
        LPWSTR* pszAdditionalRequestHeaders) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IHttpNegotiateVtbl IHttpNegotiateVtbl;
struct IHttpNegotiate {
    const IHttpNegotiateVtbl* lpVtbl;
};
struct IHttpNegotiateVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IHttpNegotiate* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IHttpNegotiate* This);

    ULONG (CALLBACK *Release)(
        IHttpNegotiate* This);

    /*** IHttpNegotiate methods ***/
    HRESULT (CALLBACK *BeginningTransaction)(
        IHttpNegotiate* This,
        LPCWSTR szURL,
        LPCWSTR szHeaders,
        DWORD dwReserved,
        LPWSTR* pszAdditionalHeaders);

    HRESULT (CALLBACK *OnResponse)(
        IHttpNegotiate* This,
        DWORD dwResponseCode,
        LPCWSTR szResponseHeaders,
        LPCWSTR szRequestHeaders,
        LPWSTR* pszAdditionalRequestHeaders);

};

#define IHttpNegotiate_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD4 (HRESULT,BeginningTransaction,LPCWSTR,szURL,LPCWSTR,szHeaders,DWORD,dwReserved,LPWSTR*,pszAdditionalHeaders) \
    ICOM_METHOD4 (HRESULT,OnResponse,DWORD,dwResponseCode,LPCWSTR,szResponseHeaders,LPCWSTR,szRequestHeaders,LPWSTR*,pszAdditionalRequestHeaders)

/*** IUnknown methods ***/
#define IHttpNegotiate_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IHttpNegotiate_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IHttpNegotiate_Release(p) (p)->lpVtbl->Release(p)
/*** IHttpNegotiate methods ***/
#define IHttpNegotiate_BeginningTransaction(p,a,b,c,d) (p)->lpVtbl->BeginningTransaction(p,a,b,c,d)
#define IHttpNegotiate_OnResponse(p,a,b,c,d) (p)->lpVtbl->OnResponse(p,a,b,c,d)

#endif

HRESULT CALLBACK IHttpNegotiate_BeginningTransaction_Proxy(
    IHttpNegotiate* This,
    LPCWSTR szURL,
    LPCWSTR szHeaders,
    DWORD dwReserved,
    LPWSTR* pszAdditionalHeaders);
void __RPC_STUB IHttpNegotiate_BeginningTransaction_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IHttpNegotiate_OnResponse_Proxy(
    IHttpNegotiate* This,
    DWORD dwResponseCode,
    LPCWSTR szResponseHeaders,
    LPCWSTR szRequestHeaders,
    LPWSTR* pszAdditionalRequestHeaders);
void __RPC_STUB IHttpNegotiate_OnResponse_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IHttpNegotiate_INTERFACE_DEFINED__ */

typedef IHttpNegotiate2 *LPHTTPNEGOTIATE2;

/*****************************************************************************
 * IHttpNegotiate2 interface
 */
#ifndef __IHttpNegotiate2_INTERFACE_DEFINED__
#define __IHttpNegotiate2_INTERFACE_DEFINED__

DEFINE_GUID(IID_IHttpNegotiate2, 0x4f9f9fcb, 0xe0f4, 0x48eb, 0xb7,0xab, 0xfa,0x2e,0xa9,0x36,0x5c,0xb4);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IHttpNegotiate2: IHttpNegotiate {

    virtual HRESULT CALLBACK GetRootSecurityId(
        BYTE* pbSecurityId,
        DWORD* pcbSecurityId,
        DWORD_PTR dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IHttpNegotiate2Vtbl IHttpNegotiate2Vtbl;
struct IHttpNegotiate2 {
    const IHttpNegotiate2Vtbl* lpVtbl;
};
struct IHttpNegotiate2Vtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IHttpNegotiate2* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IHttpNegotiate2* This);

    ULONG (CALLBACK *Release)(
        IHttpNegotiate2* This);

    /*** IHttpNegotiate methods ***/
    HRESULT (CALLBACK *BeginningTransaction)(
        IHttpNegotiate2* This,
        LPCWSTR szURL,
        LPCWSTR szHeaders,
        DWORD dwReserved,
        LPWSTR* pszAdditionalHeaders);

    HRESULT (CALLBACK *OnResponse)(
        IHttpNegotiate2* This,
        DWORD dwResponseCode,
        LPCWSTR szResponseHeaders,
        LPCWSTR szRequestHeaders,
        LPWSTR* pszAdditionalRequestHeaders);

    /*** IHttpNegotiate2 methods ***/
    HRESULT (CALLBACK *GetRootSecurityId)(
        IHttpNegotiate2* This,
        BYTE* pbSecurityId,
        DWORD* pcbSecurityId,
        DWORD_PTR dwReserved);

};

#define IHttpNegotiate2_IMETHODS \
    IHttpNegotiate_IMETHODS \
    ICOM_METHOD3 (HRESULT,GetRootSecurityId,BYTE*,pbSecurityId,DWORD*,pcbSecurityId,DWORD_PTR,dwReserved)

/*** IUnknown methods ***/
#define IHttpNegotiate2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IHttpNegotiate2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IHttpNegotiate2_Release(p) (p)->lpVtbl->Release(p)
/*** IHttpNegotiate methods ***/
#define IHttpNegotiate2_BeginningTransaction(p,a,b,c,d) (p)->lpVtbl->BeginningTransaction(p,a,b,c,d)
#define IHttpNegotiate2_OnResponse(p,a,b,c,d) (p)->lpVtbl->OnResponse(p,a,b,c,d)
/*** IHttpNegotiate2 methods ***/
#define IHttpNegotiate2_GetRootSecurityId(p,a,b,c) (p)->lpVtbl->GetRootSecurityId(p,a,b,c)

#endif

HRESULT CALLBACK IHttpNegotiate2_GetRootSecurityId_Proxy(
    IHttpNegotiate2* This,
    BYTE* pbSecurityId,
    DWORD* pcbSecurityId,
    DWORD_PTR dwReserved);
void __RPC_STUB IHttpNegotiate2_GetRootSecurityId_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IHttpNegotiate2_INTERFACE_DEFINED__ */

typedef IWindowForBindingUI *LPWINDOWFORBINDINGUI;

/*****************************************************************************
 * IWindowForBindingUI interface
 */
#ifndef __IWindowForBindingUI_INTERFACE_DEFINED__
#define __IWindowForBindingUI_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWindowForBindingUI, 0x79eac9d5, 0xbafa, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IWindowForBindingUI: IUnknown {

    virtual HRESULT CALLBACK GetWindow(
        REFGUID rguidReason,
        HWND* phwnd) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IWindowForBindingUIVtbl IWindowForBindingUIVtbl;
struct IWindowForBindingUI {
    const IWindowForBindingUIVtbl* lpVtbl;
};
struct IWindowForBindingUIVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IWindowForBindingUI* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IWindowForBindingUI* This);

    ULONG (CALLBACK *Release)(
        IWindowForBindingUI* This);

    /*** IWindowForBindingUI methods ***/
    HRESULT (CALLBACK *GetWindow)(
        IWindowForBindingUI* This,
        REFGUID rguidReason,
        HWND* phwnd);

};

#define IWindowForBindingUI_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,GetWindow,REFGUID,rguidReason,HWND*,phwnd)

/*** IUnknown methods ***/
#define IWindowForBindingUI_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IWindowForBindingUI_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IWindowForBindingUI_Release(p) (p)->lpVtbl->Release(p)
/*** IWindowForBindingUI methods ***/
#define IWindowForBindingUI_GetWindow(p,a,b) (p)->lpVtbl->GetWindow(p,a,b)

#endif

HRESULT CALLBACK IWindowForBindingUI_GetWindow_Proxy(
    IWindowForBindingUI* This,
    REFGUID rguidReason,
    HWND* phwnd);
void __RPC_STUB IWindowForBindingUI_GetWindow_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWindowForBindingUI_INTERFACE_DEFINED__ */

typedef ICodeInstall *LPCODEINSTALL;

typedef enum {
    CIP_DISK_FULL,
    CIP_ACCESS_DENIED,
    CIP_NEWER_VERSION_EXISTS,
    CIP_OLDER_VERSION_EXISTS,
    CIP_NAME_CONFLICT,
    CIP_TRUST_VERIFICATION_COMPONENT_MISSING,
    CIP_EXE_SELF_REGISTERATION_TIMEOUT,
    CIP_UNSAFE_TO_ABORT,
    CIP_NEED_REBOOT
} CIP_STATUS;

/*****************************************************************************
 * ICodeInstall interface
 */
#ifndef __ICodeInstall_INTERFACE_DEFINED__
#define __ICodeInstall_INTERFACE_DEFINED__

DEFINE_GUID(IID_ICodeInstall, 0x79eac9d1, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct ICodeInstall: IWindowForBindingUI {

    virtual HRESULT CALLBACK OnCodeInstallProblem(
        ULONG ulStatusCode,
        LPCWSTR szDestination,
        LPCWSTR szSource,
        DWORD dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct ICodeInstallVtbl ICodeInstallVtbl;
struct ICodeInstall {
    const ICodeInstallVtbl* lpVtbl;
};
struct ICodeInstallVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        ICodeInstall* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        ICodeInstall* This);

    ULONG (CALLBACK *Release)(
        ICodeInstall* This);

    /*** IWindowForBindingUI methods ***/
    HRESULT (CALLBACK *GetWindow)(
        ICodeInstall* This,
        REFGUID rguidReason,
        HWND* phwnd);

    /*** ICodeInstall methods ***/
    HRESULT (CALLBACK *OnCodeInstallProblem)(
        ICodeInstall* This,
        ULONG ulStatusCode,
        LPCWSTR szDestination,
        LPCWSTR szSource,
        DWORD dwReserved);

};

#define ICodeInstall_IMETHODS \
    IWindowForBindingUI_IMETHODS \
    ICOM_METHOD4 (HRESULT,OnCodeInstallProblem,ULONG,ulStatusCode,LPCWSTR,szDestination,LPCWSTR,szSource,DWORD,dwReserved)

/*** IUnknown methods ***/
#define ICodeInstall_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ICodeInstall_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ICodeInstall_Release(p) (p)->lpVtbl->Release(p)
/*** IWindowForBindingUI methods ***/
#define ICodeInstall_GetWindow(p,a,b) (p)->lpVtbl->GetWindow(p,a,b)
/*** ICodeInstall methods ***/
#define ICodeInstall_OnCodeInstallProblem(p,a,b,c,d) (p)->lpVtbl->OnCodeInstallProblem(p,a,b,c,d)

#endif

HRESULT CALLBACK ICodeInstall_OnCodeInstallProblem_Proxy(
    ICodeInstall* This,
    ULONG ulStatusCode,
    LPCWSTR szDestination,
    LPCWSTR szSource,
    DWORD dwReserved);
void __RPC_STUB ICodeInstall_OnCodeInstallProblem_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ICodeInstall_INTERFACE_DEFINED__ */

typedef struct IWinInetInfo IWinInetInfo;
typedef IWinInetInfo *LPWININETINFO;

/*****************************************************************************
 * IWinInetInfo interface
 */
#ifndef __IWinInetInfo_INTERFACE_DEFINED__
#define __IWinInetInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWinInetInfo, 0x79eac9d6, 0xbafa, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IWinInetInfo: IUnknown {

    virtual HRESULT CALLBACK QueryOption(
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pcbBuf) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IWinInetInfoVtbl IWinInetInfoVtbl;
struct IWinInetInfo {
    const IWinInetInfoVtbl* lpVtbl;
};
struct IWinInetInfoVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IWinInetInfo* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IWinInetInfo* This);

    ULONG (CALLBACK *Release)(
        IWinInetInfo* This);

    /*** IWinInetInfo methods ***/
    HRESULT (CALLBACK *QueryOption)(
        IWinInetInfo* This,
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pcbBuf);

};

#define IWinInetInfo_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,QueryOption,DWORD,dwOption,LPVOID,pBuffer,DWORD*,pcbBuf)

/*** IUnknown methods ***/
#define IWinInetInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IWinInetInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IWinInetInfo_Release(p) (p)->lpVtbl->Release(p)
/*** IWinInetInfo methods ***/
#define IWinInetInfo_QueryOption(p,a,b,c) (p)->lpVtbl->QueryOption(p,a,b,c)

#endif

HRESULT CALLBACK IWinInetInfo_RemoteQueryOption_Proxy(
    IWinInetInfo* This,
    DWORD dwOption,
    BYTE* pBuffer,
    DWORD* pcbBuf);
void __RPC_STUB IWinInetInfo_RemoteQueryOption_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IWinInetInfo_QueryOption_Proxy(
    IWinInetInfo* This,
    DWORD dwOption,
    LPVOID pBuffer,
    DWORD* pcbBuf);
HRESULT __RPC_STUB IWinInetInfo_QueryOption_Stub(
    IWinInetInfo* This,
    DWORD dwOption,
    BYTE* pBuffer,
    DWORD* pcbBuf);

#endif  /* __IWinInetInfo_INTERFACE_DEFINED__ */

typedef struct IHttpSecurity IHttpSecurity;
typedef IHttpSecurity *LPHTTPSECURITY;

/*****************************************************************************
 * IHttpSecurity interface
 */
#ifndef __IHttpSecurity_INTERFACE_DEFINED__
#define __IHttpSecurity_INTERFACE_DEFINED__

DEFINE_GUID(IID_IHttpSecurity, 0x79eac9d7, 0xbafa, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IHttpSecurity: IWindowForBindingUI {

    virtual HRESULT CALLBACK OnSecurityProblem(
        DWORD dwProblem) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IHttpSecurityVtbl IHttpSecurityVtbl;
struct IHttpSecurity {
    const IHttpSecurityVtbl* lpVtbl;
};
struct IHttpSecurityVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IHttpSecurity* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IHttpSecurity* This);

    ULONG (CALLBACK *Release)(
        IHttpSecurity* This);

    /*** IWindowForBindingUI methods ***/
    HRESULT (CALLBACK *GetWindow)(
        IHttpSecurity* This,
        REFGUID rguidReason,
        HWND* phwnd);

    /*** IHttpSecurity methods ***/
    HRESULT (CALLBACK *OnSecurityProblem)(
        IHttpSecurity* This,
        DWORD dwProblem);

};

#define IHttpSecurity_IMETHODS \
    IWindowForBindingUI_IMETHODS \
    ICOM_METHOD1 (HRESULT,OnSecurityProblem,DWORD,dwProblem)

/*** IUnknown methods ***/
#define IHttpSecurity_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IHttpSecurity_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IHttpSecurity_Release(p) (p)->lpVtbl->Release(p)
/*** IWindowForBindingUI methods ***/
#define IHttpSecurity_GetWindow(p,a,b) (p)->lpVtbl->GetWindow(p,a,b)
/*** IHttpSecurity methods ***/
#define IHttpSecurity_OnSecurityProblem(p,a) (p)->lpVtbl->OnSecurityProblem(p,a)

#endif

HRESULT CALLBACK IHttpSecurity_OnSecurityProblem_Proxy(
    IHttpSecurity* This,
    DWORD dwProblem);
void __RPC_STUB IHttpSecurity_OnSecurityProblem_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IHttpSecurity_INTERFACE_DEFINED__ */

typedef struct IWinInetHttpInfo IWinInetHttpInfo;
typedef IWinInetHttpInfo *LPWININETHTTPINFO;

/*****************************************************************************
 * IWinInetHttpInfo interface
 */
#ifndef __IWinInetHttpInfo_INTERFACE_DEFINED__
#define __IWinInetHttpInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWinInetHttpInfo, 0x79eac9d8, 0xbafa, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IWinInetHttpInfo: IWinInetInfo {

    virtual HRESULT CALLBACK QueryInfo(
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pcbBuf,
        DWORD* pdwFlags,
        DWORD* pdwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IWinInetHttpInfoVtbl IWinInetHttpInfoVtbl;
struct IWinInetHttpInfo {
    const IWinInetHttpInfoVtbl* lpVtbl;
};
struct IWinInetHttpInfoVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IWinInetHttpInfo* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IWinInetHttpInfo* This);

    ULONG (CALLBACK *Release)(
        IWinInetHttpInfo* This);

    /*** IWinInetInfo methods ***/
    HRESULT (CALLBACK *QueryOption)(
        IWinInetHttpInfo* This,
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pcbBuf);

    /*** IWinInetHttpInfo methods ***/
    HRESULT (CALLBACK *QueryInfo)(
        IWinInetHttpInfo* This,
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pcbBuf,
        DWORD* pdwFlags,
        DWORD* pdwReserved);

};

#define IWinInetHttpInfo_IMETHODS \
    IWinInetInfo_IMETHODS \
    ICOM_METHOD5 (HRESULT,QueryInfo,DWORD,dwOption,LPVOID,pBuffer,DWORD*,pcbBuf,DWORD*,pdwFlags,DWORD*,pdwReserved)

/*** IUnknown methods ***/
#define IWinInetHttpInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IWinInetHttpInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IWinInetHttpInfo_Release(p) (p)->lpVtbl->Release(p)
/*** IWinInetInfo methods ***/
#define IWinInetHttpInfo_QueryOption(p,a,b,c) (p)->lpVtbl->QueryOption(p,a,b,c)
/*** IWinInetHttpInfo methods ***/
#define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) (p)->lpVtbl->QueryInfo(p,a,b,c,d,e)

#endif

HRESULT CALLBACK IWinInetHttpInfo_RemoteQueryInfo_Proxy(
    IWinInetHttpInfo* This,
    DWORD dwOption,
    BYTE* pBuffer,
    DWORD* pcbBuf,
    DWORD* pdwFlags,
    DWORD* pdwReserved);
void __RPC_STUB IWinInetHttpInfo_RemoteQueryInfo_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IWinInetHttpInfo_QueryInfo_Proxy(
    IWinInetHttpInfo* This,
    DWORD dwOption,
    LPVOID pBuffer,
    DWORD* pcbBuf,
    DWORD* pdwFlags,
    DWORD* pdwReserved);
HRESULT __RPC_STUB IWinInetHttpInfo_QueryInfo_Stub(
    IWinInetHttpInfo* This,
    DWORD dwOption,
    BYTE* pBuffer,
    DWORD* pcbBuf,
    DWORD* pdwFlags,
    DWORD* pdwReserved);

#endif  /* __IWinInetHttpInfo_INTERFACE_DEFINED__ */

typedef struct IBindHost IBindHost;
typedef IBindHost *LPBINDHOST;

/*****************************************************************************
 * IBindHost interface
 */
#ifndef __IBindHost_INTERFACE_DEFINED__
#define __IBindHost_INTERFACE_DEFINED__

DEFINE_GUID(IID_IBindHost, 0xfc4801a1, 0x2ba9, 0x11cf, 0xa2,0x29, 0x00,0xaa,0x00,0x3d,0x73,0x52);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IBindHost: IUnknown {

    virtual HRESULT CALLBACK CreateMoniker(
        LPOLESTR szName,
        IBindCtx* pBC,
        IMoniker** ppmk,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK MonikerBindToStorage(
        IMoniker* pMk,
        IBindCtx* pBC,
        IBindStatusCallback* pBSC,
        REFIID riid,
        void** ppvObj) = 0;

    virtual HRESULT CALLBACK MonikerBindToObject(
        IMoniker* pMk,
        IBindCtx* pBC,
        IBindStatusCallback* pBSC,
        REFIID riid,
        void** ppvObj) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IBindHostVtbl IBindHostVtbl;
struct IBindHost {
    const IBindHostVtbl* lpVtbl;
};
struct IBindHostVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IBindHost* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IBindHost* This);

    ULONG (CALLBACK *Release)(
        IBindHost* This);

    /*** IBindHost methods ***/
    HRESULT (CALLBACK *CreateMoniker)(
        IBindHost* This,
        LPOLESTR szName,
        IBindCtx* pBC,
        IMoniker** ppmk,
        DWORD dwReserved);

    HRESULT (CALLBACK *MonikerBindToStorage)(
        IBindHost* This,
        IMoniker* pMk,
        IBindCtx* pBC,
        IBindStatusCallback* pBSC,
        REFIID riid,
        void** ppvObj);

    HRESULT (CALLBACK *MonikerBindToObject)(
        IBindHost* This,
        IMoniker* pMk,
        IBindCtx* pBC,
        IBindStatusCallback* pBSC,
        REFIID riid,
        void** ppvObj);

};

#define IBindHost_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD4 (HRESULT,CreateMoniker,LPOLESTR,szName,IBindCtx*,pBC,IMoniker**,ppmk,DWORD,dwReserved) \
    ICOM_METHOD5 (HRESULT,MonikerBindToStorage,IMoniker*,pMk,IBindCtx*,pBC,IBindStatusCallback*,pBSC,REFIID,riid,void**,ppvObj) \
    ICOM_METHOD5 (HRESULT,MonikerBindToObject,IMoniker*,pMk,IBindCtx*,pBC,IBindStatusCallback*,pBSC,REFIID,riid,void**,ppvObj)

/*** IUnknown methods ***/
#define IBindHost_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IBindHost_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IBindHost_Release(p) (p)->lpVtbl->Release(p)
/*** IBindHost methods ***/
#define IBindHost_CreateMoniker(p,a,b,c,d) (p)->lpVtbl->CreateMoniker(p,a,b,c,d)
#define IBindHost_MonikerBindToStorage(p,a,b,c,d,e) (p)->lpVtbl->MonikerBindToStorage(p,a,b,c,d,e)
#define IBindHost_MonikerBindToObject(p,a,b,c,d,e) (p)->lpVtbl->MonikerBindToObject(p,a,b,c,d,e)

#endif

HRESULT CALLBACK IBindHost_CreateMoniker_Proxy(
    IBindHost* This,
    LPOLESTR szName,
    IBindCtx* pBC,
    IMoniker** ppmk,
    DWORD dwReserved);
void __RPC_STUB IBindHost_CreateMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindHost_RemoteMonikerBindToStorage_Proxy(
    IBindHost* This,
    IMoniker* pMk,
    IBindCtx* pBC,
    IBindStatusCallback* pBSC,
    REFIID riid,
    IUnknown** ppvObj);
void __RPC_STUB IBindHost_RemoteMonikerBindToStorage_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindHost_MonikerBindToStorage_Proxy(
    IBindHost* This,
    IMoniker* pMk,
    IBindCtx* pBC,
    IBindStatusCallback* pBSC,
    REFIID riid,
    void** ppvObj);
HRESULT __RPC_STUB IBindHost_MonikerBindToStorage_Stub(
    IBindHost* This,
    IMoniker* pMk,
    IBindCtx* pBC,
    IBindStatusCallback* pBSC,
    REFIID riid,
    IUnknown** ppvObj);
HRESULT CALLBACK IBindHost_RemoteMonikerBindToObject_Proxy(
    IBindHost* This,
    IMoniker* pMk,
    IBindCtx* pBC,
    IBindStatusCallback* pBSC,
    REFIID riid,
    IUnknown** ppvObj);
void __RPC_STUB IBindHost_RemoteMonikerBindToObject_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IBindHost_MonikerBindToObject_Proxy(
    IBindHost* This,
    IMoniker* pMk,
    IBindCtx* pBC,
    IBindStatusCallback* pBSC,
    REFIID riid,
    void** ppvObj);
HRESULT __RPC_STUB IBindHost_MonikerBindToObject_Stub(
    IBindHost* This,
    IMoniker* pMk,
    IBindCtx* pBC,
    IBindStatusCallback* pBSC,
    REFIID riid,
    IUnknown** ppvObj);

#endif  /* __IBindHost_INTERFACE_DEFINED__ */

typedef struct IInternet IInternet;
typedef struct IInternetBindInfo IInternetBindInfo;
typedef struct IInternetProtocolRoot IInternetProtocolRoot;
typedef struct IInternetProtocol IInternetProtocol;
typedef struct IInternetProtocolSink IInternetProtocolSink;
typedef struct IInternetProtocolInfo IInternetProtocolInfo;
typedef struct IInternetSession IInternetSession;
typedef struct IInternetProtocolSinkStackable IInternetProtocolSinkStackable;
typedef IInternet *LPIINTERNET;

typedef IInternetBindInfo *LPIINTERNETBINDINFO;

typedef enum tagBINDSTRING {
    BINDSTRING_HEADERS = 1,
    BINDSTRING_ACCEPT_MIMES,
    BINDSTRING_EXTRA_URL,
    BINDSTRING_LANGUAGE,
    BINDSTRING_USERNAME,
    BINDSTRING_PASSWORD,
    BINDSTRING_UA_PIXELS,
    BINDSTRING_UA_COLOR,
    BINDSTRING_OS,
    BINDSTRING_USER_AGENT,
    BINDSTRING_ACCEPT_ENCODINGS,
    BINDSTRING_POST_COOKIE,
    BINDSTRING_POST_DATA_MIME,
    BINDSTRING_URL,
    BINDSTRING_IID,
    BINDSTRING_FLAG_BIND_TO_OBJECT,
    BINDSTRING_PTR_BIND_CONTEXT
} BINDSTRING;

/*****************************************************************************
 * IInternetBindInfo interface
 */
#ifndef __IInternetBindInfo_INTERFACE_DEFINED__
#define __IInternetBindInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetBindInfo, 0x79eac9e1, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetBindInfo: IUnknown {

    virtual HRESULT CALLBACK GetBindInfo(
        DWORD* grfBINDF,
        BINDINFO* pbindinfo) = 0;

    virtual HRESULT CALLBACK GetBindString(
        ULONG ulStringType,
        LPOLESTR* ppwzStr,
        ULONG cEl,
        ULONG* pcElFetched) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetBindInfoVtbl IInternetBindInfoVtbl;
struct IInternetBindInfo {
    const IInternetBindInfoVtbl* lpVtbl;
};
struct IInternetBindInfoVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetBindInfo* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetBindInfo* This);

    ULONG (CALLBACK *Release)(
        IInternetBindInfo* This);

    /*** IInternetBindInfo methods ***/
    HRESULT (CALLBACK *GetBindInfo)(
        IInternetBindInfo* This,
        DWORD* grfBINDF,
        BINDINFO* pbindinfo);

    HRESULT (CALLBACK *GetBindString)(
        IInternetBindInfo* This,
        ULONG ulStringType,
        LPOLESTR* ppwzStr,
        ULONG cEl,
        ULONG* pcElFetched);

};

#define IInternetBindInfo_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,GetBindInfo,DWORD*,grfBINDF,BINDINFO*,pbindinfo) \
    ICOM_METHOD4 (HRESULT,GetBindString,ULONG,ulStringType,LPOLESTR*,ppwzStr,ULONG,cEl,ULONG*,pcElFetched)

/*** IUnknown methods ***/
#define IInternetBindInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetBindInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetBindInfo_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetBindInfo methods ***/
#define IInternetBindInfo_GetBindInfo(p,a,b) (p)->lpVtbl->GetBindInfo(p,a,b)
#define IInternetBindInfo_GetBindString(p,a,b,c,d) (p)->lpVtbl->GetBindString(p,a,b,c,d)

#endif

HRESULT CALLBACK IInternetBindInfo_GetBindInfo_Proxy(
    IInternetBindInfo* This,
    DWORD* grfBINDF,
    BINDINFO* pbindinfo);
void __RPC_STUB IInternetBindInfo_GetBindInfo_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetBindInfo_GetBindString_Proxy(
    IInternetBindInfo* This,
    ULONG ulStringType,
    LPOLESTR* ppwzStr,
    ULONG cEl,
    ULONG* pcElFetched);
void __RPC_STUB IInternetBindInfo_GetBindString_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetBindInfo_INTERFACE_DEFINED__ */

typedef IInternetProtocolRoot *LPIINTERNETPROTOCOLROOT;

typedef enum _tagPI_FLAGS {
    PI_PARSE_URL = 0x1,
    PI_FILTER_MODE = 0x2,
    PI_FORCE_ASYNC = 0x4,
    PI_USE_WORKERTHREAD = 0x8,
    PI_MIMEVERIFICATION = 0x10,
    PI_CLSIDLOOKUP = 0x20,
    PI_DATAPROGRESS = 0x40,
    PI_SYNCHRONOUS = 0x80,
    PI_APARTMENTTHREADED = 0x100,
    PI_CLASSINSTALL = 0x200,
    PI_PASSONBINDCTX = 0x2000,
    PI_NOMIMEHANDLER = 0x8000,
    PI_LOADAPPDIRECT = 0x4000,
    PD_FORCE_SWITCH = 0x10000,
    PI_PREFERDEFAULTHANDLER = 0x20000
} PI_FLAGS;

typedef struct _tagPROTOCOLDATA {
    DWORD grfFlags;
    DWORD dwState;
    LPVOID pData;
    ULONG cbData;
} PROTOCOLDATA;

typedef struct _tagStartParam {
    IID iid;
    IBindCtx *pIBindCtx;
    IUnknown *pItf;
} StartParam;

/*****************************************************************************
 * IInternetProtocolRoot interface
 */
#ifndef __IInternetProtocolRoot_INTERFACE_DEFINED__
#define __IInternetProtocolRoot_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetProtocolRoot, 0x79eac9e3, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetProtocolRoot: IUnknown {

    virtual HRESULT CALLBACK Start(
        LPCWSTR szUrl,
        IInternetProtocolSink* pOIProtSink,
        IInternetBindInfo* pOIBindInfo,
        DWORD grfPI,
        HANDLE_PTR dwReserved) = 0;

    virtual HRESULT CALLBACK Continue(
        PROTOCOLDATA* pProtocolData) = 0;

    virtual HRESULT CALLBACK Abort(
        HRESULT hrReason,
        DWORD dwOptions) = 0;

    virtual HRESULT CALLBACK Terminate(
        DWORD dwOptions) = 0;

    virtual HRESULT CALLBACK Suspend(
        ) = 0;

    virtual HRESULT CALLBACK Resume(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetProtocolRootVtbl IInternetProtocolRootVtbl;
struct IInternetProtocolRoot {
    const IInternetProtocolRootVtbl* lpVtbl;
};
struct IInternetProtocolRootVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetProtocolRoot* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetProtocolRoot* This);

    ULONG (CALLBACK *Release)(
        IInternetProtocolRoot* This);

    /*** IInternetProtocolRoot methods ***/
    HRESULT (CALLBACK *Start)(
        IInternetProtocolRoot* This,
        LPCWSTR szUrl,
        IInternetProtocolSink* pOIProtSink,
        IInternetBindInfo* pOIBindInfo,
        DWORD grfPI,
        HANDLE_PTR dwReserved);

    HRESULT (CALLBACK *Continue)(
        IInternetProtocolRoot* This,
        PROTOCOLDATA* pProtocolData);

    HRESULT (CALLBACK *Abort)(
        IInternetProtocolRoot* This,
        HRESULT hrReason,
        DWORD dwOptions);

    HRESULT (CALLBACK *Terminate)(
        IInternetProtocolRoot* This,
        DWORD dwOptions);

    HRESULT (CALLBACK *Suspend)(
        IInternetProtocolRoot* This);

    HRESULT (CALLBACK *Resume)(
        IInternetProtocolRoot* This);

};

#define IInternetProtocolRoot_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD5 (HRESULT,Start,LPCWSTR,szUrl,IInternetProtocolSink*,pOIProtSink,IInternetBindInfo*,pOIBindInfo,DWORD,grfPI,HANDLE_PTR,dwReserved) \
    ICOM_METHOD1 (HRESULT,Continue,PROTOCOLDATA*,pProtocolData) \
    ICOM_METHOD2 (HRESULT,Abort,HRESULT,hrReason,DWORD,dwOptions) \
    ICOM_METHOD1 (HRESULT,Terminate,DWORD,dwOptions) \
    ICOM_METHOD  (HRESULT,Suspend) \
    ICOM_METHOD  (HRESULT,Resume)

/*** IUnknown methods ***/
#define IInternetProtocolRoot_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetProtocolRoot_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetProtocolRoot_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetProtocolRoot methods ***/
#define IInternetProtocolRoot_Start(p,a,b,c,d,e) (p)->lpVtbl->Start(p,a,b,c,d,e)
#define IInternetProtocolRoot_Continue(p,a) (p)->lpVtbl->Continue(p,a)
#define IInternetProtocolRoot_Abort(p,a,b) (p)->lpVtbl->Abort(p,a,b)
#define IInternetProtocolRoot_Terminate(p,a) (p)->lpVtbl->Terminate(p,a)
#define IInternetProtocolRoot_Suspend(p) (p)->lpVtbl->Suspend(p)
#define IInternetProtocolRoot_Resume(p) (p)->lpVtbl->Resume(p)

#endif

HRESULT CALLBACK IInternetProtocolRoot_Start_Proxy(
    IInternetProtocolRoot* This,
    LPCWSTR szUrl,
    IInternetProtocolSink* pOIProtSink,
    IInternetBindInfo* pOIBindInfo,
    DWORD grfPI,
    HANDLE_PTR dwReserved);
void __RPC_STUB IInternetProtocolRoot_Start_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolRoot_Continue_Proxy(
    IInternetProtocolRoot* This,
    PROTOCOLDATA* pProtocolData);
void __RPC_STUB IInternetProtocolRoot_Continue_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolRoot_Abort_Proxy(
    IInternetProtocolRoot* This,
    HRESULT hrReason,
    DWORD dwOptions);
void __RPC_STUB IInternetProtocolRoot_Abort_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolRoot_Terminate_Proxy(
    IInternetProtocolRoot* This,
    DWORD dwOptions);
void __RPC_STUB IInternetProtocolRoot_Terminate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolRoot_Suspend_Proxy(
    IInternetProtocolRoot* This);
void __RPC_STUB IInternetProtocolRoot_Suspend_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolRoot_Resume_Proxy(
    IInternetProtocolRoot* This);
void __RPC_STUB IInternetProtocolRoot_Resume_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetProtocolRoot_INTERFACE_DEFINED__ */

typedef IInternetProtocol *LPIINTERNETPROTOCOL;

/*****************************************************************************
 * IInternetProtocol interface
 */
#ifndef __IInternetProtocol_INTERFACE_DEFINED__
#define __IInternetProtocol_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetProtocol, 0x79eac9e4, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetProtocol: IInternetProtocolRoot {

    virtual HRESULT CALLBACK Read(
        void* pv,
        ULONG cb,
        ULONG* pcbRead) = 0;

    virtual HRESULT CALLBACK Seek(
        LARGE_INTEGER dlibMove,
        DWORD dwOrigin,
        ULARGE_INTEGER* plibNewPosition) = 0;

    virtual HRESULT CALLBACK LockRequest(
        DWORD dwOptions) = 0;

    virtual HRESULT CALLBACK UnlockRequest(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetProtocolVtbl IInternetProtocolVtbl;
struct IInternetProtocol {
    const IInternetProtocolVtbl* lpVtbl;
};
struct IInternetProtocolVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetProtocol* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetProtocol* This);

    ULONG (CALLBACK *Release)(
        IInternetProtocol* This);

    /*** IInternetProtocolRoot methods ***/
    HRESULT (CALLBACK *Start)(
        IInternetProtocol* This,
        LPCWSTR szUrl,
        IInternetProtocolSink* pOIProtSink,
        IInternetBindInfo* pOIBindInfo,
        DWORD grfPI,
        HANDLE_PTR dwReserved);

    HRESULT (CALLBACK *Continue)(
        IInternetProtocol* This,
        PROTOCOLDATA* pProtocolData);

    HRESULT (CALLBACK *Abort)(
        IInternetProtocol* This,
        HRESULT hrReason,
        DWORD dwOptions);

    HRESULT (CALLBACK *Terminate)(
        IInternetProtocol* This,
        DWORD dwOptions);

    HRESULT (CALLBACK *Suspend)(
        IInternetProtocol* This);

    HRESULT (CALLBACK *Resume)(
        IInternetProtocol* This);

    /*** IInternetProtocol methods ***/
    HRESULT (CALLBACK *Read)(
        IInternetProtocol* This,
        void* pv,
        ULONG cb,
        ULONG* pcbRead);

    HRESULT (CALLBACK *Seek)(
        IInternetProtocol* This,
        LARGE_INTEGER dlibMove,
        DWORD dwOrigin,
        ULARGE_INTEGER* plibNewPosition);

    HRESULT (CALLBACK *LockRequest)(
        IInternetProtocol* This,
        DWORD dwOptions);

    HRESULT (CALLBACK *UnlockRequest)(
        IInternetProtocol* This);

};

#define IInternetProtocol_IMETHODS \
    IInternetProtocolRoot_IMETHODS \
    ICOM_METHOD3 (HRESULT,Read,void*,pv,ULONG,cb,ULONG*,pcbRead) \
    ICOM_METHOD3 (HRESULT,Seek,LARGE_INTEGER,dlibMove,DWORD,dwOrigin,ULARGE_INTEGER*,plibNewPosition) \
    ICOM_METHOD1 (HRESULT,LockRequest,DWORD,dwOptions) \
    ICOM_METHOD  (HRESULT,UnlockRequest)

/*** IUnknown methods ***/
#define IInternetProtocol_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetProtocol_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetProtocol_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetProtocolRoot methods ***/
#define IInternetProtocol_Start(p,a,b,c,d,e) (p)->lpVtbl->Start(p,a,b,c,d,e)
#define IInternetProtocol_Continue(p,a) (p)->lpVtbl->Continue(p,a)
#define IInternetProtocol_Abort(p,a,b) (p)->lpVtbl->Abort(p,a,b)
#define IInternetProtocol_Terminate(p,a) (p)->lpVtbl->Terminate(p,a)
#define IInternetProtocol_Suspend(p) (p)->lpVtbl->Suspend(p)
#define IInternetProtocol_Resume(p) (p)->lpVtbl->Resume(p)
/*** IInternetProtocol methods ***/
#define IInternetProtocol_Read(p,a,b,c) (p)->lpVtbl->Read(p,a,b,c)
#define IInternetProtocol_Seek(p,a,b,c) (p)->lpVtbl->Seek(p,a,b,c)
#define IInternetProtocol_LockRequest(p,a) (p)->lpVtbl->LockRequest(p,a)
#define IInternetProtocol_UnlockRequest(p) (p)->lpVtbl->UnlockRequest(p)

#endif

HRESULT CALLBACK IInternetProtocol_Read_Proxy(
    IInternetProtocol* This,
    void* pv,
    ULONG cb,
    ULONG* pcbRead);
void __RPC_STUB IInternetProtocol_Read_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocol_Seek_Proxy(
    IInternetProtocol* This,
    LARGE_INTEGER dlibMove,
    DWORD dwOrigin,
    ULARGE_INTEGER* plibNewPosition);
void __RPC_STUB IInternetProtocol_Seek_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocol_LockRequest_Proxy(
    IInternetProtocol* This,
    DWORD dwOptions);
void __RPC_STUB IInternetProtocol_LockRequest_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocol_UnlockRequest_Proxy(
    IInternetProtocol* This);
void __RPC_STUB IInternetProtocol_UnlockRequest_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetProtocol_INTERFACE_DEFINED__ */

typedef IInternetProtocolSink *LPIINTERNETPROTOCOLSINK;

/*****************************************************************************
 * IInternetProtocolSink interface
 */
#ifndef __IInternetProtocolSink_INTERFACE_DEFINED__
#define __IInternetProtocolSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetProtocolSink, 0x79eac9e5, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetProtocolSink: IUnknown {

    virtual HRESULT CALLBACK Switch(
        PROTOCOLDATA* pProtocolData) = 0;

    virtual HRESULT CALLBACK ReportProgress(
        ULONG ulStatusCode,
        LPCWSTR szStatusText) = 0;

    virtual HRESULT CALLBACK ReportData(
        DWORD grfBSCF,
        ULONG ulProgress,
        ULONG ulProgressMax) = 0;

    virtual HRESULT CALLBACK ReportResult(
        HRESULT hrResult,
        DWORD dwError,
        LPCWSTR szResult) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetProtocolSinkVtbl IInternetProtocolSinkVtbl;
struct IInternetProtocolSink {
    const IInternetProtocolSinkVtbl* lpVtbl;
};
struct IInternetProtocolSinkVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetProtocolSink* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetProtocolSink* This);

    ULONG (CALLBACK *Release)(
        IInternetProtocolSink* This);

    /*** IInternetProtocolSink methods ***/
    HRESULT (CALLBACK *Switch)(
        IInternetProtocolSink* This,
        PROTOCOLDATA* pProtocolData);

    HRESULT (CALLBACK *ReportProgress)(
        IInternetProtocolSink* This,
        ULONG ulStatusCode,
        LPCWSTR szStatusText);

    HRESULT (CALLBACK *ReportData)(
        IInternetProtocolSink* This,
        DWORD grfBSCF,
        ULONG ulProgress,
        ULONG ulProgressMax);

    HRESULT (CALLBACK *ReportResult)(
        IInternetProtocolSink* This,
        HRESULT hrResult,
        DWORD dwError,
        LPCWSTR szResult);

};

#define IInternetProtocolSink_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,Switch,PROTOCOLDATA*,pProtocolData) \
    ICOM_METHOD2 (HRESULT,ReportProgress,ULONG,ulStatusCode,LPCWSTR,szStatusText) \
    ICOM_METHOD3 (HRESULT,ReportData,DWORD,grfBSCF,ULONG,ulProgress,ULONG,ulProgressMax) \
    ICOM_METHOD3 (HRESULT,ReportResult,HRESULT,hrResult,DWORD,dwError,LPCWSTR,szResult)

/*** IUnknown methods ***/
#define IInternetProtocolSink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetProtocolSink_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetProtocolSink_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetProtocolSink methods ***/
#define IInternetProtocolSink_Switch(p,a) (p)->lpVtbl->Switch(p,a)
#define IInternetProtocolSink_ReportProgress(p,a,b) (p)->lpVtbl->ReportProgress(p,a,b)
#define IInternetProtocolSink_ReportData(p,a,b,c) (p)->lpVtbl->ReportData(p,a,b,c)
#define IInternetProtocolSink_ReportResult(p,a,b,c) (p)->lpVtbl->ReportResult(p,a,b,c)

#endif

HRESULT CALLBACK IInternetProtocolSink_Switch_Proxy(
    IInternetProtocolSink* This,
    PROTOCOLDATA* pProtocolData);
void __RPC_STUB IInternetProtocolSink_Switch_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolSink_ReportProgress_Proxy(
    IInternetProtocolSink* This,
    ULONG ulStatusCode,
    LPCWSTR szStatusText);
void __RPC_STUB IInternetProtocolSink_ReportProgress_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolSink_ReportData_Proxy(
    IInternetProtocolSink* This,
    DWORD grfBSCF,
    ULONG ulProgress,
    ULONG ulProgressMax);
void __RPC_STUB IInternetProtocolSink_ReportData_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolSink_ReportResult_Proxy(
    IInternetProtocolSink* This,
    HRESULT hrResult,
    DWORD dwError,
    LPCWSTR szResult);
void __RPC_STUB IInternetProtocolSink_ReportResult_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetProtocolSink_INTERFACE_DEFINED__ */

typedef IInternetProtocolSinkStackable *LPIINTERNETPROTOCOLSINKStackable;

/*****************************************************************************
 * IInternetProtocolSinkStackable interface
 */
#ifndef __IInternetProtocolSinkStackable_INTERFACE_DEFINED__
#define __IInternetProtocolSinkStackable_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetProtocolSinkStackable, 0x79eac9f0, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetProtocolSinkStackable: IUnknown {

    virtual HRESULT CALLBACK SwitchSink(
        IInternetProtocolSink* pOIProtSink) = 0;

    virtual HRESULT CALLBACK CommitSwitch(
        ) = 0;

    virtual HRESULT CALLBACK RollbackSwitch(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetProtocolSinkStackableVtbl IInternetProtocolSinkStackableVtbl;
struct IInternetProtocolSinkStackable {
    const IInternetProtocolSinkStackableVtbl* lpVtbl;
};
struct IInternetProtocolSinkStackableVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetProtocolSinkStackable* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetProtocolSinkStackable* This);

    ULONG (CALLBACK *Release)(
        IInternetProtocolSinkStackable* This);

    /*** IInternetProtocolSinkStackable methods ***/
    HRESULT (CALLBACK *SwitchSink)(
        IInternetProtocolSinkStackable* This,
        IInternetProtocolSink* pOIProtSink);

    HRESULT (CALLBACK *CommitSwitch)(
        IInternetProtocolSinkStackable* This);

    HRESULT (CALLBACK *RollbackSwitch)(
        IInternetProtocolSinkStackable* This);

};

#define IInternetProtocolSinkStackable_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,SwitchSink,IInternetProtocolSink*,pOIProtSink) \
    ICOM_METHOD  (HRESULT,CommitSwitch) \
    ICOM_METHOD  (HRESULT,RollbackSwitch)

/*** IUnknown methods ***/
#define IInternetProtocolSinkStackable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetProtocolSinkStackable_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetProtocolSinkStackable_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetProtocolSinkStackable methods ***/
#define IInternetProtocolSinkStackable_SwitchSink(p,a) (p)->lpVtbl->SwitchSink(p,a)
#define IInternetProtocolSinkStackable_CommitSwitch(p) (p)->lpVtbl->CommitSwitch(p)
#define IInternetProtocolSinkStackable_RollbackSwitch(p) (p)->lpVtbl->RollbackSwitch(p)

#endif

HRESULT CALLBACK IInternetProtocolSinkStackable_SwitchSink_Proxy(
    IInternetProtocolSinkStackable* This,
    IInternetProtocolSink* pOIProtSink);
void __RPC_STUB IInternetProtocolSinkStackable_SwitchSink_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolSinkStackable_CommitSwitch_Proxy(
    IInternetProtocolSinkStackable* This);
void __RPC_STUB IInternetProtocolSinkStackable_CommitSwitch_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolSinkStackable_RollbackSwitch_Proxy(
    IInternetProtocolSinkStackable* This);
void __RPC_STUB IInternetProtocolSinkStackable_RollbackSwitch_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetProtocolSinkStackable_INTERFACE_DEFINED__ */

typedef IInternetSession *LPIINTERNETSESSION;

typedef enum _tagOIBDG_FLAGS {
    OIBDG_APARTMENTTHREADED = 0x100,
    OIBDG_DATAONLY = 0x1000
} OIBDG_FLAGS;

/*****************************************************************************
 * IInternetSession interface
 */
#ifndef __IInternetSession_INTERFACE_DEFINED__
#define __IInternetSession_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetSession, 0x79eac9e7, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetSession: IUnknown {

    virtual HRESULT CALLBACK RegisterNameSpace(
        IClassFactory* pCF,
        REFCLSID rclsid,
        LPCWSTR pwzProtocol,
        ULONG cPatterns,
        const LPCWSTR* ppwzPatterns,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK UnregisterNameSpace(
        IClassFactory* pCF,
        LPCWSTR pszProtocol) = 0;

    virtual HRESULT CALLBACK RegisterMimeFilter(
        IClassFactory* pCF,
        REFCLSID rclsid,
        LPCWSTR pwzType) = 0;

    virtual HRESULT CALLBACK UnregisterMimeFilter(
        IClassFactory* pCF,
        LPCWSTR pwzType) = 0;

    virtual HRESULT CALLBACK CreateBinding(
        LPBC pBC,
        LPCWSTR szUrl,
        IUnknown* pUnkOuter,
        IUnknown** ppUnk,
        IInternetProtocol** ppOInetProt,
        DWORD dwOption) = 0;

    virtual HRESULT CALLBACK SetSessionOption(
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD dwBufferLength,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK GetSessionOption(
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pdwBufferLength,
        DWORD dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetSessionVtbl IInternetSessionVtbl;
struct IInternetSession {
    const IInternetSessionVtbl* lpVtbl;
};
struct IInternetSessionVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetSession* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetSession* This);

    ULONG (CALLBACK *Release)(
        IInternetSession* This);

    /*** IInternetSession methods ***/
    HRESULT (CALLBACK *RegisterNameSpace)(
        IInternetSession* This,
        IClassFactory* pCF,
        REFCLSID rclsid,
        LPCWSTR pwzProtocol,
        ULONG cPatterns,
        const LPCWSTR* ppwzPatterns,
        DWORD dwReserved);

    HRESULT (CALLBACK *UnregisterNameSpace)(
        IInternetSession* This,
        IClassFactory* pCF,
        LPCWSTR pszProtocol);

    HRESULT (CALLBACK *RegisterMimeFilter)(
        IInternetSession* This,
        IClassFactory* pCF,
        REFCLSID rclsid,
        LPCWSTR pwzType);

    HRESULT (CALLBACK *UnregisterMimeFilter)(
        IInternetSession* This,
        IClassFactory* pCF,
        LPCWSTR pwzType);

    HRESULT (CALLBACK *CreateBinding)(
        IInternetSession* This,
        LPBC pBC,
        LPCWSTR szUrl,
        IUnknown* pUnkOuter,
        IUnknown** ppUnk,
        IInternetProtocol** ppOInetProt,
        DWORD dwOption);

    HRESULT (CALLBACK *SetSessionOption)(
        IInternetSession* This,
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD dwBufferLength,
        DWORD dwReserved);

    HRESULT (CALLBACK *GetSessionOption)(
        IInternetSession* This,
        DWORD dwOption,
        LPVOID pBuffer,
        DWORD* pdwBufferLength,
        DWORD dwReserved);

};

#define IInternetSession_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD6 (HRESULT,RegisterNameSpace,IClassFactory*,pCF,REFCLSID,rclsid,LPCWSTR,pwzProtocol,ULONG,cPatterns,const LPCWSTR*,ppwzPatterns,DWORD,dwReserved) \
    ICOM_METHOD2 (HRESULT,UnregisterNameSpace,IClassFactory*,pCF,LPCWSTR,pszProtocol) \
    ICOM_METHOD3 (HRESULT,RegisterMimeFilter,IClassFactory*,pCF,REFCLSID,rclsid,LPCWSTR,pwzType) \
    ICOM_METHOD2 (HRESULT,UnregisterMimeFilter,IClassFactory*,pCF,LPCWSTR,pwzType) \
    ICOM_METHOD6 (HRESULT,CreateBinding,LPBC,pBC,LPCWSTR,szUrl,IUnknown*,pUnkOuter,IUnknown**,ppUnk,IInternetProtocol**,ppOInetProt,DWORD,dwOption) \
    ICOM_METHOD4 (HRESULT,SetSessionOption,DWORD,dwOption,LPVOID,pBuffer,DWORD,dwBufferLength,DWORD,dwReserved) \
    ICOM_METHOD4 (HRESULT,GetSessionOption,DWORD,dwOption,LPVOID,pBuffer,DWORD*,pdwBufferLength,DWORD,dwReserved)

/*** IUnknown methods ***/
#define IInternetSession_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetSession_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetSession_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetSession methods ***/
#define IInternetSession_RegisterNameSpace(p,a,b,c,d,e,f) (p)->lpVtbl->RegisterNameSpace(p,a,b,c,d,e,f)
#define IInternetSession_UnregisterNameSpace(p,a,b) (p)->lpVtbl->UnregisterNameSpace(p,a,b)
#define IInternetSession_RegisterMimeFilter(p,a,b,c) (p)->lpVtbl->RegisterMimeFilter(p,a,b,c)
#define IInternetSession_UnregisterMimeFilter(p,a,b) (p)->lpVtbl->UnregisterMimeFilter(p,a,b)
#define IInternetSession_CreateBinding(p,a,b,c,d,e,f) (p)->lpVtbl->CreateBinding(p,a,b,c,d,e,f)
#define IInternetSession_SetSessionOption(p,a,b,c,d) (p)->lpVtbl->SetSessionOption(p,a,b,c,d)
#define IInternetSession_GetSessionOption(p,a,b,c,d) (p)->lpVtbl->GetSessionOption(p,a,b,c,d)

#endif

HRESULT CALLBACK IInternetSession_RegisterNameSpace_Proxy(
    IInternetSession* This,
    IClassFactory* pCF,
    REFCLSID rclsid,
    LPCWSTR pwzProtocol,
    ULONG cPatterns,
    const LPCWSTR* ppwzPatterns,
    DWORD dwReserved);
void __RPC_STUB IInternetSession_RegisterNameSpace_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSession_UnregisterNameSpace_Proxy(
    IInternetSession* This,
    IClassFactory* pCF,
    LPCWSTR pszProtocol);
void __RPC_STUB IInternetSession_UnregisterNameSpace_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSession_RegisterMimeFilter_Proxy(
    IInternetSession* This,
    IClassFactory* pCF,
    REFCLSID rclsid,
    LPCWSTR pwzType);
void __RPC_STUB IInternetSession_RegisterMimeFilter_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSession_UnregisterMimeFilter_Proxy(
    IInternetSession* This,
    IClassFactory* pCF,
    LPCWSTR pwzType);
void __RPC_STUB IInternetSession_UnregisterMimeFilter_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSession_CreateBinding_Proxy(
    IInternetSession* This,
    LPBC pBC,
    LPCWSTR szUrl,
    IUnknown* pUnkOuter,
    IUnknown** ppUnk,
    IInternetProtocol** ppOInetProt,
    DWORD dwOption);
void __RPC_STUB IInternetSession_CreateBinding_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSession_SetSessionOption_Proxy(
    IInternetSession* This,
    DWORD dwOption,
    LPVOID pBuffer,
    DWORD dwBufferLength,
    DWORD dwReserved);
void __RPC_STUB IInternetSession_SetSessionOption_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSession_GetSessionOption_Proxy(
    IInternetSession* This,
    DWORD dwOption,
    LPVOID pBuffer,
    DWORD* pdwBufferLength,
    DWORD dwReserved);
void __RPC_STUB IInternetSession_GetSessionOption_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetSession_INTERFACE_DEFINED__ */

typedef struct IInternetThreadSwitch IInternetThreadSwitch;
typedef IInternetThreadSwitch *LPIINTERNETTHREADSWITCH;

/*****************************************************************************
 * IInternetThreadSwitch interface
 */
#ifndef __IInternetThreadSwitch_INTERFACE_DEFINED__
#define __IInternetThreadSwitch_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetThreadSwitch, 0x79eac9e8, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetThreadSwitch: IUnknown {

    virtual HRESULT CALLBACK Prepare(
        ) = 0;

    virtual HRESULT CALLBACK Continue(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetThreadSwitchVtbl IInternetThreadSwitchVtbl;
struct IInternetThreadSwitch {
    const IInternetThreadSwitchVtbl* lpVtbl;
};
struct IInternetThreadSwitchVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetThreadSwitch* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetThreadSwitch* This);

    ULONG (CALLBACK *Release)(
        IInternetThreadSwitch* This);

    /*** IInternetThreadSwitch methods ***/
    HRESULT (CALLBACK *Prepare)(
        IInternetThreadSwitch* This);

    HRESULT (CALLBACK *Continue)(
        IInternetThreadSwitch* This);

};

#define IInternetThreadSwitch_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD  (HRESULT,Prepare) \
    ICOM_METHOD  (HRESULT,Continue)

/*** IUnknown methods ***/
#define IInternetThreadSwitch_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetThreadSwitch_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetThreadSwitch_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetThreadSwitch methods ***/
#define IInternetThreadSwitch_Prepare(p) (p)->lpVtbl->Prepare(p)
#define IInternetThreadSwitch_Continue(p) (p)->lpVtbl->Continue(p)

#endif

HRESULT CALLBACK IInternetThreadSwitch_Prepare_Proxy(
    IInternetThreadSwitch* This);
void __RPC_STUB IInternetThreadSwitch_Prepare_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetThreadSwitch_Continue_Proxy(
    IInternetThreadSwitch* This);
void __RPC_STUB IInternetThreadSwitch_Continue_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetThreadSwitch_INTERFACE_DEFINED__ */

typedef struct IInternetPriority IInternetPriority;
typedef IInternetPriority *LPIINTERNETPRIORITY;

/*****************************************************************************
 * IInternetPriority interface
 */
#ifndef __IInternetPriority_INTERFACE_DEFINED__
#define __IInternetPriority_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetPriority, 0x79eac9eb, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetPriority: IUnknown {

    virtual HRESULT CALLBACK SetPriority(
        LONG nPriority) = 0;

    virtual HRESULT CALLBACK GetPriority(
        LONG* pnPriority) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetPriorityVtbl IInternetPriorityVtbl;
struct IInternetPriority {
    const IInternetPriorityVtbl* lpVtbl;
};
struct IInternetPriorityVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetPriority* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetPriority* This);

    ULONG (CALLBACK *Release)(
        IInternetPriority* This);

    /*** IInternetPriority methods ***/
    HRESULT (CALLBACK *SetPriority)(
        IInternetPriority* This,
        LONG nPriority);

    HRESULT (CALLBACK *GetPriority)(
        IInternetPriority* This,
        LONG* pnPriority);

};

#define IInternetPriority_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,SetPriority,LONG,nPriority) \
    ICOM_METHOD1 (HRESULT,GetPriority,LONG*,pnPriority)

/*** IUnknown methods ***/
#define IInternetPriority_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetPriority_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetPriority_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetPriority methods ***/
#define IInternetPriority_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
#define IInternetPriority_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)

#endif

HRESULT CALLBACK IInternetPriority_SetPriority_Proxy(
    IInternetPriority* This,
    LONG nPriority);
void __RPC_STUB IInternetPriority_SetPriority_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetPriority_GetPriority_Proxy(
    IInternetPriority* This,
    LONG* pnPriority);
void __RPC_STUB IInternetPriority_GetPriority_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetPriority_INTERFACE_DEFINED__ */

typedef IInternetProtocolInfo *LPIINTERNETPROTOCOLINFO;

typedef enum _tagPARSEACTION {
    PARSE_CANONICALIZE = 1,
    PARSE_FRIENDLY,
    PARSE_SECURITY_URL,
    PARSE_ROOTDOCUMENT,
    PARSE_DOCUMENT,
    PARSE_ANCHOR,
    PARSE_ENCODE,
    PARSE_DECODE,
    PARSE_PATH_FROM_URL,
    PARSE_URL_FROM_PATH,
    PARSE_MIME,
    PARSE_SERVER,
    PARSE_SCHEMA,
    PARSE_SITE,
    PARSE_DOMAIN,
    PARSE_LOCATION,
    PARSE_SECURITY_DOMAIN,
    PARSE_ESCAPE,
    PARSE_UNESCAPE
} PARSEACTION;

typedef enum _tagPSUACTION {
    PSU_DEFAULT = 1,
    PSU_SECURITY_URL_ONLY
} PSUACTION;

typedef enum _tagQUERYOPTION {
    QUERY_EXPIRATION_DATE = 1,
    QUERY_TIME_OF_LAST_CHANGE,
    QUERY_CONTENT_ENCODING,
    QUERY_CONTENT_TYPE,
    QUERY_REFRESH,
    QUERY_RECOMBINE,
    QUERY_CAN_NAVIGATE,
    QUERY_USES_NETWORK,
    QUERY_IS_CACHED,
    QUERY_IS_INSTALLEDENTRY,
    QUERY_IS_CACHED_OR_MAPPED,
    QUERY_USES_CACHE,
    QUERY_IS_SECURE,
    QUERY_IS_SAFE
} QUERYOPTION;

/*****************************************************************************
 * IInternetProtocolInfo interface
 */
#ifndef __IInternetProtocolInfo_INTERFACE_DEFINED__
#define __IInternetProtocolInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetProtocolInfo, 0x79eac9ec, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetProtocolInfo: IUnknown {

    virtual HRESULT CALLBACK ParseUrl(
        LPCWSTR pwzUrl,
        PARSEACTION ParseAction,
        DWORD dwParseFlags,
        LPWSTR pwzResult,
        DWORD cchResult,
        DWORD* pcchResult,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK CombineUrl(
        LPCWSTR pwzBaseUrl,
        LPCWSTR pwzRelativeUrl,
        DWORD dwCombineFlags,
        LPWSTR pwzResult,
        DWORD cchResult,
        DWORD* pcchResult,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK CompareUrl(
        LPCWSTR pwzUrl1,
        LPCWSTR pwzUrl2,
        DWORD dwCompareFlags) = 0;

    virtual HRESULT CALLBACK QueryInfo(
        LPCWSTR pwzUrl,
        QUERYOPTION OueryOption,
        DWORD dwQueryFlags,
        LPVOID pBuffer,
        DWORD cbBuffer,
        DWORD* pcbBuf,
        DWORD dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetProtocolInfoVtbl IInternetProtocolInfoVtbl;
struct IInternetProtocolInfo {
    const IInternetProtocolInfoVtbl* lpVtbl;
};
struct IInternetProtocolInfoVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetProtocolInfo* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetProtocolInfo* This);

    ULONG (CALLBACK *Release)(
        IInternetProtocolInfo* This);

    /*** IInternetProtocolInfo methods ***/
    HRESULT (CALLBACK *ParseUrl)(
        IInternetProtocolInfo* This,
        LPCWSTR pwzUrl,
        PARSEACTION ParseAction,
        DWORD dwParseFlags,
        LPWSTR pwzResult,
        DWORD cchResult,
        DWORD* pcchResult,
        DWORD dwReserved);

    HRESULT (CALLBACK *CombineUrl)(
        IInternetProtocolInfo* This,
        LPCWSTR pwzBaseUrl,
        LPCWSTR pwzRelativeUrl,
        DWORD dwCombineFlags,
        LPWSTR pwzResult,
        DWORD cchResult,
        DWORD* pcchResult,
        DWORD dwReserved);

    HRESULT (CALLBACK *CompareUrl)(
        IInternetProtocolInfo* This,
        LPCWSTR pwzUrl1,
        LPCWSTR pwzUrl2,
        DWORD dwCompareFlags);

    HRESULT (CALLBACK *QueryInfo)(
        IInternetProtocolInfo* This,
        LPCWSTR pwzUrl,
        QUERYOPTION OueryOption,
        DWORD dwQueryFlags,
        LPVOID pBuffer,
        DWORD cbBuffer,
        DWORD* pcbBuf,
        DWORD dwReserved);

};

#define IInternetProtocolInfo_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD7 (HRESULT,ParseUrl,LPCWSTR,pwzUrl,PARSEACTION,ParseAction,DWORD,dwParseFlags,LPWSTR,pwzResult,DWORD,cchResult,DWORD*,pcchResult,DWORD,dwReserved) \
    ICOM_METHOD7 (HRESULT,CombineUrl,LPCWSTR,pwzBaseUrl,LPCWSTR,pwzRelativeUrl,DWORD,dwCombineFlags,LPWSTR,pwzResult,DWORD,cchResult,DWORD*,pcchResult,DWORD,dwReserved) \
    ICOM_METHOD3 (HRESULT,CompareUrl,LPCWSTR,pwzUrl1,LPCWSTR,pwzUrl2,DWORD,dwCompareFlags) \
    ICOM_METHOD7 (HRESULT,QueryInfo,LPCWSTR,pwzUrl,QUERYOPTION,OueryOption,DWORD,dwQueryFlags,LPVOID,pBuffer,DWORD,cbBuffer,DWORD*,pcbBuf,DWORD,dwReserved)

/*** IUnknown methods ***/
#define IInternetProtocolInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetProtocolInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetProtocolInfo_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetProtocolInfo methods ***/
#define IInternetProtocolInfo_ParseUrl(p,a,b,c,d,e,f,g) (p)->lpVtbl->ParseUrl(p,a,b,c,d,e,f,g)
#define IInternetProtocolInfo_CombineUrl(p,a,b,c,d,e,f,g) (p)->lpVtbl->CombineUrl(p,a,b,c,d,e,f,g)
#define IInternetProtocolInfo_CompareUrl(p,a,b,c) (p)->lpVtbl->CompareUrl(p,a,b,c)
#define IInternetProtocolInfo_QueryInfo(p,a,b,c,d,e,f,g) (p)->lpVtbl->QueryInfo(p,a,b,c,d,e,f,g)

#endif

HRESULT CALLBACK IInternetProtocolInfo_ParseUrl_Proxy(
    IInternetProtocolInfo* This,
    LPCWSTR pwzUrl,
    PARSEACTION ParseAction,
    DWORD dwParseFlags,
    LPWSTR pwzResult,
    DWORD cchResult,
    DWORD* pcchResult,
    DWORD dwReserved);
void __RPC_STUB IInternetProtocolInfo_ParseUrl_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolInfo_CombineUrl_Proxy(
    IInternetProtocolInfo* This,
    LPCWSTR pwzBaseUrl,
    LPCWSTR pwzRelativeUrl,
    DWORD dwCombineFlags,
    LPWSTR pwzResult,
    DWORD cchResult,
    DWORD* pcchResult,
    DWORD dwReserved);
void __RPC_STUB IInternetProtocolInfo_CombineUrl_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolInfo_CompareUrl_Proxy(
    IInternetProtocolInfo* This,
    LPCWSTR pwzUrl1,
    LPCWSTR pwzUrl2,
    DWORD dwCompareFlags);
void __RPC_STUB IInternetProtocolInfo_CompareUrl_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetProtocolInfo_QueryInfo_Proxy(
    IInternetProtocolInfo* This,
    LPCWSTR pwzUrl,
    QUERYOPTION OueryOption,
    DWORD dwQueryFlags,
    LPVOID pBuffer,
    DWORD cbBuffer,
    DWORD* pcbBuf,
    DWORD dwReserved);
void __RPC_STUB IInternetProtocolInfo_QueryInfo_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetProtocolInfo_INTERFACE_DEFINED__ */

typedef struct IInternetSecurityMgrSite IInternetSecurityMgrSite;
/*****************************************************************************
 * IInternetSecurityMgrSite interface
 */
#ifndef __IInternetSecurityMgrSite_INTERFACE_DEFINED__
#define __IInternetSecurityMgrSite_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetSecurityMgrSite, 0x79eac9ed, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetSecurityMgrSite: IUnknown {

    virtual HRESULT CALLBACK GetWindow(
        HWND* phwnd) = 0;

    virtual HRESULT CALLBACK EnableModeless(
        BOOL fEnable) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetSecurityMgrSiteVtbl IInternetSecurityMgrSiteVtbl;
struct IInternetSecurityMgrSite {
    const IInternetSecurityMgrSiteVtbl* lpVtbl;
};
struct IInternetSecurityMgrSiteVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetSecurityMgrSite* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetSecurityMgrSite* This);

    ULONG (CALLBACK *Release)(
        IInternetSecurityMgrSite* This);

    /*** IInternetSecurityMgrSite methods ***/
    HRESULT (CALLBACK *GetWindow)(
        IInternetSecurityMgrSite* This,
        HWND* phwnd);

    HRESULT (CALLBACK *EnableModeless)(
        IInternetSecurityMgrSite* This,
        BOOL fEnable);

};

#define IInternetSecurityMgrSite_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,GetWindow,HWND*,phwnd) \
    ICOM_METHOD1 (HRESULT,EnableModeless,BOOL,fEnable)

/*** IUnknown methods ***/
#define IInternetSecurityMgrSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetSecurityMgrSite_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetSecurityMgrSite_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetSecurityMgrSite methods ***/
#define IInternetSecurityMgrSite_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IInternetSecurityMgrSite_EnableModeless(p,a) (p)->lpVtbl->EnableModeless(p,a)

#endif

HRESULT CALLBACK IInternetSecurityMgrSite_GetWindow_Proxy(
    IInternetSecurityMgrSite* This,
    HWND* phwnd);
void __RPC_STUB IInternetSecurityMgrSite_GetWindow_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetSecurityMgrSite_EnableModeless_Proxy(
    IInternetSecurityMgrSite* This,
    BOOL fEnable);
void __RPC_STUB IInternetSecurityMgrSite_EnableModeless_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetSecurityMgrSite_INTERFACE_DEFINED__ */

typedef enum {
    PUAF_DEFAULT = 0x0,
    PUAF_NOUI = 0x1,
    PUAF_ISFILE = 0x2,
    PUAF_WARN_IF_DENIED = 0x4,
    PUAF_FORCEUI_FOREGROUND = 0x8,
    PUAF_CHECK_TIFS = 0x10,
    PUAF_DONTCHECKBOXINDIALOG = 0x20,
    PUAF_TRUSTED = 0x40,
    PUAF_ACCEPT_WILDCARD_SCHEME = 0x80,
    PUAF_ENFORCERESTRICTED = 0x100
} PUAF;

typedef enum {
    SZM_CREATE = 0x0,
    SZM_DELETE = 0x1
} SZM_FLAGS;

/*****************************************************************************
 * IInternetSecurityManager interface (v0.0)
 */
DEFINE_GUID(IID_IInternetSecurityManager, 0x79eac9ee, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
extern RPC_IF_HANDLE IInternetSecurityManager_v0_0_c_ifspec;
extern RPC_IF_HANDLE IInternetSecurityManager_v0_0_s_ifspec;
HRESULT SetSecuritySite(
    IInternetSecurityMgrSite* pSite);
HRESULT GetSecuritySite(
    IInternetSecurityMgrSite** ppSite);
HRESULT MapUrlToZone(
    LPCWSTR pwszUrl,
    DWORD* pdwZone,
    DWORD dwFlags);
HRESULT GetSecurityId(
    LPCWSTR pwszUrl,
    BYTE* pbSecurityId,
    DWORD* pcbSecurityId,
    DWORD_PTR dwReserved);
HRESULT ProcessUrlAction(
    LPCWSTR pwszUrl,
    DWORD dwAction,
    BYTE* pPolicy,
    DWORD cbPolicy,
    BYTE* pContext,
    DWORD cbContext,
    DWORD dwFlags,
    DWORD dwReserved);
HRESULT QueryCustomPolicy(
    LPCWSTR pwszUrl,
    REFGUID guidKey,
    BYTE** ppPolicy,
    DWORD* pcbPolicy,
    BYTE* pContext,
    DWORD cbContext,
    DWORD dwReserved);
HRESULT SetZoneMapping(
    DWORD dwZone,
    LPCWSTR lpszPattern,
    DWORD dwFlags);
HRESULT GetZoneMappings(
    DWORD dwZone,
    IEnumString** ppenumString,
    DWORD dwFlags);

typedef struct IInternetHostSecurityManager IInternetHostSecurityManager;
/*****************************************************************************
 * IInternetHostSecurityManager interface
 */
#ifndef __IInternetHostSecurityManager_INTERFACE_DEFINED__
#define __IInternetHostSecurityManager_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetHostSecurityManager, 0x3af280b6, 0xcb3f, 0x11d0, 0x89,0x1e, 0x00,0xc0,0x4f,0xb6,0xbf,0xc4);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetHostSecurityManager: IUnknown {

    virtual HRESULT CALLBACK GetSecurityId(
        BYTE* pbSecurityId,
        DWORD* pcbSecurityId,
        DWORD_PTR dwReserved) = 0;

    virtual HRESULT CALLBACK ProcessUrlAction(
        DWORD dwAction,
        BYTE* pPolicy,
        DWORD cbPolicy,
        BYTE* pContext,
        DWORD cbContext,
        DWORD dwFlags,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK QueryCustomPolicy(
        REFGUID guidKey,
        BYTE** ppPolicy,
        DWORD* pcbPolicy,
        BYTE* pContext,
        DWORD cbContext,
        DWORD dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetHostSecurityManagerVtbl IInternetHostSecurityManagerVtbl;
struct IInternetHostSecurityManager {
    const IInternetHostSecurityManagerVtbl* lpVtbl;
};
struct IInternetHostSecurityManagerVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetHostSecurityManager* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetHostSecurityManager* This);

    ULONG (CALLBACK *Release)(
        IInternetHostSecurityManager* This);

    /*** IInternetHostSecurityManager methods ***/
    HRESULT (CALLBACK *GetSecurityId)(
        IInternetHostSecurityManager* This,
        BYTE* pbSecurityId,
        DWORD* pcbSecurityId,
        DWORD_PTR dwReserved);

    HRESULT (CALLBACK *ProcessUrlAction)(
        IInternetHostSecurityManager* This,
        DWORD dwAction,
        BYTE* pPolicy,
        DWORD cbPolicy,
        BYTE* pContext,
        DWORD cbContext,
        DWORD dwFlags,
        DWORD dwReserved);

    HRESULT (CALLBACK *QueryCustomPolicy)(
        IInternetHostSecurityManager* This,
        REFGUID guidKey,
        BYTE** ppPolicy,
        DWORD* pcbPolicy,
        BYTE* pContext,
        DWORD cbContext,
        DWORD dwReserved);

};

#define IInternetHostSecurityManager_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,GetSecurityId,BYTE*,pbSecurityId,DWORD*,pcbSecurityId,DWORD_PTR,dwReserved) \
    ICOM_METHOD7 (HRESULT,ProcessUrlAction,DWORD,dwAction,BYTE*,pPolicy,DWORD,cbPolicy,BYTE*,pContext,DWORD,cbContext,DWORD,dwFlags,DWORD,dwReserved) \
    ICOM_METHOD6 (HRESULT,QueryCustomPolicy,REFGUID,guidKey,BYTE**,ppPolicy,DWORD*,pcbPolicy,BYTE*,pContext,DWORD,cbContext,DWORD,dwReserved)

/*** IUnknown methods ***/
#define IInternetHostSecurityManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetHostSecurityManager_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetHostSecurityManager_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetHostSecurityManager methods ***/
#define IInternetHostSecurityManager_GetSecurityId(p,a,b,c) (p)->lpVtbl->GetSecurityId(p,a,b,c)
#define IInternetHostSecurityManager_ProcessUrlAction(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessUrlAction(p,a,b,c,d,e,f,g)
#define IInternetHostSecurityManager_QueryCustomPolicy(p,a,b,c,d,e,f) (p)->lpVtbl->QueryCustomPolicy(p,a,b,c,d,e,f)

#endif

HRESULT CALLBACK IInternetHostSecurityManager_GetSecurityId_Proxy(
    IInternetHostSecurityManager* This,
    BYTE* pbSecurityId,
    DWORD* pcbSecurityId,
    DWORD_PTR dwReserved);
void __RPC_STUB IInternetHostSecurityManager_GetSecurityId_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetHostSecurityManager_ProcessUrlAction_Proxy(
    IInternetHostSecurityManager* This,
    DWORD dwAction,
    BYTE* pPolicy,
    DWORD cbPolicy,
    BYTE* pContext,
    DWORD cbContext,
    DWORD dwFlags,
    DWORD dwReserved);
void __RPC_STUB IInternetHostSecurityManager_ProcessUrlAction_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetHostSecurityManager_QueryCustomPolicy_Proxy(
    IInternetHostSecurityManager* This,
    REFGUID guidKey,
    BYTE** ppPolicy,
    DWORD* pcbPolicy,
    BYTE* pContext,
    DWORD cbContext,
    DWORD dwReserved);
void __RPC_STUB IInternetHostSecurityManager_QueryCustomPolicy_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetHostSecurityManager_INTERFACE_DEFINED__ */

typedef struct IInternetZoneManager IInternetZoneManager;
typedef IInternetZoneManager *LPURLZONEMANAGER;

typedef enum tagURLZONE {
    URLZONE_PREDEFINED_MIN = 0,
    URLZONE_LOCAL_MACHINE = 0,
    URLZONE_INTRANET,
    URLZONE_TRUSTED,
    URLZONE_INTERNET,
    URLZONE_UNTRUSTED,
    URLZONE_PREDEFINED_MAX = 999,
    URLZONE_USER_MIN = 1000,
    URLZONE_USER_MAX = 10000
} URLZONE;

typedef enum tagURLTEMPLATE {
    URLTEMPLATE_CUSTOM = 0x0,
    URLTEMPLATE_PREDEFINED_MIN = 0x10000,
    URLTEMPLATE_LOW = 0x10000,
    URLTEMPLATE_MEDLOW = 0x10500,
    URLTEMPLATE_MEDIUM = 0x11000,
    URLTEMPLATE_HIGH = 0x12000,
    URLTEMPLATE_PREDEFINED_MAX = 0x20000
} URLTEMPLATE;

enum {
    MAX_ZONE_PATH = 260,
    MAX_ZONE_DESCRIPTION = 200
};

typedef enum {
    ZAFLAGS_CUSTOM_EDIT = 0x1,
    ZAFLAGS_ADD_SITES = 0x2,
    ZAFLAGS_REQUIRE_VERIFICATION = 0x4,
    ZAFLAGS_INCLUDE_PROXY_OVERRIDE = 0x8,
    ZAFLAGS_INCLUDE_INTRANET_SITES = 0x10,
    ZAFLAGS_NO_UI = 0x20,
    ZAFLAGS_SUPPORTS_VERIFICATION = 0x40,
    ZAFLAGS_UNC_AS_INTRANET = 0x80
} ZAFLAGS;

typedef struct _ZONEATTRIBUTES {
    ULONG cbSize;
    WCHAR szDisplayName[260];
    WCHAR szDescription[200];
    WCHAR szIconPath[260];
    DWORD dwTemplateMinLevel;
    DWORD dwTemplateRecommended;
    DWORD dwTemplateCurrentLevel;
    DWORD dwFlags;
} ZONEATTRIBUTES, *LPZONEATTRIBUTES;

typedef enum _URLZONEREG {
    URLZONEREG_DEFAULT = 0,
    URLZONEREG_HKLM,
    URLZONEREG_HKCU
} URLZONEREG;

/*****************************************************************************
 * IInternetZoneManager interface
 */
#ifndef __IInternetZoneManager_INTERFACE_DEFINED__
#define __IInternetZoneManager_INTERFACE_DEFINED__

DEFINE_GUID(IID_IInternetZoneManager, 0x79eac9ef, 0xbaf9, 0x11ce, 0x8c,0x82, 0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IInternetZoneManager: IUnknown {

    virtual HRESULT CALLBACK GetZoneAttributes(
        DWORD dwZone,
        ZONEATTRIBUTES* pZoneAttributes) = 0;

    virtual HRESULT CALLBACK SetZoneAttributes(
        DWORD dwZone,
        ZONEATTRIBUTES* pZoneAttributes) = 0;

    virtual HRESULT CALLBACK GetZoneCustomPolicy(
        DWORD dwZone,
        REFGUID guidKey,
        BYTE** ppPolicy,
        DWORD* pcbPolicy,
        URLZONEREG urlZoneReg) = 0;

    virtual HRESULT CALLBACK SetZoneCustomPolicy(
        DWORD dwZone,
        REFGUID guidKey,
        BYTE* pPolicy,
        DWORD cbPolicy,
        URLZONEREG urlZoneReg) = 0;

    virtual HRESULT CALLBACK GetZoneActionPolicy(
        DWORD dwZone,
        DWORD dwAction,
        BYTE* pPolicy,
        DWORD cbPolicy,
        URLZONEREG urlZoneReg) = 0;

    virtual HRESULT CALLBACK SetZoneActionPolicy(
        DWORD dwZone,
        DWORD dwAction,
        BYTE* pPolicy,
        DWORD cbPolicy,
        URLZONEREG urlZoneReg) = 0;

    virtual HRESULT CALLBACK PromptAction(
        DWORD dwAction,
        HWND hwndParent,
        LPCWSTR pwszUrl,
        LPCWSTR pwszText,
        DWORD dwPromptFlags) = 0;

    virtual HRESULT CALLBACK LogAction(
        DWORD dwAction,
        LPCWSTR pwszUrl,
        LPCWSTR pwszText,
        DWORD dwLogFlags) = 0;

    virtual HRESULT CALLBACK CreateZoneEnumerator(
        DWORD* pdwEnum,
        DWORD* pdwCount,
        DWORD dwFlags) = 0;

    virtual HRESULT CALLBACK GetZoneAt(
        DWORD dwEnum,
        DWORD dwIndex,
        DWORD* pdwZone) = 0;

    virtual HRESULT CALLBACK DestroyZoneEnumerator(
        DWORD dwEnum) = 0;

    virtual HRESULT CALLBACK CopyTemplatePoliciesToZone(
        DWORD dwTemplate,
        DWORD dwZone,
        DWORD dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IInternetZoneManagerVtbl IInternetZoneManagerVtbl;
struct IInternetZoneManager {
    const IInternetZoneManagerVtbl* lpVtbl;
};
struct IInternetZoneManagerVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IInternetZoneManager* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IInternetZoneManager* This);

    ULONG (CALLBACK *Release)(
        IInternetZoneManager* This);

    /*** IInternetZoneManager methods ***/
    HRESULT (CALLBACK *GetZoneAttributes)(
        IInternetZoneManager* This,
        DWORD dwZone,
        ZONEATTRIBUTES* pZoneAttributes);

    HRESULT (CALLBACK *SetZoneAttributes)(
        IInternetZoneManager* This,
        DWORD dwZone,
        ZONEATTRIBUTES* pZoneAttributes);

    HRESULT (CALLBACK *GetZoneCustomPolicy)(
        IInternetZoneManager* This,
        DWORD dwZone,
        REFGUID guidKey,
        BYTE** ppPolicy,
        DWORD* pcbPolicy,
        URLZONEREG urlZoneReg);

    HRESULT (CALLBACK *SetZoneCustomPolicy)(
        IInternetZoneManager* This,
        DWORD dwZone,
        REFGUID guidKey,
        BYTE* pPolicy,
        DWORD cbPolicy,
        URLZONEREG urlZoneReg);

    HRESULT (CALLBACK *GetZoneActionPolicy)(
        IInternetZoneManager* This,
        DWORD dwZone,
        DWORD dwAction,
        BYTE* pPolicy,
        DWORD cbPolicy,
        URLZONEREG urlZoneReg);

    HRESULT (CALLBACK *SetZoneActionPolicy)(
        IInternetZoneManager* This,
        DWORD dwZone,
        DWORD dwAction,
        BYTE* pPolicy,
        DWORD cbPolicy,
        URLZONEREG urlZoneReg);

    HRESULT (CALLBACK *PromptAction)(
        IInternetZoneManager* This,
        DWORD dwAction,
        HWND hwndParent,
        LPCWSTR pwszUrl,
        LPCWSTR pwszText,
        DWORD dwPromptFlags);

    HRESULT (CALLBACK *LogAction)(
        IInternetZoneManager* This,
        DWORD dwAction,
        LPCWSTR pwszUrl,
        LPCWSTR pwszText,
        DWORD dwLogFlags);

    HRESULT (CALLBACK *CreateZoneEnumerator)(
        IInternetZoneManager* This,
        DWORD* pdwEnum,
        DWORD* pdwCount,
        DWORD dwFlags);

    HRESULT (CALLBACK *GetZoneAt)(
        IInternetZoneManager* This,
        DWORD dwEnum,
        DWORD dwIndex,
        DWORD* pdwZone);

    HRESULT (CALLBACK *DestroyZoneEnumerator)(
        IInternetZoneManager* This,
        DWORD dwEnum);

    HRESULT (CALLBACK *CopyTemplatePoliciesToZone)(
        IInternetZoneManager* This,
        DWORD dwTemplate,
        DWORD dwZone,
        DWORD dwReserved);

};

#define IInternetZoneManager_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,GetZoneAttributes,DWORD,dwZone,ZONEATTRIBUTES*,pZoneAttributes) \
    ICOM_METHOD2 (HRESULT,SetZoneAttributes,DWORD,dwZone,ZONEATTRIBUTES*,pZoneAttributes) \
    ICOM_METHOD5 (HRESULT,GetZoneCustomPolicy,DWORD,dwZone,REFGUID,guidKey,BYTE**,ppPolicy,DWORD*,pcbPolicy,URLZONEREG,urlZoneReg) \
    ICOM_METHOD5 (HRESULT,SetZoneCustomPolicy,DWORD,dwZone,REFGUID,guidKey,BYTE*,pPolicy,DWORD,cbPolicy,URLZONEREG,urlZoneReg) \
    ICOM_METHOD5 (HRESULT,GetZoneActionPolicy,DWORD,dwZone,DWORD,dwAction,BYTE*,pPolicy,DWORD,cbPolicy,URLZONEREG,urlZoneReg) \
    ICOM_METHOD5 (HRESULT,SetZoneActionPolicy,DWORD,dwZone,DWORD,dwAction,BYTE*,pPolicy,DWORD,cbPolicy,URLZONEREG,urlZoneReg) \
    ICOM_METHOD5 (HRESULT,PromptAction,DWORD,dwAction,HWND,hwndParent,LPCWSTR,pwszUrl,LPCWSTR,pwszText,DWORD,dwPromptFlags) \
    ICOM_METHOD4 (HRESULT,LogAction,DWORD,dwAction,LPCWSTR,pwszUrl,LPCWSTR,pwszText,DWORD,dwLogFlags) \
    ICOM_METHOD3 (HRESULT,CreateZoneEnumerator,DWORD*,pdwEnum,DWORD*,pdwCount,DWORD,dwFlags) \
    ICOM_METHOD3 (HRESULT,GetZoneAt,DWORD,dwEnum,DWORD,dwIndex,DWORD*,pdwZone) \
    ICOM_METHOD1 (HRESULT,DestroyZoneEnumerator,DWORD,dwEnum) \
    ICOM_METHOD3 (HRESULT,CopyTemplatePoliciesToZone,DWORD,dwTemplate,DWORD,dwZone,DWORD,dwReserved)

/*** IUnknown methods ***/
#define IInternetZoneManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IInternetZoneManager_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IInternetZoneManager_Release(p) (p)->lpVtbl->Release(p)
/*** IInternetZoneManager methods ***/
#define IInternetZoneManager_GetZoneAttributes(p,a,b) (p)->lpVtbl->GetZoneAttributes(p,a,b)
#define IInternetZoneManager_SetZoneAttributes(p,a,b) (p)->lpVtbl->SetZoneAttributes(p,a,b)
#define IInternetZoneManager_GetZoneCustomPolicy(p,a,b,c,d,e) (p)->lpVtbl->GetZoneCustomPolicy(p,a,b,c,d,e)
#define IInternetZoneManager_SetZoneCustomPolicy(p,a,b,c,d,e) (p)->lpVtbl->SetZoneCustomPolicy(p,a,b,c,d,e)
#define IInternetZoneManager_GetZoneActionPolicy(p,a,b,c,d,e) (p)->lpVtbl->GetZoneActionPolicy(p,a,b,c,d,e)
#define IInternetZoneManager_SetZoneActionPolicy(p,a,b,c,d,e) (p)->lpVtbl->SetZoneActionPolicy(p,a,b,c,d,e)
#define IInternetZoneManager_PromptAction(p,a,b,c,d,e) (p)->lpVtbl->PromptAction(p,a,b,c,d,e)
#define IInternetZoneManager_LogAction(p,a,b,c,d) (p)->lpVtbl->LogAction(p,a,b,c,d)
#define IInternetZoneManager_CreateZoneEnumerator(p,a,b,c) (p)->lpVtbl->CreateZoneEnumerator(p,a,b,c)
#define IInternetZoneManager_GetZoneAt(p,a,b,c) (p)->lpVtbl->GetZoneAt(p,a,b,c)
#define IInternetZoneManager_DestroyZoneEnumerator(p,a) (p)->lpVtbl->DestroyZoneEnumerator(p,a)
#define IInternetZoneManager_CopyTemplatePoliciesToZone(p,a,b,c) (p)->lpVtbl->CopyTemplatePoliciesToZone(p,a,b,c)

#endif

HRESULT CALLBACK IInternetZoneManager_GetZoneAttributes_Proxy(
    IInternetZoneManager* This,
    DWORD dwZone,
    ZONEATTRIBUTES* pZoneAttributes);
void __RPC_STUB IInternetZoneManager_GetZoneAttributes_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_SetZoneAttributes_Proxy(
    IInternetZoneManager* This,
    DWORD dwZone,
    ZONEATTRIBUTES* pZoneAttributes);
void __RPC_STUB IInternetZoneManager_SetZoneAttributes_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_GetZoneCustomPolicy_Proxy(
    IInternetZoneManager* This,
    DWORD dwZone,
    REFGUID guidKey,
    BYTE** ppPolicy,
    DWORD* pcbPolicy,
    URLZONEREG urlZoneReg);
void __RPC_STUB IInternetZoneManager_GetZoneCustomPolicy_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_SetZoneCustomPolicy_Proxy(
    IInternetZoneManager* This,
    DWORD dwZone,
    REFGUID guidKey,
    BYTE* pPolicy,
    DWORD cbPolicy,
    URLZONEREG urlZoneReg);
void __RPC_STUB IInternetZoneManager_SetZoneCustomPolicy_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_GetZoneActionPolicy_Proxy(
    IInternetZoneManager* This,
    DWORD dwZone,
    DWORD dwAction,
    BYTE* pPolicy,
    DWORD cbPolicy,
    URLZONEREG urlZoneReg);
void __RPC_STUB IInternetZoneManager_GetZoneActionPolicy_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_SetZoneActionPolicy_Proxy(
    IInternetZoneManager* This,
    DWORD dwZone,
    DWORD dwAction,
    BYTE* pPolicy,
    DWORD cbPolicy,
    URLZONEREG urlZoneReg);
void __RPC_STUB IInternetZoneManager_SetZoneActionPolicy_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_PromptAction_Proxy(
    IInternetZoneManager* This,
    DWORD dwAction,
    HWND hwndParent,
    LPCWSTR pwszUrl,
    LPCWSTR pwszText,
    DWORD dwPromptFlags);
void __RPC_STUB IInternetZoneManager_PromptAction_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_LogAction_Proxy(
    IInternetZoneManager* This,
    DWORD dwAction,
    LPCWSTR pwszUrl,
    LPCWSTR pwszText,
    DWORD dwLogFlags);
void __RPC_STUB IInternetZoneManager_LogAction_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_CreateZoneEnumerator_Proxy(
    IInternetZoneManager* This,
    DWORD* pdwEnum,
    DWORD* pdwCount,
    DWORD dwFlags);
void __RPC_STUB IInternetZoneManager_CreateZoneEnumerator_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_GetZoneAt_Proxy(
    IInternetZoneManager* This,
    DWORD dwEnum,
    DWORD dwIndex,
    DWORD* pdwZone);
void __RPC_STUB IInternetZoneManager_GetZoneAt_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_DestroyZoneEnumerator_Proxy(
    IInternetZoneManager* This,
    DWORD dwEnum);
void __RPC_STUB IInternetZoneManager_DestroyZoneEnumerator_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IInternetZoneManager_CopyTemplatePoliciesToZone_Proxy(
    IInternetZoneManager* This,
    DWORD dwTemplate,
    DWORD dwZone,
    DWORD dwReserved);
void __RPC_STUB IInternetZoneManager_CopyTemplatePoliciesToZone_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IInternetZoneManager_INTERFACE_DEFINED__ */

typedef struct _tagCODEBASEHOLD {
    ULONG cbSize;
    LPWSTR szDistUnit;
    LPWSTR szCodeBase;
    DWORD dwVersionMS;
    DWORD dwVersionLS;
    DWORD dwStyle;
} CODEBASEHOLD, *LPCODEBASEHOLD;

typedef struct _tagSOFTDISTINFO {
    ULONG cbSize;
    DWORD dwFlags;
    DWORD dwAdState;
    LPWSTR szTitle;
    LPWSTR szAbstract;
    LPWSTR szHREF;
    DWORD dwInstalledVersionMS;
    DWORD dwInstalledVersionLS;
    DWORD dwUpdateVersionMS;
    DWORD dwUpdateVersionLS;
    DWORD dwAdvertisedVersionMS;
    DWORD dwAdvertisedVersionLS;
    DWORD dwReserved;
} SOFTDISTINFO, *LPSOFTDISTINFO;

typedef struct ISoftDistExt ISoftDistExt;
/*****************************************************************************
 * ISoftDistExt interface
 */
#ifndef __ISoftDistExt_INTERFACE_DEFINED__
#define __ISoftDistExt_INTERFACE_DEFINED__

DEFINE_GUID(IID_ISoftDistExt, 0xb15b8dc1, 0xc7e1, 0x11d0, 0x86,0x80, 0x00,0xaa,0x00,0xbd,0xcb,0x71);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct ISoftDistExt: IUnknown {

    virtual HRESULT CALLBACK ProcessSoftDist(
        LPCWSTR szCDFURL,
        void* pSoftDistElement,
        LPSOFTDISTINFO lpsdi) = 0;

    virtual HRESULT CALLBACK GetFirstCodeBase(
        LPWSTR* szCodeBase,
        LPDWORD dwMaxSize) = 0;

    virtual HRESULT CALLBACK GetNextCodeBase(
        LPWSTR* szCodeBase,
        LPDWORD dwMaxSize) = 0;

    virtual HRESULT CALLBACK AsyncInstallDistributionUnit(
        IBindCtx* pbc,
        LPVOID pvReserved,
        DWORD flags,
        LPCODEBASEHOLD lpcbh) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct ISoftDistExtVtbl ISoftDistExtVtbl;
struct ISoftDistExt {
    const ISoftDistExtVtbl* lpVtbl;
};
struct ISoftDistExtVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        ISoftDistExt* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        ISoftDistExt* This);

    ULONG (CALLBACK *Release)(
        ISoftDistExt* This);

    /*** ISoftDistExt methods ***/
    HRESULT (CALLBACK *ProcessSoftDist)(
        ISoftDistExt* This,
        LPCWSTR szCDFURL,
        void* pSoftDistElement,
        LPSOFTDISTINFO lpsdi);

    HRESULT (CALLBACK *GetFirstCodeBase)(
        ISoftDistExt* This,
        LPWSTR* szCodeBase,
        LPDWORD dwMaxSize);

    HRESULT (CALLBACK *GetNextCodeBase)(
        ISoftDistExt* This,
        LPWSTR* szCodeBase,
        LPDWORD dwMaxSize);

    HRESULT (CALLBACK *AsyncInstallDistributionUnit)(
        ISoftDistExt* This,
        IBindCtx* pbc,
        LPVOID pvReserved,
        DWORD flags,
        LPCODEBASEHOLD lpcbh);

};

#define ISoftDistExt_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,ProcessSoftDist,LPCWSTR,szCDFURL,void*,pSoftDistElement,LPSOFTDISTINFO,lpsdi) \
    ICOM_METHOD2 (HRESULT,GetFirstCodeBase,LPWSTR*,szCodeBase,LPDWORD,dwMaxSize) \
    ICOM_METHOD2 (HRESULT,GetNextCodeBase,LPWSTR*,szCodeBase,LPDWORD,dwMaxSize) \
    ICOM_METHOD4 (HRESULT,AsyncInstallDistributionUnit,IBindCtx*,pbc,LPVOID,pvReserved,DWORD,flags,LPCODEBASEHOLD,lpcbh)

/*** IUnknown methods ***/
#define ISoftDistExt_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ISoftDistExt_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ISoftDistExt_Release(p) (p)->lpVtbl->Release(p)
/*** ISoftDistExt methods ***/
#define ISoftDistExt_ProcessSoftDist(p,a,b,c) (p)->lpVtbl->ProcessSoftDist(p,a,b,c)
#define ISoftDistExt_GetFirstCodeBase(p,a,b) (p)->lpVtbl->GetFirstCodeBase(p,a,b)
#define ISoftDistExt_GetNextCodeBase(p,a,b) (p)->lpVtbl->GetNextCodeBase(p,a,b)
#define ISoftDistExt_AsyncInstallDistributionUnit(p,a,b,c,d) (p)->lpVtbl->AsyncInstallDistributionUnit(p,a,b,c,d)

#endif

HRESULT CALLBACK ISoftDistExt_ProcessSoftDist_Proxy(
    ISoftDistExt* This,
    LPCWSTR szCDFURL,
    void* pSoftDistElement,
    LPSOFTDISTINFO lpsdi);
void __RPC_STUB ISoftDistExt_ProcessSoftDist_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK ISoftDistExt_GetFirstCodeBase_Proxy(
    ISoftDistExt* This,
    LPWSTR* szCodeBase,
    LPDWORD dwMaxSize);
void __RPC_STUB ISoftDistExt_GetFirstCodeBase_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK ISoftDistExt_GetNextCodeBase_Proxy(
    ISoftDistExt* This,
    LPWSTR* szCodeBase,
    LPDWORD dwMaxSize);
void __RPC_STUB ISoftDistExt_GetNextCodeBase_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK ISoftDistExt_AsyncInstallDistributionUnit_Proxy(
    ISoftDistExt* This,
    IBindCtx* pbc,
    LPVOID pvReserved,
    DWORD flags,
    LPCODEBASEHOLD lpcbh);
void __RPC_STUB ISoftDistExt_AsyncInstallDistributionUnit_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ISoftDistExt_INTERFACE_DEFINED__ */

typedef struct ICatalogFileInfo ICatalogFileInfo;
typedef ICatalogFileInfo *LPCATALOGFILEINFO;

/*****************************************************************************
 * ICatalogFileInfo interface
 */
#ifndef __ICatalogFileInfo_INTERFACE_DEFINED__
#define __ICatalogFileInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_ICatalogFileInfo, 0x711c7600, 0x6b48, 0x11d1, 0xb4,0x03, 0x00,0xaa,0x00,0xb9,0x2a,0xf1);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct ICatalogFileInfo: IUnknown {

    virtual HRESULT CALLBACK GetCatalogFile(
        LPSTR* ppszCatalogFile) = 0;

    virtual HRESULT CALLBACK GetJavaTrust(
        void** ppJavaTrust) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct ICatalogFileInfoVtbl ICatalogFileInfoVtbl;
struct ICatalogFileInfo {
    const ICatalogFileInfoVtbl* lpVtbl;
};
struct ICatalogFileInfoVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        ICatalogFileInfo* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        ICatalogFileInfo* This);

    ULONG (CALLBACK *Release)(
        ICatalogFileInfo* This);

    /*** ICatalogFileInfo methods ***/
    HRESULT (CALLBACK *GetCatalogFile)(
        ICatalogFileInfo* This,
        LPSTR* ppszCatalogFile);

    HRESULT (CALLBACK *GetJavaTrust)(
        ICatalogFileInfo* This,
        void** ppJavaTrust);

};

#define ICatalogFileInfo_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,GetCatalogFile,LPSTR*,ppszCatalogFile) \
    ICOM_METHOD1 (HRESULT,GetJavaTrust,void**,ppJavaTrust)

/*** IUnknown methods ***/
#define ICatalogFileInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ICatalogFileInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ICatalogFileInfo_Release(p) (p)->lpVtbl->Release(p)
/*** ICatalogFileInfo methods ***/
#define ICatalogFileInfo_GetCatalogFile(p,a) (p)->lpVtbl->GetCatalogFile(p,a)
#define ICatalogFileInfo_GetJavaTrust(p,a) (p)->lpVtbl->GetJavaTrust(p,a)

#endif

HRESULT CALLBACK ICatalogFileInfo_GetCatalogFile_Proxy(
    ICatalogFileInfo* This,
    LPSTR* ppszCatalogFile);
void __RPC_STUB ICatalogFileInfo_GetCatalogFile_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK ICatalogFileInfo_GetJavaTrust_Proxy(
    ICatalogFileInfo* This,
    void** ppJavaTrust);
void __RPC_STUB ICatalogFileInfo_GetJavaTrust_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ICatalogFileInfo_INTERFACE_DEFINED__ */

typedef struct IDataFilter IDataFilter;
typedef IDataFilter *LPDATAFILTER;

/*****************************************************************************
 * IDataFilter interface
 */
#ifndef __IDataFilter_INTERFACE_DEFINED__
#define __IDataFilter_INTERFACE_DEFINED__

DEFINE_GUID(IID_IDataFilter, 0x69d14c80, 0xc18e, 0x11d0, 0xa9,0xce, 0x00,0x60,0x97,0x94,0x23,0x11);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDataFilter: IUnknown {

    virtual HRESULT CALLBACK DoEncode(
        DWORD dwFlags,
        LONG lInBufferSize,
        BYTE* pbInBuffer,
        LONG lOutBufferSize,
        BYTE* pbOutBuffer,
        LONG lInBytesAvailable,
        LONG* plInBytesRead,
        LONG* plOutBytesWritten,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK DoDecode(
        DWORD dwFlags,
        LONG lInBufferSize,
        BYTE* pbInBuffer,
        LONG lOutBufferSize,
        BYTE* pbOutBuffer,
        LONG lInBytesAvailable,
        LONG* plInBytesRead,
        LONG* plOutBytesWritten,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK SetEncodingLevel(
        DWORD dwEncLevel) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IDataFilterVtbl IDataFilterVtbl;
struct IDataFilter {
    const IDataFilterVtbl* lpVtbl;
};
struct IDataFilterVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IDataFilter* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IDataFilter* This);

    ULONG (CALLBACK *Release)(
        IDataFilter* This);

    /*** IDataFilter methods ***/
    HRESULT (CALLBACK *DoEncode)(
        IDataFilter* This,
        DWORD dwFlags,
        LONG lInBufferSize,
        BYTE* pbInBuffer,
        LONG lOutBufferSize,
        BYTE* pbOutBuffer,
        LONG lInBytesAvailable,
        LONG* plInBytesRead,
        LONG* plOutBytesWritten,
        DWORD dwReserved);

    HRESULT (CALLBACK *DoDecode)(
        IDataFilter* This,
        DWORD dwFlags,
        LONG lInBufferSize,
        BYTE* pbInBuffer,
        LONG lOutBufferSize,
        BYTE* pbOutBuffer,
        LONG lInBytesAvailable,
        LONG* plInBytesRead,
        LONG* plOutBytesWritten,
        DWORD dwReserved);

    HRESULT (CALLBACK *SetEncodingLevel)(
        IDataFilter* This,
        DWORD dwEncLevel);

};

#define IDataFilter_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD9 (HRESULT,DoEncode,DWORD,dwFlags,LONG,lInBufferSize,BYTE*,pbInBuffer,LONG,lOutBufferSize,BYTE*,pbOutBuffer,LONG,lInBytesAvailable,LONG*,plInBytesRead,LONG*,plOutBytesWritten,DWORD,dwReserved) \
    ICOM_METHOD9 (HRESULT,DoDecode,DWORD,dwFlags,LONG,lInBufferSize,BYTE*,pbInBuffer,LONG,lOutBufferSize,BYTE*,pbOutBuffer,LONG,lInBytesAvailable,LONG*,plInBytesRead,LONG*,plOutBytesWritten,DWORD,dwReserved) \
    ICOM_METHOD1 (HRESULT,SetEncodingLevel,DWORD,dwEncLevel)

/*** IUnknown methods ***/
#define IDataFilter_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDataFilter_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDataFilter_Release(p) (p)->lpVtbl->Release(p)
/*** IDataFilter methods ***/
#define IDataFilter_DoEncode(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->DoEncode(p,a,b,c,d,e,f,g,h,i)
#define IDataFilter_DoDecode(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->DoDecode(p,a,b,c,d,e,f,g,h,i)
#define IDataFilter_SetEncodingLevel(p,a) (p)->lpVtbl->SetEncodingLevel(p,a)

#endif

HRESULT CALLBACK IDataFilter_DoEncode_Proxy(
    IDataFilter* This,
    DWORD dwFlags,
    LONG lInBufferSize,
    BYTE* pbInBuffer,
    LONG lOutBufferSize,
    BYTE* pbOutBuffer,
    LONG lInBytesAvailable,
    LONG* plInBytesRead,
    LONG* plOutBytesWritten,
    DWORD dwReserved);
void __RPC_STUB IDataFilter_DoEncode_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IDataFilter_DoDecode_Proxy(
    IDataFilter* This,
    DWORD dwFlags,
    LONG lInBufferSize,
    BYTE* pbInBuffer,
    LONG lOutBufferSize,
    BYTE* pbOutBuffer,
    LONG lInBytesAvailable,
    LONG* plInBytesRead,
    LONG* plOutBytesWritten,
    DWORD dwReserved);
void __RPC_STUB IDataFilter_DoDecode_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IDataFilter_SetEncodingLevel_Proxy(
    IDataFilter* This,
    DWORD dwEncLevel);
void __RPC_STUB IDataFilter_SetEncodingLevel_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IDataFilter_INTERFACE_DEFINED__ */

typedef struct _tagPROTOCOLFILTERDATA {
    DWORD cbSize;
    IInternetProtocolSink *pProtocolSink;
    IInternetProtocol *pProtocol;
    IUnknown *pUnk;
    DWORD dwFilterFlags;
} PROTOCOLFILTERDATA;

typedef struct IEncodingFilterFactory IEncodingFilterFactory;
typedef IEncodingFilterFactory *LPENCODINGFILTERFACTORY;

typedef struct _tagDATAINFO {
    ULONG ulTotalSize;
    ULONG ulavrPacketSize;
    ULONG ulConnectSpeed;
    ULONG ulProcessorSpeed;
} DATAINFO;

/*****************************************************************************
 * IEncodingFilterFactory interface
 */
#ifndef __IEncodingFilterFactory_INTERFACE_DEFINED__
#define __IEncodingFilterFactory_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEncodingFilterFactory, 0x70bdde00, 0xc18e, 0x11d0, 0xa9,0xce, 0x00,0x60,0x97,0x94,0x23,0x11);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IEncodingFilterFactory: IUnknown {

    virtual HRESULT CALLBACK FindBestFilter(
        LPCWSTR pwzCodeIn,
        LPCWSTR pwzCodeOut,
        DATAINFO info,
        IDataFilter** ppDF) = 0;

    virtual HRESULT CALLBACK GetDefaultFilter(
        LPCWSTR pwzCodeIn,
        LPCWSTR pwzCodeOut,
        IDataFilter** ppDF) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IEncodingFilterFactoryVtbl IEncodingFilterFactoryVtbl;
struct IEncodingFilterFactory {
    const IEncodingFilterFactoryVtbl* lpVtbl;
};
struct IEncodingFilterFactoryVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IEncodingFilterFactory* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IEncodingFilterFactory* This);

    ULONG (CALLBACK *Release)(
        IEncodingFilterFactory* This);

    /*** IEncodingFilterFactory methods ***/
    HRESULT (CALLBACK *FindBestFilter)(
        IEncodingFilterFactory* This,
        LPCWSTR pwzCodeIn,
        LPCWSTR pwzCodeOut,
        DATAINFO info,
        IDataFilter** ppDF);

    HRESULT (CALLBACK *GetDefaultFilter)(
        IEncodingFilterFactory* This,
        LPCWSTR pwzCodeIn,
        LPCWSTR pwzCodeOut,
        IDataFilter** ppDF);

};

#define IEncodingFilterFactory_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD4 (HRESULT,FindBestFilter,LPCWSTR,pwzCodeIn,LPCWSTR,pwzCodeOut,DATAINFO,info,IDataFilter**,ppDF) \
    ICOM_METHOD3 (HRESULT,GetDefaultFilter,LPCWSTR,pwzCodeIn,LPCWSTR,pwzCodeOut,IDataFilter**,ppDF)

/*** IUnknown methods ***/
#define IEncodingFilterFactory_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IEncodingFilterFactory_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IEncodingFilterFactory_Release(p) (p)->lpVtbl->Release(p)
/*** IEncodingFilterFactory methods ***/
#define IEncodingFilterFactory_FindBestFilter(p,a,b,c,d) (p)->lpVtbl->FindBestFilter(p,a,b,c,d)
#define IEncodingFilterFactory_GetDefaultFilter(p,a,b,c) (p)->lpVtbl->GetDefaultFilter(p,a,b,c)

#endif

HRESULT CALLBACK IEncodingFilterFactory_FindBestFilter_Proxy(
    IEncodingFilterFactory* This,
    LPCWSTR pwzCodeIn,
    LPCWSTR pwzCodeOut,
    DATAINFO info,
    IDataFilter** ppDF);
void __RPC_STUB IEncodingFilterFactory_FindBestFilter_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IEncodingFilterFactory_GetDefaultFilter_Proxy(
    IEncodingFilterFactory* This,
    LPCWSTR pwzCodeIn,
    LPCWSTR pwzCodeOut,
    IDataFilter** ppDF);
void __RPC_STUB IEncodingFilterFactory_GetDefaultFilter_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEncodingFilterFactory_INTERFACE_DEFINED__ */

typedef struct IWrappedProtocol IWrappedProtocol;
typedef IWrappedProtocol *LPIWRAPPEDPROTOCOL;

/*****************************************************************************
 * IWrappedProtocol interface
 */
#ifndef __IWrappedProtocol_INTERFACE_DEFINED__
#define __IWrappedProtocol_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWrappedProtocol, 0x53c84785, 0x8425, 0x4dc5, 0x97,0x1b, 0xe5,0x8d,0x9c,0x19,0xf9,0xb6);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IWrappedProtocol: IUnknown {

    virtual HRESULT CALLBACK GetWrapperCode(
        LONG* pnCode,
        DWORD_PTR dwReserved) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IWrappedProtocolVtbl IWrappedProtocolVtbl;
struct IWrappedProtocol {
    const IWrappedProtocolVtbl* lpVtbl;
};
struct IWrappedProtocolVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

    /*** IUnknown methods ***/
    HRESULT (CALLBACK *QueryInterface)(
        IWrappedProtocol* This,
        REFIID riid,
        void** ppvObject);

    ULONG (CALLBACK *AddRef)(
        IWrappedProtocol* This);

    ULONG (CALLBACK *Release)(
        IWrappedProtocol* This);

    /*** IWrappedProtocol methods ***/
    HRESULT (CALLBACK *GetWrapperCode)(
        IWrappedProtocol* This,
        LONG* pnCode,
        DWORD_PTR dwReserved);

};

#define IWrappedProtocol_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,GetWrapperCode,LONG*,pnCode,DWORD_PTR,dwReserved)

/*** IUnknown methods ***/
#define IWrappedProtocol_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IWrappedProtocol_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IWrappedProtocol_Release(p) (p)->lpVtbl->Release(p)
/*** IWrappedProtocol methods ***/
#define IWrappedProtocol_GetWrapperCode(p,a,b) (p)->lpVtbl->GetWrapperCode(p,a,b)

#endif

HRESULT CALLBACK IWrappedProtocol_GetWrapperCode_Proxy(
    IWrappedProtocol* This,
    LONG* pnCode,
    DWORD_PTR dwReserved);
void __RPC_STUB IWrappedProtocol_GetWrapperCode_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWrappedProtocol_INTERFACE_DEFINED__ */

#ifdef __cplusplus
}
#endif
#endif /* __WIDL_URLMON_H */
