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

#ifndef __WIDL_OLEIDL_H
#define __WIDL_OLEIDL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "objidl.h"
typedef struct IOleInPlaceActiveObject IOleInPlaceActiveObject;
typedef struct IEnumOLEVERB IEnumOLEVERB;
typedef struct IOleAdviseHolder IOleAdviseHolder;
typedef IOleAdviseHolder *LPOLEADVISEHOLDER;

/*****************************************************************************
 * IOleAdviseHolder interface
 */
#ifndef __IOleAdviseHolder_INTERFACE_DEFINED__
#define __IOleAdviseHolder_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleAdviseHolder, 0x00000111, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleAdviseHolder: IUnknown {

    virtual HRESULT CALLBACK Advise(
        IAdviseSink* pAdvise,
        DWORD* pdwConnection) = 0;

    virtual HRESULT CALLBACK Unadvise(
        DWORD dwConnection) = 0;

    virtual HRESULT CALLBACK EnumAdvise(
        IEnumSTATDATA** ppenumAdvise) = 0;

    virtual HRESULT CALLBACK SendOnRename(
        IMoniker* pmk) = 0;

    virtual HRESULT CALLBACK SendOnSave(
        ) = 0;

    virtual HRESULT CALLBACK SendOnClose(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleAdviseHolderVtbl IOleAdviseHolderVtbl;
struct IOleAdviseHolder {
    const IOleAdviseHolderVtbl* lpVtbl;
};
struct IOleAdviseHolderVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleAdviseHolder methods ***/
    HRESULT (CALLBACK *Advise)(
        IOleAdviseHolder* This,
        IAdviseSink* pAdvise,
        DWORD* pdwConnection);

    HRESULT (CALLBACK *Unadvise)(
        IOleAdviseHolder* This,
        DWORD dwConnection);

    HRESULT (CALLBACK *EnumAdvise)(
        IOleAdviseHolder* This,
        IEnumSTATDATA** ppenumAdvise);

    HRESULT (CALLBACK *SendOnRename)(
        IOleAdviseHolder* This,
        IMoniker* pmk);

    HRESULT (CALLBACK *SendOnSave)(
        IOleAdviseHolder* This);

    HRESULT (CALLBACK *SendOnClose)(
        IOleAdviseHolder* This);

};

#define IOleAdviseHolder_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,Advise,IAdviseSink*,pAdvise,DWORD*,pdwConnection) \
    ICOM_METHOD1 (HRESULT,Unadvise,DWORD,dwConnection) \
    ICOM_METHOD1 (HRESULT,EnumAdvise,IEnumSTATDATA**,ppenumAdvise) \
    ICOM_METHOD1 (HRESULT,SendOnRename,IMoniker*,pmk) \
    ICOM_METHOD  (HRESULT,SendOnSave) \
    ICOM_METHOD  (HRESULT,SendOnClose)

/*** IUnknown methods ***/
#define IOleAdviseHolder_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleAdviseHolder_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleAdviseHolder_Release(p) (p)->lpVtbl->Release(p)
/*** IOleAdviseHolder methods ***/
#define IOleAdviseHolder_Advise(p,a,b) (p)->lpVtbl->Advise(p,a,b)
#define IOleAdviseHolder_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
#define IOleAdviseHolder_EnumAdvise(p,a) (p)->lpVtbl->EnumAdvise(p,a)
#define IOleAdviseHolder_SendOnRename(p,a) (p)->lpVtbl->SendOnRename(p,a)
#define IOleAdviseHolder_SendOnSave(p) (p)->lpVtbl->SendOnSave(p)
#define IOleAdviseHolder_SendOnClose(p) (p)->lpVtbl->SendOnClose(p)

#endif

HRESULT CALLBACK IOleAdviseHolder_Advise_Proxy(
    IOleAdviseHolder* This,
    IAdviseSink* pAdvise,
    DWORD* pdwConnection);
void __RPC_STUB IOleAdviseHolder_Advise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleAdviseHolder_Unadvise_Proxy(
    IOleAdviseHolder* This,
    DWORD dwConnection);
void __RPC_STUB IOleAdviseHolder_Unadvise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleAdviseHolder_EnumAdvise_Proxy(
    IOleAdviseHolder* This,
    IEnumSTATDATA** ppenumAdvise);
void __RPC_STUB IOleAdviseHolder_EnumAdvise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleAdviseHolder_SendOnRename_Proxy(
    IOleAdviseHolder* This,
    IMoniker* pmk);
void __RPC_STUB IOleAdviseHolder_SendOnRename_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleAdviseHolder_SendOnSave_Proxy(
    IOleAdviseHolder* This);
void __RPC_STUB IOleAdviseHolder_SendOnSave_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleAdviseHolder_SendOnClose_Proxy(
    IOleAdviseHolder* This);
void __RPC_STUB IOleAdviseHolder_SendOnClose_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleAdviseHolder_INTERFACE_DEFINED__ */

typedef struct IOleCache IOleCache;
typedef IOleCache *LPOLECACHE;

/*****************************************************************************
 * IOleCache interface
 */
#ifndef __IOleCache_INTERFACE_DEFINED__
#define __IOleCache_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleCache, 0x0000011e, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleCache: IUnknown {

    virtual HRESULT CALLBACK Cache(
        FORMATETC* pformatetc,
        DWORD advf,
        DWORD* pdwConnection) = 0;

    virtual HRESULT CALLBACK Uncache(
        DWORD dwConnection) = 0;

    virtual HRESULT CALLBACK EnumCache(
        IEnumSTATDATA** ppenumSTATDATA) = 0;

    virtual HRESULT CALLBACK InitCache(
        IDataObject* pDataObject) = 0;

    virtual HRESULT CALLBACK SetData(
        FORMATETC* pformatetc,
        STGMEDIUM* pmedium,
        BOOL fRelease) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleCacheVtbl IOleCacheVtbl;
struct IOleCache {
    const IOleCacheVtbl* lpVtbl;
};
struct IOleCacheVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleCache methods ***/
    HRESULT (CALLBACK *Cache)(
        IOleCache* This,
        FORMATETC* pformatetc,
        DWORD advf,
        DWORD* pdwConnection);

    HRESULT (CALLBACK *Uncache)(
        IOleCache* This,
        DWORD dwConnection);

    HRESULT (CALLBACK *EnumCache)(
        IOleCache* This,
        IEnumSTATDATA** ppenumSTATDATA);

    HRESULT (CALLBACK *InitCache)(
        IOleCache* This,
        IDataObject* pDataObject);

    HRESULT (CALLBACK *SetData)(
        IOleCache* This,
        FORMATETC* pformatetc,
        STGMEDIUM* pmedium,
        BOOL fRelease);

};

#define IOleCache_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,Cache,FORMATETC*,pformatetc,DWORD,advf,DWORD*,pdwConnection) \
    ICOM_METHOD1 (HRESULT,Uncache,DWORD,dwConnection) \
    ICOM_METHOD1 (HRESULT,EnumCache,IEnumSTATDATA**,ppenumSTATDATA) \
    ICOM_METHOD1 (HRESULT,InitCache,IDataObject*,pDataObject) \
    ICOM_METHOD3 (HRESULT,SetData,FORMATETC*,pformatetc,STGMEDIUM*,pmedium,BOOL,fRelease)

/*** IUnknown methods ***/
#define IOleCache_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleCache_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleCache_Release(p) (p)->lpVtbl->Release(p)
/*** IOleCache methods ***/
#define IOleCache_Cache(p,a,b,c) (p)->lpVtbl->Cache(p,a,b,c)
#define IOleCache_Uncache(p,a) (p)->lpVtbl->Uncache(p,a)
#define IOleCache_EnumCache(p,a) (p)->lpVtbl->EnumCache(p,a)
#define IOleCache_InitCache(p,a) (p)->lpVtbl->InitCache(p,a)
#define IOleCache_SetData(p,a,b,c) (p)->lpVtbl->SetData(p,a,b,c)

#endif

HRESULT CALLBACK IOleCache_Cache_Proxy(
    IOleCache* This,
    FORMATETC* pformatetc,
    DWORD advf,
    DWORD* pdwConnection);
void __RPC_STUB IOleCache_Cache_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleCache_Uncache_Proxy(
    IOleCache* This,
    DWORD dwConnection);
void __RPC_STUB IOleCache_Uncache_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleCache_EnumCache_Proxy(
    IOleCache* This,
    IEnumSTATDATA** ppenumSTATDATA);
void __RPC_STUB IOleCache_EnumCache_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleCache_InitCache_Proxy(
    IOleCache* This,
    IDataObject* pDataObject);
void __RPC_STUB IOleCache_InitCache_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleCache_SetData_Proxy(
    IOleCache* This,
    FORMATETC* pformatetc,
    STGMEDIUM* pmedium,
    BOOL fRelease);
void __RPC_STUB IOleCache_SetData_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleCache_INTERFACE_DEFINED__ */

typedef struct IOleCache2 IOleCache2;
typedef IOleCache2 *LPOLECACHE2;

#define UPDFCACHE_NODATACACHE (0x1)

#define UPDFCACHE_ONSAVECACHE (0x2)

#define UPDFCACHE_ONSTOPCACHE (0x4)

#define UPDFCACHE_NORMALCACHE (0x8)

#define UPDFCACHE_IFBLANK (0x10)

#define UPDFCACHE_ONLYIFBLANK (0x7fffffff)

#define UPDFCACHE_IFBLANKORONSAVECACHE (UPDFCACHE_IFBLANK | UPDFCACHE_ONSAVECACHE)

#define UPDFCACHE_ALL ((DWORD)~UPDFCACHE_ONLYIFBLANK)

#define UPDFCACHE_ALLBUTNODATACACHE (UPDFCACHE_ALL & (DWORD)~UPDFCACHE_NODATACACHE)

typedef enum tagDISCARDCACHE {
    DISCARDCACHE_SAVEIFDIRTY = 0,
    DISCARDCACHE_NOSAVE = 1
} DISCARDCACHE;

/*****************************************************************************
 * IOleCache2 interface
 */
#ifndef __IOleCache2_INTERFACE_DEFINED__
#define __IOleCache2_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleCache2, 0x00000128, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleCache2: IOleCache {

    virtual HRESULT CALLBACK UpdateCache(
        LPDATAOBJECT pDataObject,
        DWORD grfUpdf,
        LPVOID pReserved) = 0;

    virtual HRESULT CALLBACK DiscardCache(
        DWORD dwDiscardOptions) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleCache2Vtbl IOleCache2Vtbl;
struct IOleCache2 {
    const IOleCache2Vtbl* lpVtbl;
};
struct IOleCache2Vtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleCache methods ***/
    HRESULT (CALLBACK *Cache)(
        IOleCache2* This,
        FORMATETC* pformatetc,
        DWORD advf,
        DWORD* pdwConnection);

    HRESULT (CALLBACK *Uncache)(
        IOleCache2* This,
        DWORD dwConnection);

    HRESULT (CALLBACK *EnumCache)(
        IOleCache2* This,
        IEnumSTATDATA** ppenumSTATDATA);

    HRESULT (CALLBACK *InitCache)(
        IOleCache2* This,
        IDataObject* pDataObject);

    HRESULT (CALLBACK *SetData)(
        IOleCache2* This,
        FORMATETC* pformatetc,
        STGMEDIUM* pmedium,
        BOOL fRelease);

    /*** IOleCache2 methods ***/
    HRESULT (CALLBACK *UpdateCache)(
        IOleCache2* This,
        LPDATAOBJECT pDataObject,
        DWORD grfUpdf,
        LPVOID pReserved);

    HRESULT (CALLBACK *DiscardCache)(
        IOleCache2* This,
        DWORD dwDiscardOptions);

};

#define IOleCache2_IMETHODS \
    IOleCache_IMETHODS \
    ICOM_METHOD3 (HRESULT,UpdateCache,LPDATAOBJECT,pDataObject,DWORD,grfUpdf,LPVOID,pReserved) \
    ICOM_METHOD1 (HRESULT,DiscardCache,DWORD,dwDiscardOptions)

/*** IUnknown methods ***/
#define IOleCache2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleCache2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleCache2_Release(p) (p)->lpVtbl->Release(p)
/*** IOleCache methods ***/
#define IOleCache2_Cache(p,a,b,c) (p)->lpVtbl->Cache(p,a,b,c)
#define IOleCache2_Uncache(p,a) (p)->lpVtbl->Uncache(p,a)
#define IOleCache2_EnumCache(p,a) (p)->lpVtbl->EnumCache(p,a)
#define IOleCache2_InitCache(p,a) (p)->lpVtbl->InitCache(p,a)
#define IOleCache2_SetData(p,a,b,c) (p)->lpVtbl->SetData(p,a,b,c)
/*** IOleCache2 methods ***/
#define IOleCache2_UpdateCache(p,a,b,c) (p)->lpVtbl->UpdateCache(p,a,b,c)
#define IOleCache2_DiscardCache(p,a) (p)->lpVtbl->DiscardCache(p,a)

#endif

HRESULT CALLBACK IOleCache2_RemoteUpdateCache_Proxy(
    IOleCache2* This,
    LPDATAOBJECT pDataObject,
    DWORD grfUpdf,
    LONG_PTR pReserved);
void __RPC_STUB IOleCache2_RemoteUpdateCache_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleCache2_UpdateCache_Proxy(
    IOleCache2* This,
    LPDATAOBJECT pDataObject,
    DWORD grfUpdf,
    LPVOID pReserved);
HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub(
    IOleCache2* This,
    LPDATAOBJECT pDataObject,
    DWORD grfUpdf,
    LONG_PTR pReserved);
HRESULT CALLBACK IOleCache2_DiscardCache_Proxy(
    IOleCache2* This,
    DWORD dwDiscardOptions);
void __RPC_STUB IOleCache2_DiscardCache_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleCache2_INTERFACE_DEFINED__ */

typedef struct IOleCacheControl IOleCacheControl;
typedef IOleCacheControl *LPOLECACHECONTROL;

/*****************************************************************************
 * IOleCacheControl interface
 */
#ifndef __IOleCacheControl_INTERFACE_DEFINED__
#define __IOleCacheControl_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleCacheControl, 0x00000129, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleCacheControl: IUnknown {

    virtual HRESULT CALLBACK OnRun(
        LPDATAOBJECT pDataObject) = 0;

    virtual HRESULT CALLBACK OnStop(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleCacheControlVtbl IOleCacheControlVtbl;
struct IOleCacheControl {
    const IOleCacheControlVtbl* lpVtbl;
};
struct IOleCacheControlVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleCacheControl methods ***/
    HRESULT (CALLBACK *OnRun)(
        IOleCacheControl* This,
        LPDATAOBJECT pDataObject);

    HRESULT (CALLBACK *OnStop)(
        IOleCacheControl* This);

};

#define IOleCacheControl_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,OnRun,LPDATAOBJECT,pDataObject) \
    ICOM_METHOD  (HRESULT,OnStop)

/*** IUnknown methods ***/
#define IOleCacheControl_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleCacheControl_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleCacheControl_Release(p) (p)->lpVtbl->Release(p)
/*** IOleCacheControl methods ***/
#define IOleCacheControl_OnRun(p,a) (p)->lpVtbl->OnRun(p,a)
#define IOleCacheControl_OnStop(p) (p)->lpVtbl->OnStop(p)

#endif

HRESULT CALLBACK IOleCacheControl_OnRun_Proxy(
    IOleCacheControl* This,
    LPDATAOBJECT pDataObject);
void __RPC_STUB IOleCacheControl_OnRun_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleCacheControl_OnStop_Proxy(
    IOleCacheControl* This);
void __RPC_STUB IOleCacheControl_OnStop_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleCacheControl_INTERFACE_DEFINED__ */

typedef struct IParseDisplayName IParseDisplayName;
typedef IParseDisplayName *LPPARSEDISPLAYNAME;

/*****************************************************************************
 * IParseDisplayName interface
 */
#ifndef __IParseDisplayName_INTERFACE_DEFINED__
#define __IParseDisplayName_INTERFACE_DEFINED__

DEFINE_GUID(IID_IParseDisplayName, 0x0000011a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IParseDisplayName: IUnknown {

    virtual HRESULT CALLBACK ParseDisplayName(
        IBindCtx* pbc,
        LPOLESTR pszDisplayName,
        ULONG* pchEaten,
        IMoniker** ppmkOut) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IParseDisplayNameVtbl IParseDisplayNameVtbl;
struct IParseDisplayName {
    const IParseDisplayNameVtbl* lpVtbl;
};
struct IParseDisplayNameVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IParseDisplayName methods ***/
    HRESULT (CALLBACK *ParseDisplayName)(
        IParseDisplayName* This,
        IBindCtx* pbc,
        LPOLESTR pszDisplayName,
        ULONG* pchEaten,
        IMoniker** ppmkOut);

};

#define IParseDisplayName_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD4 (HRESULT,ParseDisplayName,IBindCtx*,pbc,LPOLESTR,pszDisplayName,ULONG*,pchEaten,IMoniker**,ppmkOut)

/*** IUnknown methods ***/
#define IParseDisplayName_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IParseDisplayName_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IParseDisplayName_Release(p) (p)->lpVtbl->Release(p)
/*** IParseDisplayName methods ***/
#define IParseDisplayName_ParseDisplayName(p,a,b,c,d) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d)

#endif

HRESULT CALLBACK IParseDisplayName_ParseDisplayName_Proxy(
    IParseDisplayName* This,
    IBindCtx* pbc,
    LPOLESTR pszDisplayName,
    ULONG* pchEaten,
    IMoniker** ppmkOut);
void __RPC_STUB IParseDisplayName_ParseDisplayName_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IParseDisplayName_INTERFACE_DEFINED__ */

typedef struct IOleContainer IOleContainer;
typedef IOleContainer *LPOLECONTAINER;

/*****************************************************************************
 * IOleContainer interface
 */
#ifndef __IOleContainer_INTERFACE_DEFINED__
#define __IOleContainer_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleContainer, 0x0000011b, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleContainer: IParseDisplayName {

    virtual HRESULT CALLBACK EnumObjects(
        DWORD grfFlags,
        IEnumUnknown** ppenum) = 0;

    virtual HRESULT CALLBACK LockContainer(
        BOOL fLock) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleContainerVtbl IOleContainerVtbl;
struct IOleContainer {
    const IOleContainerVtbl* lpVtbl;
};
struct IOleContainerVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IParseDisplayName methods ***/
    HRESULT (CALLBACK *ParseDisplayName)(
        IOleContainer* This,
        IBindCtx* pbc,
        LPOLESTR pszDisplayName,
        ULONG* pchEaten,
        IMoniker** ppmkOut);

    /*** IOleContainer methods ***/
    HRESULT (CALLBACK *EnumObjects)(
        IOleContainer* This,
        DWORD grfFlags,
        IEnumUnknown** ppenum);

    HRESULT (CALLBACK *LockContainer)(
        IOleContainer* This,
        BOOL fLock);

};

#define IOleContainer_IMETHODS \
    IParseDisplayName_IMETHODS \
    ICOM_METHOD2 (HRESULT,EnumObjects,DWORD,grfFlags,IEnumUnknown**,ppenum) \
    ICOM_METHOD1 (HRESULT,LockContainer,BOOL,fLock)

/*** IUnknown methods ***/
#define IOleContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleContainer_Release(p) (p)->lpVtbl->Release(p)
/*** IParseDisplayName methods ***/
#define IOleContainer_ParseDisplayName(p,a,b,c,d) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d)
/*** IOleContainer methods ***/
#define IOleContainer_EnumObjects(p,a,b) (p)->lpVtbl->EnumObjects(p,a,b)
#define IOleContainer_LockContainer(p,a) (p)->lpVtbl->LockContainer(p,a)

#endif

HRESULT CALLBACK IOleContainer_EnumObjects_Proxy(
    IOleContainer* This,
    DWORD grfFlags,
    IEnumUnknown** ppenum);
void __RPC_STUB IOleContainer_EnumObjects_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleContainer_LockContainer_Proxy(
    IOleContainer* This,
    BOOL fLock);
void __RPC_STUB IOleContainer_LockContainer_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleContainer_INTERFACE_DEFINED__ */

typedef struct IOleClientSite IOleClientSite;
typedef IOleClientSite *LPOLECLIENTSITE;

/*****************************************************************************
 * IOleClientSite interface
 */
#ifndef __IOleClientSite_INTERFACE_DEFINED__
#define __IOleClientSite_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleClientSite, 0x00000118, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleClientSite: IUnknown {

    virtual HRESULT CALLBACK SaveObject(
        ) = 0;

    virtual HRESULT CALLBACK GetMoniker(
        DWORD dwAssign,
        DWORD dwWhichMoniker,
        IMoniker** ppmk) = 0;

    virtual HRESULT CALLBACK GetContainer(
        IOleContainer** ppContainer) = 0;

    virtual HRESULT CALLBACK ShowObject(
        ) = 0;

    virtual HRESULT CALLBACK OnShowWindow(
        BOOL fShow) = 0;

    virtual HRESULT CALLBACK RequestNewObjectLayout(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleClientSiteVtbl IOleClientSiteVtbl;
struct IOleClientSite {
    const IOleClientSiteVtbl* lpVtbl;
};
struct IOleClientSiteVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleClientSite methods ***/
    HRESULT (CALLBACK *SaveObject)(
        IOleClientSite* This);

    HRESULT (CALLBACK *GetMoniker)(
        IOleClientSite* This,
        DWORD dwAssign,
        DWORD dwWhichMoniker,
        IMoniker** ppmk);

    HRESULT (CALLBACK *GetContainer)(
        IOleClientSite* This,
        IOleContainer** ppContainer);

    HRESULT (CALLBACK *ShowObject)(
        IOleClientSite* This);

    HRESULT (CALLBACK *OnShowWindow)(
        IOleClientSite* This,
        BOOL fShow);

    HRESULT (CALLBACK *RequestNewObjectLayout)(
        IOleClientSite* This);

};

#define IOleClientSite_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD  (HRESULT,SaveObject) \
    ICOM_METHOD3 (HRESULT,GetMoniker,DWORD,dwAssign,DWORD,dwWhichMoniker,IMoniker**,ppmk) \
    ICOM_METHOD1 (HRESULT,GetContainer,IOleContainer**,ppContainer) \
    ICOM_METHOD  (HRESULT,ShowObject) \
    ICOM_METHOD1 (HRESULT,OnShowWindow,BOOL,fShow) \
    ICOM_METHOD  (HRESULT,RequestNewObjectLayout)

/*** IUnknown methods ***/
#define IOleClientSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleClientSite_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleClientSite_Release(p) (p)->lpVtbl->Release(p)
/*** IOleClientSite methods ***/
#define IOleClientSite_SaveObject(p) (p)->lpVtbl->SaveObject(p)
#define IOleClientSite_GetMoniker(p,a,b,c) (p)->lpVtbl->GetMoniker(p,a,b,c)
#define IOleClientSite_GetContainer(p,a) (p)->lpVtbl->GetContainer(p,a)
#define IOleClientSite_ShowObject(p) (p)->lpVtbl->ShowObject(p)
#define IOleClientSite_OnShowWindow(p,a) (p)->lpVtbl->OnShowWindow(p,a)
#define IOleClientSite_RequestNewObjectLayout(p) (p)->lpVtbl->RequestNewObjectLayout(p)

#endif

HRESULT CALLBACK IOleClientSite_SaveObject_Proxy(
    IOleClientSite* This);
void __RPC_STUB IOleClientSite_SaveObject_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleClientSite_GetMoniker_Proxy(
    IOleClientSite* This,
    DWORD dwAssign,
    DWORD dwWhichMoniker,
    IMoniker** ppmk);
void __RPC_STUB IOleClientSite_GetMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleClientSite_GetContainer_Proxy(
    IOleClientSite* This,
    IOleContainer** ppContainer);
void __RPC_STUB IOleClientSite_GetContainer_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleClientSite_ShowObject_Proxy(
    IOleClientSite* This);
void __RPC_STUB IOleClientSite_ShowObject_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleClientSite_OnShowWindow_Proxy(
    IOleClientSite* This,
    BOOL fShow);
void __RPC_STUB IOleClientSite_OnShowWindow_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleClientSite_RequestNewObjectLayout_Proxy(
    IOleClientSite* This);
void __RPC_STUB IOleClientSite_RequestNewObjectLayout_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleClientSite_INTERFACE_DEFINED__ */

typedef struct IOleObject IOleObject;
typedef IOleObject *LPOLEOBJECT;

typedef enum tagOLEGETMONIKER {
    OLEGETMONIKER_ONLYIFTHERE = 1,
    OLEGETMONIKER_FORCEASSIGN = 2,
    OLEGETMONIKER_UNASSIGN = 3,
    OLEGETMONIKER_TEMPFORUSER = 4
} OLEGETMONIKER;

typedef enum tagOLEWHICHMK {
    OLEWHICHMK_CONTAINER = 1,
    OLEWHICHMK_OBJREL = 2,
    OLEWHICHMK_OBJFULL = 3
} OLEWHICHMK;

typedef enum tagUSERCLASSTYPE {
    USERCLASSTYPE_FULL = 1,
    USERCLASSTYPE_SHORT = 2,
    USERCLASSTYPE_APPNAME = 3
} USERCLASSTYPE;

typedef enum tagOLEMISC {
    OLEMISC_RECOMPOSEONRESIZE = 0x1,
    OLEMISC_ONLYICONIC = 0x2,
    OLEMISC_INSERTNOTREPLACE = 0x4,
    OLEMISC_STATIC = 0x8,
    OLEMISC_CANTLINKINSIDE = 0x10,
    OLEMISC_CANLINKBYOLE1 = 0x20,
    OLEMISC_ISLINKOBJECT = 0x40,
    OLEMISC_INSIDEOUT = 0x80,
    OLEMISC_ACTIVATEWHENVISIBLE = 0x100,
    OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200,
    OLEMISC_INVISIBLEATRUNTIME = 0x400,
    OLEMISC_ALWAYSRUN = 0x800,
    OLEMISC_ACTSLIKEBUTTON = 0x1000,
    OLEMISC_ACTSLIKELABEL = 0x2000,
    OLEMISC_NOUIACTIVATE = 0x4000,
    OLEMISC_ALIGNABLE = 0x8000,
    OLEMISC_SIMPLEFRAME = 0x10000,
    OLEMISC_SETCLIENTSITEFIRST = 0x20000,
    OLEMISC_IMEMODE = 0x40000,
    OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x80000,
    OLEMISC_WANTSTOMENUMERGE = 0x100000,
    OLEMISC_SUPPORTSMULTILEVELUNDO = 0x200000
} OLEMISC;

typedef enum tagOLECLOSE {
    OLECLOSE_SAVEIFDIRTY = 0,
    OLECLOSE_NOSAVE = 1,
    OLECLOSE_PROMPTSAVE = 2
} OLECLOSE;

/*****************************************************************************
 * IOleObject interface
 */
#ifndef __IOleObject_INTERFACE_DEFINED__
#define __IOleObject_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleObject, 0x00000112, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleObject: IUnknown {

    virtual HRESULT CALLBACK SetClientSite(
        IOleClientSite* pClientSite) = 0;

    virtual HRESULT CALLBACK GetClientSite(
        IOleClientSite** ppClientSite) = 0;

    virtual HRESULT CALLBACK SetHostNames(
        LPCOLESTR szContainerApp,
        LPCOLESTR szContainerObj) = 0;

    virtual HRESULT CALLBACK Close(
        DWORD dwSaveOption) = 0;

    virtual HRESULT CALLBACK SetMoniker(
        DWORD dwWhichMoniker,
        IMoniker* pmk) = 0;

    virtual HRESULT CALLBACK GetMoniker(
        DWORD dwAssign,
        DWORD dwWhichMoniker,
        IMoniker** ppmk) = 0;

    virtual HRESULT CALLBACK InitFromData(
        IDataObject* pDataObject,
        BOOL fCreation,
        DWORD dwReserved) = 0;

    virtual HRESULT CALLBACK GetClipboardData(
        DWORD dwReserved,
        IDataObject** ppDataObject) = 0;

    virtual HRESULT CALLBACK DoVerb(
        LONG iVerb,
        LPMSG lpmsg,
        IOleClientSite* pActiveSite,
        LONG lindex,
        HWND hwndParent,
        LPCRECT lprcPosRect) = 0;

    virtual HRESULT CALLBACK EnumVerbs(
        IEnumOLEVERB** ppEnumOleVerb) = 0;

    virtual HRESULT CALLBACK Update(
        ) = 0;

    virtual HRESULT CALLBACK IsUpToDate(
        ) = 0;

    virtual HRESULT CALLBACK GetUserClassID(
        CLSID* pClsid) = 0;

    virtual HRESULT CALLBACK GetUserType(
        DWORD dwFormOfType,
        LPOLESTR* pszUserType) = 0;

    virtual HRESULT CALLBACK SetExtent(
        DWORD dwDrawAspect,
        SIZEL* psizel) = 0;

    virtual HRESULT CALLBACK GetExtent(
        DWORD dwDrawAspect,
        SIZEL* psizel) = 0;

    virtual HRESULT CALLBACK Advise(
        IAdviseSink* pAdvSink,
        DWORD* pdwConnection) = 0;

    virtual HRESULT CALLBACK Unadvise(
        DWORD dwConnection) = 0;

    virtual HRESULT CALLBACK EnumAdvise(
        IEnumSTATDATA** ppenumAdvise) = 0;

    virtual HRESULT CALLBACK GetMiscStatus(
        DWORD dwAspect,
        DWORD* pdwStatus) = 0;

    virtual HRESULT CALLBACK SetColorScheme(
        LOGPALETTE* pLogpal) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleObjectVtbl IOleObjectVtbl;
struct IOleObject {
    const IOleObjectVtbl* lpVtbl;
};
struct IOleObjectVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleObject methods ***/
    HRESULT (CALLBACK *SetClientSite)(
        IOleObject* This,
        IOleClientSite* pClientSite);

    HRESULT (CALLBACK *GetClientSite)(
        IOleObject* This,
        IOleClientSite** ppClientSite);

    HRESULT (CALLBACK *SetHostNames)(
        IOleObject* This,
        LPCOLESTR szContainerApp,
        LPCOLESTR szContainerObj);

    HRESULT (CALLBACK *Close)(
        IOleObject* This,
        DWORD dwSaveOption);

    HRESULT (CALLBACK *SetMoniker)(
        IOleObject* This,
        DWORD dwWhichMoniker,
        IMoniker* pmk);

    HRESULT (CALLBACK *GetMoniker)(
        IOleObject* This,
        DWORD dwAssign,
        DWORD dwWhichMoniker,
        IMoniker** ppmk);

    HRESULT (CALLBACK *InitFromData)(
        IOleObject* This,
        IDataObject* pDataObject,
        BOOL fCreation,
        DWORD dwReserved);

    HRESULT (CALLBACK *GetClipboardData)(
        IOleObject* This,
        DWORD dwReserved,
        IDataObject** ppDataObject);

    HRESULT (CALLBACK *DoVerb)(
        IOleObject* This,
        LONG iVerb,
        LPMSG lpmsg,
        IOleClientSite* pActiveSite,
        LONG lindex,
        HWND hwndParent,
        LPCRECT lprcPosRect);

    HRESULT (CALLBACK *EnumVerbs)(
        IOleObject* This,
        IEnumOLEVERB** ppEnumOleVerb);

    HRESULT (CALLBACK *Update)(
        IOleObject* This);

    HRESULT (CALLBACK *IsUpToDate)(
        IOleObject* This);

    HRESULT (CALLBACK *GetUserClassID)(
        IOleObject* This,
        CLSID* pClsid);

    HRESULT (CALLBACK *GetUserType)(
        IOleObject* This,
        DWORD dwFormOfType,
        LPOLESTR* pszUserType);

    HRESULT (CALLBACK *SetExtent)(
        IOleObject* This,
        DWORD dwDrawAspect,
        SIZEL* psizel);

    HRESULT (CALLBACK *GetExtent)(
        IOleObject* This,
        DWORD dwDrawAspect,
        SIZEL* psizel);

    HRESULT (CALLBACK *Advise)(
        IOleObject* This,
        IAdviseSink* pAdvSink,
        DWORD* pdwConnection);

    HRESULT (CALLBACK *Unadvise)(
        IOleObject* This,
        DWORD dwConnection);

    HRESULT (CALLBACK *EnumAdvise)(
        IOleObject* This,
        IEnumSTATDATA** ppenumAdvise);

    HRESULT (CALLBACK *GetMiscStatus)(
        IOleObject* This,
        DWORD dwAspect,
        DWORD* pdwStatus);

    HRESULT (CALLBACK *SetColorScheme)(
        IOleObject* This,
        LOGPALETTE* pLogpal);

};

#define IOleObject_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,SetClientSite,IOleClientSite*,pClientSite) \
    ICOM_METHOD1 (HRESULT,GetClientSite,IOleClientSite**,ppClientSite) \
    ICOM_METHOD2 (HRESULT,SetHostNames,LPCOLESTR,szContainerApp,LPCOLESTR,szContainerObj) \
    ICOM_METHOD1 (HRESULT,Close,DWORD,dwSaveOption) \
    ICOM_METHOD2 (HRESULT,SetMoniker,DWORD,dwWhichMoniker,IMoniker*,pmk) \
    ICOM_METHOD3 (HRESULT,GetMoniker,DWORD,dwAssign,DWORD,dwWhichMoniker,IMoniker**,ppmk) \
    ICOM_METHOD3 (HRESULT,InitFromData,IDataObject*,pDataObject,BOOL,fCreation,DWORD,dwReserved) \
    ICOM_METHOD2 (HRESULT,GetClipboardData,DWORD,dwReserved,IDataObject**,ppDataObject) \
    ICOM_METHOD6 (HRESULT,DoVerb,LONG,iVerb,LPMSG,lpmsg,IOleClientSite*,pActiveSite,LONG,lindex,HWND,hwndParent,LPCRECT,lprcPosRect) \
    ICOM_METHOD1 (HRESULT,EnumVerbs,IEnumOLEVERB**,ppEnumOleVerb) \
    ICOM_METHOD  (HRESULT,Update) \
    ICOM_METHOD  (HRESULT,IsUpToDate) \
    ICOM_METHOD1 (HRESULT,GetUserClassID,CLSID*,pClsid) \
    ICOM_METHOD2 (HRESULT,GetUserType,DWORD,dwFormOfType,LPOLESTR*,pszUserType) \
    ICOM_METHOD2 (HRESULT,SetExtent,DWORD,dwDrawAspect,SIZEL*,psizel) \
    ICOM_METHOD2 (HRESULT,GetExtent,DWORD,dwDrawAspect,SIZEL*,psizel) \
    ICOM_METHOD2 (HRESULT,Advise,IAdviseSink*,pAdvSink,DWORD*,pdwConnection) \
    ICOM_METHOD1 (HRESULT,Unadvise,DWORD,dwConnection) \
    ICOM_METHOD1 (HRESULT,EnumAdvise,IEnumSTATDATA**,ppenumAdvise) \
    ICOM_METHOD2 (HRESULT,GetMiscStatus,DWORD,dwAspect,DWORD*,pdwStatus) \
    ICOM_METHOD1 (HRESULT,SetColorScheme,LOGPALETTE*,pLogpal)

/*** IUnknown methods ***/
#define IOleObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleObject_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleObject_Release(p) (p)->lpVtbl->Release(p)
/*** IOleObject methods ***/
#define IOleObject_SetClientSite(p,a) (p)->lpVtbl->SetClientSite(p,a)
#define IOleObject_GetClientSite(p,a) (p)->lpVtbl->GetClientSite(p,a)
#define IOleObject_SetHostNames(p,a,b) (p)->lpVtbl->SetHostNames(p,a,b)
#define IOleObject_Close(p,a) (p)->lpVtbl->Close(p,a)
#define IOleObject_SetMoniker(p,a,b) (p)->lpVtbl->SetMoniker(p,a,b)
#define IOleObject_GetMoniker(p,a,b,c) (p)->lpVtbl->GetMoniker(p,a,b,c)
#define IOleObject_InitFromData(p,a,b,c) (p)->lpVtbl->InitFromData(p,a,b,c)
#define IOleObject_GetClipboardData(p,a,b) (p)->lpVtbl->GetClipboardData(p,a,b)
#define IOleObject_DoVerb(p,a,b,c,d,e,f) (p)->lpVtbl->DoVerb(p,a,b,c,d,e,f)
#define IOleObject_EnumVerbs(p,a) (p)->lpVtbl->EnumVerbs(p,a)
#define IOleObject_Update(p) (p)->lpVtbl->Update(p)
#define IOleObject_IsUpToDate(p) (p)->lpVtbl->IsUpToDate(p)
#define IOleObject_GetUserClassID(p,a) (p)->lpVtbl->GetUserClassID(p,a)
#define IOleObject_GetUserType(p,a,b) (p)->lpVtbl->GetUserType(p,a,b)
#define IOleObject_SetExtent(p,a,b) (p)->lpVtbl->SetExtent(p,a,b)
#define IOleObject_GetExtent(p,a,b) (p)->lpVtbl->GetExtent(p,a,b)
#define IOleObject_Advise(p,a,b) (p)->lpVtbl->Advise(p,a,b)
#define IOleObject_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
#define IOleObject_EnumAdvise(p,a) (p)->lpVtbl->EnumAdvise(p,a)
#define IOleObject_GetMiscStatus(p,a,b) (p)->lpVtbl->GetMiscStatus(p,a,b)
#define IOleObject_SetColorScheme(p,a) (p)->lpVtbl->SetColorScheme(p,a)

#endif

HRESULT CALLBACK IOleObject_SetClientSite_Proxy(
    IOleObject* This,
    IOleClientSite* pClientSite);
void __RPC_STUB IOleObject_SetClientSite_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetClientSite_Proxy(
    IOleObject* This,
    IOleClientSite** ppClientSite);
void __RPC_STUB IOleObject_GetClientSite_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_SetHostNames_Proxy(
    IOleObject* This,
    LPCOLESTR szContainerApp,
    LPCOLESTR szContainerObj);
void __RPC_STUB IOleObject_SetHostNames_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_Close_Proxy(
    IOleObject* This,
    DWORD dwSaveOption);
void __RPC_STUB IOleObject_Close_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_SetMoniker_Proxy(
    IOleObject* This,
    DWORD dwWhichMoniker,
    IMoniker* pmk);
void __RPC_STUB IOleObject_SetMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetMoniker_Proxy(
    IOleObject* This,
    DWORD dwAssign,
    DWORD dwWhichMoniker,
    IMoniker** ppmk);
void __RPC_STUB IOleObject_GetMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_InitFromData_Proxy(
    IOleObject* This,
    IDataObject* pDataObject,
    BOOL fCreation,
    DWORD dwReserved);
void __RPC_STUB IOleObject_InitFromData_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetClipboardData_Proxy(
    IOleObject* This,
    DWORD dwReserved,
    IDataObject** ppDataObject);
void __RPC_STUB IOleObject_GetClipboardData_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_DoVerb_Proxy(
    IOleObject* This,
    LONG iVerb,
    LPMSG lpmsg,
    IOleClientSite* pActiveSite,
    LONG lindex,
    HWND hwndParent,
    LPCRECT lprcPosRect);
void __RPC_STUB IOleObject_DoVerb_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_EnumVerbs_Proxy(
    IOleObject* This,
    IEnumOLEVERB** ppEnumOleVerb);
void __RPC_STUB IOleObject_EnumVerbs_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_Update_Proxy(
    IOleObject* This);
void __RPC_STUB IOleObject_Update_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_IsUpToDate_Proxy(
    IOleObject* This);
void __RPC_STUB IOleObject_IsUpToDate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetUserClassID_Proxy(
    IOleObject* This,
    CLSID* pClsid);
void __RPC_STUB IOleObject_GetUserClassID_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetUserType_Proxy(
    IOleObject* This,
    DWORD dwFormOfType,
    LPOLESTR* pszUserType);
void __RPC_STUB IOleObject_GetUserType_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_SetExtent_Proxy(
    IOleObject* This,
    DWORD dwDrawAspect,
    SIZEL* psizel);
void __RPC_STUB IOleObject_SetExtent_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetExtent_Proxy(
    IOleObject* This,
    DWORD dwDrawAspect,
    SIZEL* psizel);
void __RPC_STUB IOleObject_GetExtent_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_Advise_Proxy(
    IOleObject* This,
    IAdviseSink* pAdvSink,
    DWORD* pdwConnection);
void __RPC_STUB IOleObject_Advise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_Unadvise_Proxy(
    IOleObject* This,
    DWORD dwConnection);
void __RPC_STUB IOleObject_Unadvise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_EnumAdvise_Proxy(
    IOleObject* This,
    IEnumSTATDATA** ppenumAdvise);
void __RPC_STUB IOleObject_EnumAdvise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_GetMiscStatus_Proxy(
    IOleObject* This,
    DWORD dwAspect,
    DWORD* pdwStatus);
void __RPC_STUB IOleObject_GetMiscStatus_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleObject_SetColorScheme_Proxy(
    IOleObject* This,
    LOGPALETTE* pLogpal);
void __RPC_STUB IOleObject_SetColorScheme_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleObject_INTERFACE_DEFINED__ */

typedef enum tagOLERENDER {
    OLERENDER_NONE = 0,
    OLERENDER_DRAW = 1,
    OLERENDER_FORMAT = 2,
    OLERENDER_ASIS = 3
} OLERENDER;

typedef OLERENDER *LPOLERENDER;

typedef struct tagOBJECTDESCRIPTOR {
    ULONG cbSize;
    CLSID clsid;
    DWORD dwDrawAspect;
    SIZEL sizel;
    POINTL pointl;
    DWORD dwStatus;
    DWORD dwFullUserTypeName;
    DWORD dwSrcOfCopy;
} OBJECTDESCRIPTOR, *POBJECTDESCRIPTOR, *LPOBJECTDESCRIPTOR, LINKSRCDESCRIPTOR, *PLINKSRCDESCRIPTOR, *LPLINKSRCDESCRIPTOR;

typedef struct IOleWindow IOleWindow;
typedef IOleWindow *LPOLEWINDOW;

/*****************************************************************************
 * IOleWindow interface
 */
#ifndef __IOleWindow_INTERFACE_DEFINED__
#define __IOleWindow_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleWindow, 0x00000114, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleWindow: IUnknown {

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

    virtual HRESULT CALLBACK ContextSensitiveHelp(
        BOOL fEnterMode) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleWindowVtbl IOleWindowVtbl;
struct IOleWindow {
    const IOleWindowVtbl* lpVtbl;
};
struct IOleWindowVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

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

    HRESULT (CALLBACK *ContextSensitiveHelp)(
        IOleWindow* This,
        BOOL fEnterMode);

};

#define IOleWindow_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,GetWindow,HWND*,phwnd) \
    ICOM_METHOD1 (HRESULT,ContextSensitiveHelp,BOOL,fEnterMode)

/*** IUnknown methods ***/
#define IOleWindow_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleWindow_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleWindow_Release(p) (p)->lpVtbl->Release(p)
/*** IOleWindow methods ***/
#define IOleWindow_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IOleWindow_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)

#endif

HRESULT CALLBACK IOleWindow_GetWindow_Proxy(
    IOleWindow* This,
    HWND* phwnd);
void __RPC_STUB IOleWindow_GetWindow_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleWindow_ContextSensitiveHelp_Proxy(
    IOleWindow* This,
    BOOL fEnterMode);
void __RPC_STUB IOleWindow_ContextSensitiveHelp_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleWindow_INTERFACE_DEFINED__ */

typedef struct IOleLink IOleLink;
typedef IOleLink *LPOLELINK;

typedef enum tagOLEUPDATE {
    OLEUPDATE_ALWAYS = 1,
    OLEUPDATE_ONCALL = 3
} OLEUPDATE;

typedef OLEUPDATE *LPOLEUPDATE;

typedef OLEUPDATE *POLEUPDATE;

typedef enum tagOLELINKBIND {
    OLELINKBIND_EVENIFCLASSDIFF = 1
} OLELINKBIND;

/*****************************************************************************
 * IOleLink interface
 */
#ifndef __IOleLink_INTERFACE_DEFINED__
#define __IOleLink_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleLink, 0x0000011d, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleLink: IUnknown {

    virtual HRESULT CALLBACK SetUpdateOptions(
        DWORD dwUpdateOpt) = 0;

    virtual HRESULT CALLBACK GetUpdateOptions(
        DWORD* pdwUpdateOpt) = 0;

    virtual HRESULT CALLBACK SetSourceMoniker(
        IMoniker* pmk,
        REFCLSID rclsid) = 0;

    virtual HRESULT CALLBACK GetSourceMoniker(
        IMoniker** ppmk) = 0;

    virtual HRESULT CALLBACK SetSourceDisplayName(
        LPCOLESTR pszStatusText) = 0;

    virtual HRESULT CALLBACK GetSourceDisplayName(
        LPOLESTR* ppszDisplayName) = 0;

    virtual HRESULT CALLBACK BindToSource(
        DWORD bindflags,
        IBindCtx* pbc) = 0;

    virtual HRESULT CALLBACK BindIfRunning(
        ) = 0;

    virtual HRESULT CALLBACK GetBoundSource(
        IUnknown** ppunk) = 0;

    virtual HRESULT CALLBACK UnbindSource(
        ) = 0;

    virtual HRESULT CALLBACK Update(
        IBindCtx* pbc) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleLinkVtbl IOleLinkVtbl;
struct IOleLink {
    const IOleLinkVtbl* lpVtbl;
};
struct IOleLinkVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IOleLink methods ***/
    HRESULT (CALLBACK *SetUpdateOptions)(
        IOleLink* This,
        DWORD dwUpdateOpt);

    HRESULT (CALLBACK *GetUpdateOptions)(
        IOleLink* This,
        DWORD* pdwUpdateOpt);

    HRESULT (CALLBACK *SetSourceMoniker)(
        IOleLink* This,
        IMoniker* pmk,
        REFCLSID rclsid);

    HRESULT (CALLBACK *GetSourceMoniker)(
        IOleLink* This,
        IMoniker** ppmk);

    HRESULT (CALLBACK *SetSourceDisplayName)(
        IOleLink* This,
        LPCOLESTR pszStatusText);

    HRESULT (CALLBACK *GetSourceDisplayName)(
        IOleLink* This,
        LPOLESTR* ppszDisplayName);

    HRESULT (CALLBACK *BindToSource)(
        IOleLink* This,
        DWORD bindflags,
        IBindCtx* pbc);

    HRESULT (CALLBACK *BindIfRunning)(
        IOleLink* This);

    HRESULT (CALLBACK *GetBoundSource)(
        IOleLink* This,
        IUnknown** ppunk);

    HRESULT (CALLBACK *UnbindSource)(
        IOleLink* This);

    HRESULT (CALLBACK *Update)(
        IOleLink* This,
        IBindCtx* pbc);

};

#define IOleLink_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD1 (HRESULT,SetUpdateOptions,DWORD,dwUpdateOpt) \
    ICOM_METHOD1 (HRESULT,GetUpdateOptions,DWORD*,pdwUpdateOpt) \
    ICOM_METHOD2 (HRESULT,SetSourceMoniker,IMoniker*,pmk,REFCLSID,rclsid) \
    ICOM_METHOD1 (HRESULT,GetSourceMoniker,IMoniker**,ppmk) \
    ICOM_METHOD1 (HRESULT,SetSourceDisplayName,LPCOLESTR,pszStatusText) \
    ICOM_METHOD1 (HRESULT,GetSourceDisplayName,LPOLESTR*,ppszDisplayName) \
    ICOM_METHOD2 (HRESULT,BindToSource,DWORD,bindflags,IBindCtx*,pbc) \
    ICOM_METHOD  (HRESULT,BindIfRunning) \
    ICOM_METHOD1 (HRESULT,GetBoundSource,IUnknown**,ppunk) \
    ICOM_METHOD  (HRESULT,UnbindSource) \
    ICOM_METHOD1 (HRESULT,Update,IBindCtx*,pbc)

/*** IUnknown methods ***/
#define IOleLink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleLink_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleLink_Release(p) (p)->lpVtbl->Release(p)
/*** IOleLink methods ***/
#define IOleLink_SetUpdateOptions(p,a) (p)->lpVtbl->SetUpdateOptions(p,a)
#define IOleLink_GetUpdateOptions(p,a) (p)->lpVtbl->GetUpdateOptions(p,a)
#define IOleLink_SetSourceMoniker(p,a,b) (p)->lpVtbl->SetSourceMoniker(p,a,b)
#define IOleLink_GetSourceMoniker(p,a) (p)->lpVtbl->GetSourceMoniker(p,a)
#define IOleLink_SetSourceDisplayName(p,a) (p)->lpVtbl->SetSourceDisplayName(p,a)
#define IOleLink_GetSourceDisplayName(p,a) (p)->lpVtbl->GetSourceDisplayName(p,a)
#define IOleLink_BindToSource(p,a,b) (p)->lpVtbl->BindToSource(p,a,b)
#define IOleLink_BindIfRunning(p) (p)->lpVtbl->BindIfRunning(p)
#define IOleLink_GetBoundSource(p,a) (p)->lpVtbl->GetBoundSource(p,a)
#define IOleLink_UnbindSource(p) (p)->lpVtbl->UnbindSource(p)
#define IOleLink_Update(p,a) (p)->lpVtbl->Update(p,a)

#endif

HRESULT CALLBACK IOleLink_SetUpdateOptions_Proxy(
    IOleLink* This,
    DWORD dwUpdateOpt);
void __RPC_STUB IOleLink_SetUpdateOptions_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_GetUpdateOptions_Proxy(
    IOleLink* This,
    DWORD* pdwUpdateOpt);
void __RPC_STUB IOleLink_GetUpdateOptions_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_SetSourceMoniker_Proxy(
    IOleLink* This,
    IMoniker* pmk,
    REFCLSID rclsid);
void __RPC_STUB IOleLink_SetSourceMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_GetSourceMoniker_Proxy(
    IOleLink* This,
    IMoniker** ppmk);
void __RPC_STUB IOleLink_GetSourceMoniker_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_SetSourceDisplayName_Proxy(
    IOleLink* This,
    LPCOLESTR pszStatusText);
void __RPC_STUB IOleLink_SetSourceDisplayName_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_GetSourceDisplayName_Proxy(
    IOleLink* This,
    LPOLESTR* ppszDisplayName);
void __RPC_STUB IOleLink_GetSourceDisplayName_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_BindToSource_Proxy(
    IOleLink* This,
    DWORD bindflags,
    IBindCtx* pbc);
void __RPC_STUB IOleLink_BindToSource_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_BindIfRunning_Proxy(
    IOleLink* This);
void __RPC_STUB IOleLink_BindIfRunning_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_GetBoundSource_Proxy(
    IOleLink* This,
    IUnknown** ppunk);
void __RPC_STUB IOleLink_GetBoundSource_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_UnbindSource_Proxy(
    IOleLink* This);
void __RPC_STUB IOleLink_UnbindSource_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleLink_Update_Proxy(
    IOleLink* This,
    IBindCtx* pbc);
void __RPC_STUB IOleLink_Update_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleLink_INTERFACE_DEFINED__ */

typedef struct IOleItemContainer IOleItemContainer;
typedef IOleItemContainer *LPOLEITEMCONTAINER;

typedef enum tagBINDSPEED {
    BINDSPEED_INDEFINITE = 1,
    BINDSPEED_MODERATE = 2,
    BINDSPEED_IMMEDIATE = 3
} BINDSPEED;

typedef enum tagOLECONTF {
    OLECONTF_EMBEDDINGS = 1,
    OLECONTF_LINKS = 2,
    OLECONTF_OTHERS = 4,
    OLECONTF_ONLYUSER = 8,
    OLECONTF_ONLYIFRUNNING = 16
} OLECONTF;

#ifdef __WINE__
#undef GetObject
#endif
/*****************************************************************************
 * IOleItemContainer interface
 */
#ifndef __IOleItemContainer_INTERFACE_DEFINED__
#define __IOleItemContainer_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleItemContainer, 0x0000011c, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleItemContainer: IOleContainer {

    virtual HRESULT CALLBACK GetObject(
        LPOLESTR pszItem,
        DWORD dwSpeedNeeded,
        IBindCtx* pbc,
        REFIID riid,
        void** ppvObject) = 0;

    virtual HRESULT CALLBACK GetObjectStorage(
        LPOLESTR pszItem,
        IBindCtx* pbc,
        REFIID riid,
        void** ppvStorage) = 0;

    virtual HRESULT CALLBACK IsRunning(
        LPOLESTR pszItem) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleItemContainerVtbl IOleItemContainerVtbl;
struct IOleItemContainer {
    const IOleItemContainerVtbl* lpVtbl;
};
struct IOleItemContainerVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IParseDisplayName methods ***/
    HRESULT (CALLBACK *ParseDisplayName)(
        IOleItemContainer* This,
        IBindCtx* pbc,
        LPOLESTR pszDisplayName,
        ULONG* pchEaten,
        IMoniker** ppmkOut);

    /*** IOleContainer methods ***/
    HRESULT (CALLBACK *EnumObjects)(
        IOleItemContainer* This,
        DWORD grfFlags,
        IEnumUnknown** ppenum);

    HRESULT (CALLBACK *LockContainer)(
        IOleItemContainer* This,
        BOOL fLock);

    /*** IOleItemContainer methods ***/
    HRESULT (CALLBACK *GetObject)(
        IOleItemContainer* This,
        LPOLESTR pszItem,
        DWORD dwSpeedNeeded,
        IBindCtx* pbc,
        REFIID riid,
        void** ppvObject);

    HRESULT (CALLBACK *GetObjectStorage)(
        IOleItemContainer* This,
        LPOLESTR pszItem,
        IBindCtx* pbc,
        REFIID riid,
        void** ppvStorage);

    HRESULT (CALLBACK *IsRunning)(
        IOleItemContainer* This,
        LPOLESTR pszItem);

};

#define IOleItemContainer_IMETHODS \
    IOleContainer_IMETHODS \
    ICOM_METHOD5 (HRESULT,GetObject,LPOLESTR,pszItem,DWORD,dwSpeedNeeded,IBindCtx*,pbc,REFIID,riid,void**,ppvObject) \
    ICOM_METHOD4 (HRESULT,GetObjectStorage,LPOLESTR,pszItem,IBindCtx*,pbc,REFIID,riid,void**,ppvStorage) \
    ICOM_METHOD1 (HRESULT,IsRunning,LPOLESTR,pszItem)

/*** IUnknown methods ***/
#define IOleItemContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleItemContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleItemContainer_Release(p) (p)->lpVtbl->Release(p)
/*** IParseDisplayName methods ***/
#define IOleItemContainer_ParseDisplayName(p,a,b,c,d) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d)
/*** IOleContainer methods ***/
#define IOleItemContainer_EnumObjects(p,a,b) (p)->lpVtbl->EnumObjects(p,a,b)
#define IOleItemContainer_LockContainer(p,a) (p)->lpVtbl->LockContainer(p,a)
/*** IOleItemContainer methods ***/
#define IOleItemContainer_GetObject(p,a,b,c,d,e) (p)->lpVtbl->GetObject(p,a,b,c,d,e)
#define IOleItemContainer_GetObjectStorage(p,a,b,c,d) (p)->lpVtbl->GetObjectStorage(p,a,b,c,d)
#define IOleItemContainer_IsRunning(p,a) (p)->lpVtbl->IsRunning(p,a)

#endif

HRESULT CALLBACK IOleItemContainer_GetObject_Proxy(
    IOleItemContainer* This,
    LPOLESTR pszItem,
    DWORD dwSpeedNeeded,
    IBindCtx* pbc,
    REFIID riid,
    void** ppvObject);
void __RPC_STUB IOleItemContainer_GetObject_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleItemContainer_GetObjectStorage_Proxy(
    IOleItemContainer* This,
    LPOLESTR pszItem,
    IBindCtx* pbc,
    REFIID riid,
    void** ppvStorage);
void __RPC_STUB IOleItemContainer_GetObjectStorage_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleItemContainer_IsRunning_Proxy(
    IOleItemContainer* This,
    LPOLESTR pszItem);
void __RPC_STUB IOleItemContainer_IsRunning_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleItemContainer_INTERFACE_DEFINED__ */

typedef struct IOleInPlaceUIWindow IOleInPlaceUIWindow;
typedef IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;

typedef RECT BORDERWIDTHS;

typedef LPRECT LPBORDERWIDTHS;

typedef LPCRECT LPCBORDERWIDTHS;

/*****************************************************************************
 * IOleInPlaceUIWindow interface
 */
#ifndef __IOleInPlaceUIWindow_INTERFACE_DEFINED__
#define __IOleInPlaceUIWindow_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleInPlaceUIWindow, 0x00000115, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleInPlaceUIWindow: IOleWindow {

    virtual HRESULT CALLBACK GetBorder(
        LPRECT lprectBorder) = 0;

    virtual HRESULT CALLBACK RequestBorderSpace(
        LPCBORDERWIDTHS pborderwidths) = 0;

    virtual HRESULT CALLBACK SetBorderSpace(
        LPCBORDERWIDTHS pborderwidths) = 0;

    virtual HRESULT CALLBACK SetActiveObject(
        IOleInPlaceActiveObject* pActiveObject,
        LPCOLESTR pszObjName) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleInPlaceUIWindowVtbl IOleInPlaceUIWindowVtbl;
struct IOleInPlaceUIWindow {
    const IOleInPlaceUIWindowVtbl* lpVtbl;
};
struct IOleInPlaceUIWindowVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

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

    HRESULT (CALLBACK *ContextSensitiveHelp)(
        IOleInPlaceUIWindow* This,
        BOOL fEnterMode);

    /*** IOleInPlaceUIWindow methods ***/
    HRESULT (CALLBACK *GetBorder)(
        IOleInPlaceUIWindow* This,
        LPRECT lprectBorder);

    HRESULT (CALLBACK *RequestBorderSpace)(
        IOleInPlaceUIWindow* This,
        LPCBORDERWIDTHS pborderwidths);

    HRESULT (CALLBACK *SetBorderSpace)(
        IOleInPlaceUIWindow* This,
        LPCBORDERWIDTHS pborderwidths);

    HRESULT (CALLBACK *SetActiveObject)(
        IOleInPlaceUIWindow* This,
        IOleInPlaceActiveObject* pActiveObject,
        LPCOLESTR pszObjName);

};

#define IOleInPlaceUIWindow_IMETHODS \
    IOleWindow_IMETHODS \
    ICOM_METHOD1 (HRESULT,GetBorder,LPRECT,lprectBorder) \
    ICOM_METHOD1 (HRESULT,RequestBorderSpace,LPCBORDERWIDTHS,pborderwidths) \
    ICOM_METHOD1 (HRESULT,SetBorderSpace,LPCBORDERWIDTHS,pborderwidths) \
    ICOM_METHOD2 (HRESULT,SetActiveObject,IOleInPlaceActiveObject*,pActiveObject,LPCOLESTR,pszObjName)

/*** IUnknown methods ***/
#define IOleInPlaceUIWindow_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleInPlaceUIWindow_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleInPlaceUIWindow_Release(p) (p)->lpVtbl->Release(p)
/*** IOleWindow methods ***/
#define IOleInPlaceUIWindow_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IOleInPlaceUIWindow_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
/*** IOleInPlaceUIWindow methods ***/
#define IOleInPlaceUIWindow_GetBorder(p,a) (p)->lpVtbl->GetBorder(p,a)
#define IOleInPlaceUIWindow_RequestBorderSpace(p,a) (p)->lpVtbl->RequestBorderSpace(p,a)
#define IOleInPlaceUIWindow_SetBorderSpace(p,a) (p)->lpVtbl->SetBorderSpace(p,a)
#define IOleInPlaceUIWindow_SetActiveObject(p,a,b) (p)->lpVtbl->SetActiveObject(p,a,b)

#endif

HRESULT CALLBACK IOleInPlaceUIWindow_GetBorder_Proxy(
    IOleInPlaceUIWindow* This,
    LPRECT lprectBorder);
void __RPC_STUB IOleInPlaceUIWindow_GetBorder_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceUIWindow_RequestBorderSpace_Proxy(
    IOleInPlaceUIWindow* This,
    LPCBORDERWIDTHS pborderwidths);
void __RPC_STUB IOleInPlaceUIWindow_RequestBorderSpace_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceUIWindow_SetBorderSpace_Proxy(
    IOleInPlaceUIWindow* This,
    LPCBORDERWIDTHS pborderwidths);
void __RPC_STUB IOleInPlaceUIWindow_SetBorderSpace_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceUIWindow_SetActiveObject_Proxy(
    IOleInPlaceUIWindow* This,
    IOleInPlaceActiveObject* pActiveObject,
    LPCOLESTR pszObjName);
void __RPC_STUB IOleInPlaceUIWindow_SetActiveObject_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleInPlaceUIWindow_INTERFACE_DEFINED__ */

typedef IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;

/*****************************************************************************
 * IOleInPlaceActiveObject interface
 */
#ifndef __IOleInPlaceActiveObject_INTERFACE_DEFINED__
#define __IOleInPlaceActiveObject_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleInPlaceActiveObject, 0x00000117, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleInPlaceActiveObject: IOleWindow {

    virtual HRESULT CALLBACK TranslateAccelerator(
        LPMSG lpmsg) = 0;

    virtual HRESULT CALLBACK OnFrameWindowActivate(
        BOOL fActivate) = 0;

    virtual HRESULT CALLBACK OnDocWindowActivate(
        BOOL fActivate) = 0;

    virtual HRESULT CALLBACK ResizeBorder(
        LPCRECT prcBorder,
        IOleInPlaceUIWindow* pUIWindow,
        BOOL fFrameWindow) = 0;

    virtual HRESULT CALLBACK EnableModeless(
        BOOL fEnable) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleInPlaceActiveObjectVtbl IOleInPlaceActiveObjectVtbl;
struct IOleInPlaceActiveObject {
    const IOleInPlaceActiveObjectVtbl* lpVtbl;
};
struct IOleInPlaceActiveObjectVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

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

    HRESULT (CALLBACK *ContextSensitiveHelp)(
        IOleInPlaceActiveObject* This,
        BOOL fEnterMode);

    /*** IOleInPlaceActiveObject methods ***/
    HRESULT (CALLBACK *TranslateAccelerator)(
        IOleInPlaceActiveObject* This,
        LPMSG lpmsg);

    HRESULT (CALLBACK *OnFrameWindowActivate)(
        IOleInPlaceActiveObject* This,
        BOOL fActivate);

    HRESULT (CALLBACK *OnDocWindowActivate)(
        IOleInPlaceActiveObject* This,
        BOOL fActivate);

    HRESULT (CALLBACK *ResizeBorder)(
        IOleInPlaceActiveObject* This,
        LPCRECT prcBorder,
        IOleInPlaceUIWindow* pUIWindow,
        BOOL fFrameWindow);

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

};

#define IOleInPlaceActiveObject_IMETHODS \
    IOleWindow_IMETHODS \
    ICOM_METHOD1 (HRESULT,TranslateAccelerator,LPMSG,lpmsg) \
    ICOM_METHOD1 (HRESULT,OnFrameWindowActivate,BOOL,fActivate) \
    ICOM_METHOD1 (HRESULT,OnDocWindowActivate,BOOL,fActivate) \
    ICOM_METHOD3 (HRESULT,ResizeBorder,LPCRECT,prcBorder,IOleInPlaceUIWindow*,pUIWindow,BOOL,fFrameWindow) \
    ICOM_METHOD1 (HRESULT,EnableModeless,BOOL,fEnable)

/*** IUnknown methods ***/
#define IOleInPlaceActiveObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleInPlaceActiveObject_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleInPlaceActiveObject_Release(p) (p)->lpVtbl->Release(p)
/*** IOleWindow methods ***/
#define IOleInPlaceActiveObject_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IOleInPlaceActiveObject_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
/*** IOleInPlaceActiveObject methods ***/
#define IOleInPlaceActiveObject_TranslateAccelerator(p,a) (p)->lpVtbl->TranslateAccelerator(p,a)
#define IOleInPlaceActiveObject_OnFrameWindowActivate(p,a) (p)->lpVtbl->OnFrameWindowActivate(p,a)
#define IOleInPlaceActiveObject_OnDocWindowActivate(p,a) (p)->lpVtbl->OnDocWindowActivate(p,a)
#define IOleInPlaceActiveObject_ResizeBorder(p,a,b,c) (p)->lpVtbl->ResizeBorder(p,a,b,c)
#define IOleInPlaceActiveObject_EnableModeless(p,a) (p)->lpVtbl->EnableModeless(p,a)

#endif

HRESULT CALLBACK IOleInPlaceActiveObject_RemoteTranslateAccelerator_Proxy(
    IOleInPlaceActiveObject* This);
void __RPC_STUB IOleInPlaceActiveObject_RemoteTranslateAccelerator_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceActiveObject_TranslateAccelerator_Proxy(
    IOleInPlaceActiveObject* This,
    LPMSG lpmsg);
HRESULT __RPC_STUB IOleInPlaceActiveObject_TranslateAccelerator_Stub(
    IOleInPlaceActiveObject* This);
HRESULT CALLBACK IOleInPlaceActiveObject_OnFrameWindowActivate_Proxy(
    IOleInPlaceActiveObject* This,
    BOOL fActivate);
void __RPC_STUB IOleInPlaceActiveObject_OnFrameWindowActivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceActiveObject_OnDocWindowActivate_Proxy(
    IOleInPlaceActiveObject* This,
    BOOL fActivate);
void __RPC_STUB IOleInPlaceActiveObject_OnDocWindowActivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceActiveObject_RemoteResizeBorder_Proxy(
    IOleInPlaceActiveObject* This,
    LPCRECT prcBorder,
    REFIID riid,
    IOleInPlaceUIWindow* pUIWindow,
    BOOL fFrameWindow);
void __RPC_STUB IOleInPlaceActiveObject_RemoteResizeBorder_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceActiveObject_ResizeBorder_Proxy(
    IOleInPlaceActiveObject* This,
    LPCRECT prcBorder,
    IOleInPlaceUIWindow* pUIWindow,
    BOOL fFrameWindow);
HRESULT __RPC_STUB IOleInPlaceActiveObject_ResizeBorder_Stub(
    IOleInPlaceActiveObject* This,
    LPCRECT prcBorder,
    REFIID riid,
    IOleInPlaceUIWindow* pUIWindow,
    BOOL fFrameWindow);
HRESULT CALLBACK IOleInPlaceActiveObject_EnableModeless_Proxy(
    IOleInPlaceActiveObject* This,
    BOOL fEnable);
void __RPC_STUB IOleInPlaceActiveObject_EnableModeless_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleInPlaceActiveObject_INTERFACE_DEFINED__ */

typedef struct IOleInPlaceFrame IOleInPlaceFrame;
typedef IOleInPlaceFrame *LPOLEINPLACEFRAME;

typedef struct tagOIFI {
    UINT cb;
    BOOL fMDIApp;
    HWND hwndFrame;
    HACCEL haccel;
    UINT cAccelEntries;
} OLEINPLACEFRAMEINFO, *LPOLEINPLACEFRAMEINFO;

typedef struct tagOleMenuGroupWidths {
    LONG width[6];
} OLEMENUGROUPWIDTHS, *LPOLEMENUGROUPWIDTHS;

typedef HGLOBAL HOLEMENU;

/*****************************************************************************
 * IOleInPlaceFrame interface
 */
#ifndef __IOleInPlaceFrame_INTERFACE_DEFINED__
#define __IOleInPlaceFrame_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleInPlaceFrame, 0x00000116, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleInPlaceFrame: IOleInPlaceUIWindow {

    virtual HRESULT CALLBACK InsertMenus(
        HMENU hmenuShared,
        LPOLEMENUGROUPWIDTHS lpMenuWidths) = 0;

    virtual HRESULT CALLBACK SetMenu(
        HMENU hmenuShared,
        HOLEMENU holemenu,
        HWND hwndActiveObject) = 0;

    virtual HRESULT CALLBACK RemoveMenus(
        HMENU hmenuShared) = 0;

    virtual HRESULT CALLBACK SetStatusText(
        LPCOLESTR pszStatusText) = 0;

    virtual HRESULT CALLBACK EnableModeless(
        BOOL fEnable) = 0;

    virtual HRESULT CALLBACK TranslateAccelerator(
        LPMSG lpmsg,
        WORD wID) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleInPlaceFrameVtbl IOleInPlaceFrameVtbl;
struct IOleInPlaceFrame {
    const IOleInPlaceFrameVtbl* lpVtbl;
};
struct IOleInPlaceFrameVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

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

    HRESULT (CALLBACK *ContextSensitiveHelp)(
        IOleInPlaceFrame* This,
        BOOL fEnterMode);

    /*** IOleInPlaceUIWindow methods ***/
    HRESULT (CALLBACK *GetBorder)(
        IOleInPlaceFrame* This,
        LPRECT lprectBorder);

    HRESULT (CALLBACK *RequestBorderSpace)(
        IOleInPlaceFrame* This,
        LPCBORDERWIDTHS pborderwidths);

    HRESULT (CALLBACK *SetBorderSpace)(
        IOleInPlaceFrame* This,
        LPCBORDERWIDTHS pborderwidths);

    HRESULT (CALLBACK *SetActiveObject)(
        IOleInPlaceFrame* This,
        IOleInPlaceActiveObject* pActiveObject,
        LPCOLESTR pszObjName);

    /*** IOleInPlaceFrame methods ***/
    HRESULT (CALLBACK *InsertMenus)(
        IOleInPlaceFrame* This,
        HMENU hmenuShared,
        LPOLEMENUGROUPWIDTHS lpMenuWidths);

    HRESULT (CALLBACK *SetMenu)(
        IOleInPlaceFrame* This,
        HMENU hmenuShared,
        HOLEMENU holemenu,
        HWND hwndActiveObject);

    HRESULT (CALLBACK *RemoveMenus)(
        IOleInPlaceFrame* This,
        HMENU hmenuShared);

    HRESULT (CALLBACK *SetStatusText)(
        IOleInPlaceFrame* This,
        LPCOLESTR pszStatusText);

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

    HRESULT (CALLBACK *TranslateAccelerator)(
        IOleInPlaceFrame* This,
        LPMSG lpmsg,
        WORD wID);

};

#define IOleInPlaceFrame_IMETHODS \
    IOleInPlaceUIWindow_IMETHODS \
    ICOM_METHOD2 (HRESULT,InsertMenus,HMENU,hmenuShared,LPOLEMENUGROUPWIDTHS,lpMenuWidths) \
    ICOM_METHOD3 (HRESULT,SetMenu,HMENU,hmenuShared,HOLEMENU,holemenu,HWND,hwndActiveObject) \
    ICOM_METHOD1 (HRESULT,RemoveMenus,HMENU,hmenuShared) \
    ICOM_METHOD1 (HRESULT,SetStatusText,LPCOLESTR,pszStatusText) \
    ICOM_METHOD1 (HRESULT,EnableModeless,BOOL,fEnable) \
    ICOM_METHOD2 (HRESULT,TranslateAccelerator,LPMSG,lpmsg,WORD,wID)

/*** IUnknown methods ***/
#define IOleInPlaceFrame_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleInPlaceFrame_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleInPlaceFrame_Release(p) (p)->lpVtbl->Release(p)
/*** IOleWindow methods ***/
#define IOleInPlaceFrame_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IOleInPlaceFrame_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
/*** IOleInPlaceUIWindow methods ***/
#define IOleInPlaceFrame_GetBorder(p,a) (p)->lpVtbl->GetBorder(p,a)
#define IOleInPlaceFrame_RequestBorderSpace(p,a) (p)->lpVtbl->RequestBorderSpace(p,a)
#define IOleInPlaceFrame_SetBorderSpace(p,a) (p)->lpVtbl->SetBorderSpace(p,a)
#define IOleInPlaceFrame_SetActiveObject(p,a,b) (p)->lpVtbl->SetActiveObject(p,a,b)
/*** IOleInPlaceFrame methods ***/
#define IOleInPlaceFrame_InsertMenus(p,a,b) (p)->lpVtbl->InsertMenus(p,a,b)
#define IOleInPlaceFrame_SetMenu(p,a,b,c) (p)->lpVtbl->SetMenu(p,a,b,c)
#define IOleInPlaceFrame_RemoveMenus(p,a) (p)->lpVtbl->RemoveMenus(p,a)
#define IOleInPlaceFrame_SetStatusText(p,a) (p)->lpVtbl->SetStatusText(p,a)
#define IOleInPlaceFrame_EnableModeless(p,a) (p)->lpVtbl->EnableModeless(p,a)
#define IOleInPlaceFrame_TranslateAccelerator(p,a,b) (p)->lpVtbl->TranslateAccelerator(p,a,b)

#endif

HRESULT CALLBACK IOleInPlaceFrame_InsertMenus_Proxy(
    IOleInPlaceFrame* This,
    HMENU hmenuShared,
    LPOLEMENUGROUPWIDTHS lpMenuWidths);
void __RPC_STUB IOleInPlaceFrame_InsertMenus_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceFrame_SetMenu_Proxy(
    IOleInPlaceFrame* This,
    HMENU hmenuShared,
    HOLEMENU holemenu,
    HWND hwndActiveObject);
void __RPC_STUB IOleInPlaceFrame_SetMenu_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceFrame_RemoveMenus_Proxy(
    IOleInPlaceFrame* This,
    HMENU hmenuShared);
void __RPC_STUB IOleInPlaceFrame_RemoveMenus_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceFrame_SetStatusText_Proxy(
    IOleInPlaceFrame* This,
    LPCOLESTR pszStatusText);
void __RPC_STUB IOleInPlaceFrame_SetStatusText_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceFrame_EnableModeless_Proxy(
    IOleInPlaceFrame* This,
    BOOL fEnable);
void __RPC_STUB IOleInPlaceFrame_EnableModeless_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceFrame_TranslateAccelerator_Proxy(
    IOleInPlaceFrame* This,
    LPMSG lpmsg,
    WORD wID);
void __RPC_STUB IOleInPlaceFrame_TranslateAccelerator_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleInPlaceFrame_INTERFACE_DEFINED__ */

typedef struct IOleInPlaceObject IOleInPlaceObject;
typedef IOleInPlaceObject *LPOLEINPLACEOBJECT;

/*****************************************************************************
 * IOleInPlaceObject interface
 */
#ifndef __IOleInPlaceObject_INTERFACE_DEFINED__
#define __IOleInPlaceObject_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleInPlaceObject, 0x00000113, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleInPlaceObject: IOleWindow {

    virtual HRESULT CALLBACK InPlaceDeactivate(
        ) = 0;

    virtual HRESULT CALLBACK UIDeactivate(
        ) = 0;

    virtual HRESULT CALLBACK SetObjectRects(
        LPCRECT lprcPosRect,
        LPCRECT lprcClipRect) = 0;

    virtual HRESULT CALLBACK ReactivateAndUndo(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleInPlaceObjectVtbl IOleInPlaceObjectVtbl;
struct IOleInPlaceObject {
    const IOleInPlaceObjectVtbl* lpVtbl;
};
struct IOleInPlaceObjectVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

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

    HRESULT (CALLBACK *ContextSensitiveHelp)(
        IOleInPlaceObject* This,
        BOOL fEnterMode);

    /*** IOleInPlaceObject methods ***/
    HRESULT (CALLBACK *InPlaceDeactivate)(
        IOleInPlaceObject* This);

    HRESULT (CALLBACK *UIDeactivate)(
        IOleInPlaceObject* This);

    HRESULT (CALLBACK *SetObjectRects)(
        IOleInPlaceObject* This,
        LPCRECT lprcPosRect,
        LPCRECT lprcClipRect);

    HRESULT (CALLBACK *ReactivateAndUndo)(
        IOleInPlaceObject* This);

};

#define IOleInPlaceObject_IMETHODS \
    IOleWindow_IMETHODS \
    ICOM_METHOD  (HRESULT,InPlaceDeactivate) \
    ICOM_METHOD  (HRESULT,UIDeactivate) \
    ICOM_METHOD2 (HRESULT,SetObjectRects,LPCRECT,lprcPosRect,LPCRECT,lprcClipRect) \
    ICOM_METHOD  (HRESULT,ReactivateAndUndo)

/*** IUnknown methods ***/
#define IOleInPlaceObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleInPlaceObject_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleInPlaceObject_Release(p) (p)->lpVtbl->Release(p)
/*** IOleWindow methods ***/
#define IOleInPlaceObject_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IOleInPlaceObject_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
/*** IOleInPlaceObject methods ***/
#define IOleInPlaceObject_InPlaceDeactivate(p) (p)->lpVtbl->InPlaceDeactivate(p)
#define IOleInPlaceObject_UIDeactivate(p) (p)->lpVtbl->UIDeactivate(p)
#define IOleInPlaceObject_SetObjectRects(p,a,b) (p)->lpVtbl->SetObjectRects(p,a,b)
#define IOleInPlaceObject_ReactivateAndUndo(p) (p)->lpVtbl->ReactivateAndUndo(p)

#endif

HRESULT CALLBACK IOleInPlaceObject_InPlaceDeactivate_Proxy(
    IOleInPlaceObject* This);
void __RPC_STUB IOleInPlaceObject_InPlaceDeactivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceObject_UIDeactivate_Proxy(
    IOleInPlaceObject* This);
void __RPC_STUB IOleInPlaceObject_UIDeactivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceObject_SetObjectRects_Proxy(
    IOleInPlaceObject* This,
    LPCRECT lprcPosRect,
    LPCRECT lprcClipRect);
void __RPC_STUB IOleInPlaceObject_SetObjectRects_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceObject_ReactivateAndUndo_Proxy(
    IOleInPlaceObject* This);
void __RPC_STUB IOleInPlaceObject_ReactivateAndUndo_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleInPlaceObject_INTERFACE_DEFINED__ */

typedef struct IOleInPlaceSite IOleInPlaceSite;
typedef IOleInPlaceSite *LPOLEINPLACESITE;

/*****************************************************************************
 * IOleInPlaceSite interface
 */
#ifndef __IOleInPlaceSite_INTERFACE_DEFINED__
#define __IOleInPlaceSite_INTERFACE_DEFINED__

DEFINE_GUID(IID_IOleInPlaceSite, 0x00000119, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IOleInPlaceSite: IOleWindow {

    virtual HRESULT CALLBACK CanInPlaceActivate(
        ) = 0;

    virtual HRESULT CALLBACK OnInPlaceActivate(
        ) = 0;

    virtual HRESULT CALLBACK OnUIActivate(
        ) = 0;

    virtual HRESULT CALLBACK GetWindowContext(
        IOleInPlaceFrame** ppFrame,
        IOleInPlaceUIWindow** ppDoc,
        LPRECT lprcPosRect,
        LPRECT lprcClipRect,
        LPOLEINPLACEFRAMEINFO lpFrameInfo) = 0;

    virtual HRESULT CALLBACK Scroll(
        SIZE scrollExtant) = 0;

    virtual HRESULT CALLBACK OnUIDeactivate(
        BOOL fUndoable) = 0;

    virtual HRESULT CALLBACK OnInPlaceDeactivate(
        ) = 0;

    virtual HRESULT CALLBACK DiscardUndoState(
        ) = 0;

    virtual HRESULT CALLBACK DeactivateAndUndo(
        ) = 0;

    virtual HRESULT CALLBACK OnPosRectChange(
        LPCRECT lprcPosRect) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IOleInPlaceSiteVtbl IOleInPlaceSiteVtbl;
struct IOleInPlaceSite {
    const IOleInPlaceSiteVtbl* lpVtbl;
};
struct IOleInPlaceSiteVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

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

    HRESULT (CALLBACK *ContextSensitiveHelp)(
        IOleInPlaceSite* This,
        BOOL fEnterMode);

    /*** IOleInPlaceSite methods ***/
    HRESULT (CALLBACK *CanInPlaceActivate)(
        IOleInPlaceSite* This);

    HRESULT (CALLBACK *OnInPlaceActivate)(
        IOleInPlaceSite* This);

    HRESULT (CALLBACK *OnUIActivate)(
        IOleInPlaceSite* This);

    HRESULT (CALLBACK *GetWindowContext)(
        IOleInPlaceSite* This,
        IOleInPlaceFrame** ppFrame,
        IOleInPlaceUIWindow** ppDoc,
        LPRECT lprcPosRect,
        LPRECT lprcClipRect,
        LPOLEINPLACEFRAMEINFO lpFrameInfo);

    HRESULT (CALLBACK *Scroll)(
        IOleInPlaceSite* This,
        SIZE scrollExtant);

    HRESULT (CALLBACK *OnUIDeactivate)(
        IOleInPlaceSite* This,
        BOOL fUndoable);

    HRESULT (CALLBACK *OnInPlaceDeactivate)(
        IOleInPlaceSite* This);

    HRESULT (CALLBACK *DiscardUndoState)(
        IOleInPlaceSite* This);

    HRESULT (CALLBACK *DeactivateAndUndo)(
        IOleInPlaceSite* This);

    HRESULT (CALLBACK *OnPosRectChange)(
        IOleInPlaceSite* This,
        LPCRECT lprcPosRect);

};

#define IOleInPlaceSite_IMETHODS \
    IOleWindow_IMETHODS \
    ICOM_METHOD  (HRESULT,CanInPlaceActivate) \
    ICOM_METHOD  (HRESULT,OnInPlaceActivate) \
    ICOM_METHOD  (HRESULT,OnUIActivate) \
    ICOM_METHOD5 (HRESULT,GetWindowContext,IOleInPlaceFrame**,ppFrame,IOleInPlaceUIWindow**,ppDoc,LPRECT,lprcPosRect,LPRECT,lprcClipRect,LPOLEINPLACEFRAMEINFO,lpFrameInfo) \
    ICOM_METHOD1 (HRESULT,Scroll,SIZE,scrollExtant) \
    ICOM_METHOD1 (HRESULT,OnUIDeactivate,BOOL,fUndoable) \
    ICOM_METHOD  (HRESULT,OnInPlaceDeactivate) \
    ICOM_METHOD  (HRESULT,DiscardUndoState) \
    ICOM_METHOD  (HRESULT,DeactivateAndUndo) \
    ICOM_METHOD1 (HRESULT,OnPosRectChange,LPCRECT,lprcPosRect)

/*** IUnknown methods ***/
#define IOleInPlaceSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IOleInPlaceSite_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IOleInPlaceSite_Release(p) (p)->lpVtbl->Release(p)
/*** IOleWindow methods ***/
#define IOleInPlaceSite_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
#define IOleInPlaceSite_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
/*** IOleInPlaceSite methods ***/
#define IOleInPlaceSite_CanInPlaceActivate(p) (p)->lpVtbl->CanInPlaceActivate(p)
#define IOleInPlaceSite_OnInPlaceActivate(p) (p)->lpVtbl->OnInPlaceActivate(p)
#define IOleInPlaceSite_OnUIActivate(p) (p)->lpVtbl->OnUIActivate(p)
#define IOleInPlaceSite_GetWindowContext(p,a,b,c,d,e) (p)->lpVtbl->GetWindowContext(p,a,b,c,d,e)
#define IOleInPlaceSite_Scroll(p,a) (p)->lpVtbl->Scroll(p,a)
#define IOleInPlaceSite_OnUIDeactivate(p,a) (p)->lpVtbl->OnUIDeactivate(p,a)
#define IOleInPlaceSite_OnInPlaceDeactivate(p) (p)->lpVtbl->OnInPlaceDeactivate(p)
#define IOleInPlaceSite_DiscardUndoState(p) (p)->lpVtbl->DiscardUndoState(p)
#define IOleInPlaceSite_DeactivateAndUndo(p) (p)->lpVtbl->DeactivateAndUndo(p)
#define IOleInPlaceSite_OnPosRectChange(p,a) (p)->lpVtbl->OnPosRectChange(p,a)

#endif

HRESULT CALLBACK IOleInPlaceSite_CanInPlaceActivate_Proxy(
    IOleInPlaceSite* This);
void __RPC_STUB IOleInPlaceSite_CanInPlaceActivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_OnInPlaceActivate_Proxy(
    IOleInPlaceSite* This);
void __RPC_STUB IOleInPlaceSite_OnInPlaceActivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_OnUIActivate_Proxy(
    IOleInPlaceSite* This);
void __RPC_STUB IOleInPlaceSite_OnUIActivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_GetWindowContext_Proxy(
    IOleInPlaceSite* This,
    IOleInPlaceFrame** ppFrame,
    IOleInPlaceUIWindow** ppDoc,
    LPRECT lprcPosRect,
    LPRECT lprcClipRect,
    LPOLEINPLACEFRAMEINFO lpFrameInfo);
void __RPC_STUB IOleInPlaceSite_GetWindowContext_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_Scroll_Proxy(
    IOleInPlaceSite* This,
    SIZE scrollExtant);
void __RPC_STUB IOleInPlaceSite_Scroll_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_OnUIDeactivate_Proxy(
    IOleInPlaceSite* This,
    BOOL fUndoable);
void __RPC_STUB IOleInPlaceSite_OnUIDeactivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_OnInPlaceDeactivate_Proxy(
    IOleInPlaceSite* This);
void __RPC_STUB IOleInPlaceSite_OnInPlaceDeactivate_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_DiscardUndoState_Proxy(
    IOleInPlaceSite* This);
void __RPC_STUB IOleInPlaceSite_DiscardUndoState_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_DeactivateAndUndo_Proxy(
    IOleInPlaceSite* This);
void __RPC_STUB IOleInPlaceSite_DeactivateAndUndo_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IOleInPlaceSite_OnPosRectChange_Proxy(
    IOleInPlaceSite* This,
    LPCRECT lprcPosRect);
void __RPC_STUB IOleInPlaceSite_OnPosRectChange_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IOleInPlaceSite_INTERFACE_DEFINED__ */

typedef struct IContinue IContinue;
/*****************************************************************************
 * IContinue interface
 */
#ifndef __IContinue_INTERFACE_DEFINED__
#define __IContinue_INTERFACE_DEFINED__

DEFINE_GUID(IID_IContinue, 0x0000012a, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IContinue: IUnknown {

    virtual HRESULT CALLBACK FContinue(
        ) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IContinueVtbl IContinueVtbl;
struct IContinue {
    const IContinueVtbl* lpVtbl;
};
struct IContinueVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IContinue methods ***/
    HRESULT (CALLBACK *FContinue)(
        IContinue* This);

};

#define IContinue_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD  (HRESULT,FContinue)

/*** IUnknown methods ***/
#define IContinue_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IContinue_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IContinue_Release(p) (p)->lpVtbl->Release(p)
/*** IContinue methods ***/
#define IContinue_FContinue(p) (p)->lpVtbl->FContinue(p)

#endif

HRESULT CALLBACK IContinue_FContinue_Proxy(
    IContinue* This);
void __RPC_STUB IContinue_FContinue_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IContinue_INTERFACE_DEFINED__ */

typedef struct IViewObject IViewObject;
typedef IViewObject *LPVIEWOBJECT;

/*****************************************************************************
 * IViewObject interface
 */
#ifndef __IViewObject_INTERFACE_DEFINED__
#define __IViewObject_INTERFACE_DEFINED__

DEFINE_GUID(IID_IViewObject, 0x0000010d, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IViewObject: IUnknown {

    virtual HRESULT CALLBACK Draw(
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DVTARGETDEVICE* ptd,
        HDC hdcTargetDev,
        HDC hdcDraw,
        LPCRECTL lprcBounds,
        LPCRECTL lprcWBounds,
        BOOL (STDMETHODCALLTYPE *pfnContinue)(
            ULONG_PTR dwContinue),
        ULONG_PTR dwContinue) = 0;

    virtual HRESULT CALLBACK GetColorSet(
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DVTARGETDEVICE* ptd,
        HDC hicTargetDev,
        LOGPALETTE** ppColorSet) = 0;

    virtual HRESULT CALLBACK Freeze(
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DWORD* pdwFreeze) = 0;

    virtual HRESULT CALLBACK Unfreeze(
        DWORD dwFreeze) = 0;

    virtual HRESULT CALLBACK SetAdvise(
        DWORD aspects,
        DWORD advf,
        IAdviseSink* pAdvSink) = 0;

    virtual HRESULT CALLBACK GetAdvise(
        DWORD* pAspects,
        DWORD* pAdvf,
        IAdviseSink** ppAdvSink) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IViewObjectVtbl IViewObjectVtbl;
struct IViewObject {
    const IViewObjectVtbl* lpVtbl;
};
struct IViewObjectVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IViewObject methods ***/
    HRESULT (CALLBACK *Draw)(
        IViewObject* This,
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DVTARGETDEVICE* ptd,
        HDC hdcTargetDev,
        HDC hdcDraw,
        LPCRECTL lprcBounds,
        LPCRECTL lprcWBounds,
        BOOL (STDMETHODCALLTYPE *pfnContinue)(
            ULONG_PTR dwContinue),
        ULONG_PTR dwContinue);

    HRESULT (CALLBACK *GetColorSet)(
        IViewObject* This,
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DVTARGETDEVICE* ptd,
        HDC hicTargetDev,
        LOGPALETTE** ppColorSet);

    HRESULT (CALLBACK *Freeze)(
        IViewObject* This,
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DWORD* pdwFreeze);

    HRESULT (CALLBACK *Unfreeze)(
        IViewObject* This,
        DWORD dwFreeze);

    HRESULT (CALLBACK *SetAdvise)(
        IViewObject* This,
        DWORD aspects,
        DWORD advf,
        IAdviseSink* pAdvSink);

    HRESULT (CALLBACK *GetAdvise)(
        IViewObject* This,
        DWORD* pAspects,
        DWORD* pAdvf,
        IAdviseSink** ppAdvSink);

};

#define IViewObject_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD10 (HRESULT,Draw,DWORD,dwDrawAspect,LONG,lindex,void*,pvAspect,DVTARGETDEVICE*,ptd,HDC,hdcTargetDev,HDC,hdcDraw,LPCRECTL,lprcBounds,LPCRECTL,lprcWBounds,void*,pfnContinue,ULONG_PTR,dwContinue) \
    ICOM_METHOD6 (HRESULT,GetColorSet,DWORD,dwDrawAspect,LONG,lindex,void*,pvAspect,DVTARGETDEVICE*,ptd,HDC,hicTargetDev,LOGPALETTE**,ppColorSet) \
    ICOM_METHOD4 (HRESULT,Freeze,DWORD,dwDrawAspect,LONG,lindex,void*,pvAspect,DWORD*,pdwFreeze) \
    ICOM_METHOD1 (HRESULT,Unfreeze,DWORD,dwFreeze) \
    ICOM_METHOD3 (HRESULT,SetAdvise,DWORD,aspects,DWORD,advf,IAdviseSink*,pAdvSink) \
    ICOM_METHOD3 (HRESULT,GetAdvise,DWORD*,pAspects,DWORD*,pAdvf,IAdviseSink**,ppAdvSink)

/*** IUnknown methods ***/
#define IViewObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IViewObject_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IViewObject_Release(p) (p)->lpVtbl->Release(p)
/*** IViewObject methods ***/
#define IViewObject_Draw(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Draw(p,a,b,c,d,e,f,g,h,i,j)
#define IViewObject_GetColorSet(p,a,b,c,d,e,f) (p)->lpVtbl->GetColorSet(p,a,b,c,d,e,f)
#define IViewObject_Freeze(p,a,b,c,d) (p)->lpVtbl->Freeze(p,a,b,c,d)
#define IViewObject_Unfreeze(p,a) (p)->lpVtbl->Unfreeze(p,a)
#define IViewObject_SetAdvise(p,a,b,c) (p)->lpVtbl->SetAdvise(p,a,b,c)
#define IViewObject_GetAdvise(p,a,b,c) (p)->lpVtbl->GetAdvise(p,a,b,c)

#endif

HRESULT CALLBACK IViewObject_RemoteDraw_Proxy(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    ULONG_PTR pvAspect,
    DVTARGETDEVICE* ptd,
    ULONG_PTR hdcTargetDev,
    ULONG_PTR hdcDraw,
    LPCRECTL lprcBounds,
    LPCRECTL lprcWBounds,
    IContinue* pContinue);
void __RPC_STUB IViewObject_RemoteDraw_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IViewObject_Draw_Proxy(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    void* pvAspect,
    DVTARGETDEVICE* ptd,
    HDC hdcTargetDev,
    HDC hdcDraw,
    LPCRECTL lprcBounds,
    LPCRECTL lprcWBounds,
    BOOL (STDMETHODCALLTYPE *pfnContinue)(
        ULONG_PTR dwContinue),
    ULONG_PTR dwContinue);
HRESULT __RPC_STUB IViewObject_Draw_Stub(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    ULONG_PTR pvAspect,
    DVTARGETDEVICE* ptd,
    ULONG_PTR hdcTargetDev,
    ULONG_PTR hdcDraw,
    LPCRECTL lprcBounds,
    LPCRECTL lprcWBounds,
    IContinue* pContinue);
HRESULT CALLBACK IViewObject_RemoteGetColorSet_Proxy(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    ULONG_PTR pvAspect,
    DVTARGETDEVICE* ptd,
    ULONG_PTR hicTargetDev,
    LOGPALETTE** ppColorSet);
void __RPC_STUB IViewObject_RemoteGetColorSet_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IViewObject_GetColorSet_Proxy(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    void* pvAspect,
    DVTARGETDEVICE* ptd,
    HDC hicTargetDev,
    LOGPALETTE** ppColorSet);
HRESULT __RPC_STUB IViewObject_GetColorSet_Stub(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    ULONG_PTR pvAspect,
    DVTARGETDEVICE* ptd,
    ULONG_PTR hicTargetDev,
    LOGPALETTE** ppColorSet);
HRESULT CALLBACK IViewObject_RemoteFreeze_Proxy(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    ULONG_PTR pvAspect,
    DWORD* pdwFreeze);
void __RPC_STUB IViewObject_RemoteFreeze_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IViewObject_Freeze_Proxy(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    void* pvAspect,
    DWORD* pdwFreeze);
HRESULT __RPC_STUB IViewObject_Freeze_Stub(
    IViewObject* This,
    DWORD dwDrawAspect,
    LONG lindex,
    ULONG_PTR pvAspect,
    DWORD* pdwFreeze);
HRESULT CALLBACK IViewObject_Unfreeze_Proxy(
    IViewObject* This,
    DWORD dwFreeze);
void __RPC_STUB IViewObject_Unfreeze_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IViewObject_SetAdvise_Proxy(
    IViewObject* This,
    DWORD aspects,
    DWORD advf,
    IAdviseSink* pAdvSink);
void __RPC_STUB IViewObject_SetAdvise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IViewObject_RemoteGetAdvise_Proxy(
    IViewObject* This,
    DWORD* pAspects,
    DWORD* pAdvf,
    IAdviseSink** ppAdvSink);
void __RPC_STUB IViewObject_RemoteGetAdvise_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IViewObject_GetAdvise_Proxy(
    IViewObject* This,
    DWORD* pAspects,
    DWORD* pAdvf,
    IAdviseSink** ppAdvSink);
HRESULT __RPC_STUB IViewObject_GetAdvise_Stub(
    IViewObject* This,
    DWORD* pAspects,
    DWORD* pAdvf,
    IAdviseSink** ppAdvSink);

#endif  /* __IViewObject_INTERFACE_DEFINED__ */

typedef struct IViewObject2 IViewObject2;
typedef IViewObject2 *LPVIEWOBJECT2;

/*****************************************************************************
 * IViewObject2 interface
 */
#ifndef __IViewObject2_INTERFACE_DEFINED__
#define __IViewObject2_INTERFACE_DEFINED__

DEFINE_GUID(IID_IViewObject2, 0x00000127, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IViewObject2: IViewObject {

    virtual HRESULT CALLBACK GetExtent(
        DWORD dwDrawAspect,
        LONG lindex,
        DVTARGETDEVICE* ptd,
        LPSIZEL lpsizel) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IViewObject2Vtbl IViewObject2Vtbl;
struct IViewObject2 {
    const IViewObject2Vtbl* lpVtbl;
};
struct IViewObject2Vtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IViewObject methods ***/
    HRESULT (CALLBACK *Draw)(
        IViewObject2* This,
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DVTARGETDEVICE* ptd,
        HDC hdcTargetDev,
        HDC hdcDraw,
        LPCRECTL lprcBounds,
        LPCRECTL lprcWBounds,
        BOOL (STDMETHODCALLTYPE *pfnContinue)(
            ULONG_PTR dwContinue),
        ULONG_PTR dwContinue);

    HRESULT (CALLBACK *GetColorSet)(
        IViewObject2* This,
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DVTARGETDEVICE* ptd,
        HDC hicTargetDev,
        LOGPALETTE** ppColorSet);

    HRESULT (CALLBACK *Freeze)(
        IViewObject2* This,
        DWORD dwDrawAspect,
        LONG lindex,
        void* pvAspect,
        DWORD* pdwFreeze);

    HRESULT (CALLBACK *Unfreeze)(
        IViewObject2* This,
        DWORD dwFreeze);

    HRESULT (CALLBACK *SetAdvise)(
        IViewObject2* This,
        DWORD aspects,
        DWORD advf,
        IAdviseSink* pAdvSink);

    HRESULT (CALLBACK *GetAdvise)(
        IViewObject2* This,
        DWORD* pAspects,
        DWORD* pAdvf,
        IAdviseSink** ppAdvSink);

    /*** IViewObject2 methods ***/
    HRESULT (CALLBACK *GetExtent)(
        IViewObject2* This,
        DWORD dwDrawAspect,
        LONG lindex,
        DVTARGETDEVICE* ptd,
        LPSIZEL lpsizel);

};

#define IViewObject2_IMETHODS \
    IViewObject_IMETHODS \
    ICOM_METHOD4 (HRESULT,GetExtent,DWORD,dwDrawAspect,LONG,lindex,DVTARGETDEVICE*,ptd,LPSIZEL,lpsizel)

/*** IUnknown methods ***/
#define IViewObject2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IViewObject2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IViewObject2_Release(p) (p)->lpVtbl->Release(p)
/*** IViewObject methods ***/
#define IViewObject2_Draw(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Draw(p,a,b,c,d,e,f,g,h,i,j)
#define IViewObject2_GetColorSet(p,a,b,c,d,e,f) (p)->lpVtbl->GetColorSet(p,a,b,c,d,e,f)
#define IViewObject2_Freeze(p,a,b,c,d) (p)->lpVtbl->Freeze(p,a,b,c,d)
#define IViewObject2_Unfreeze(p,a) (p)->lpVtbl->Unfreeze(p,a)
#define IViewObject2_SetAdvise(p,a,b,c) (p)->lpVtbl->SetAdvise(p,a,b,c)
#define IViewObject2_GetAdvise(p,a,b,c) (p)->lpVtbl->GetAdvise(p,a,b,c)
/*** IViewObject2 methods ***/
#define IViewObject2_GetExtent(p,a,b,c,d) (p)->lpVtbl->GetExtent(p,a,b,c,d)

#endif

HRESULT CALLBACK IViewObject2_GetExtent_Proxy(
    IViewObject2* This,
    DWORD dwDrawAspect,
    LONG lindex,
    DVTARGETDEVICE* ptd,
    LPSIZEL lpsizel);
void __RPC_STUB IViewObject2_GetExtent_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IViewObject2_INTERFACE_DEFINED__ */

typedef struct IDropSource IDropSource;
typedef IDropSource *LPDROPSOURCE;

/*****************************************************************************
 * IDropSource interface
 */
#ifndef __IDropSource_INTERFACE_DEFINED__
#define __IDropSource_INTERFACE_DEFINED__

DEFINE_GUID(IID_IDropSource, 0x00000121, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDropSource: IUnknown {

    virtual HRESULT CALLBACK QueryContinueDrag(
        BOOL fEscapePressed,
        DWORD grfKeyState) = 0;

    virtual HRESULT CALLBACK GiveFeedback(
        DWORD dwEffect) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IDropSourceVtbl IDropSourceVtbl;
struct IDropSource {
    const IDropSourceVtbl* lpVtbl;
};
struct IDropSourceVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IDropSource methods ***/
    HRESULT (CALLBACK *QueryContinueDrag)(
        IDropSource* This,
        BOOL fEscapePressed,
        DWORD grfKeyState);

    HRESULT (CALLBACK *GiveFeedback)(
        IDropSource* This,
        DWORD dwEffect);

};

#define IDropSource_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD2 (HRESULT,QueryContinueDrag,BOOL,fEscapePressed,DWORD,grfKeyState) \
    ICOM_METHOD1 (HRESULT,GiveFeedback,DWORD,dwEffect)

/*** IUnknown methods ***/
#define IDropSource_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDropSource_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDropSource_Release(p) (p)->lpVtbl->Release(p)
/*** IDropSource methods ***/
#define IDropSource_QueryContinueDrag(p,a,b) (p)->lpVtbl->QueryContinueDrag(p,a,b)
#define IDropSource_GiveFeedback(p,a) (p)->lpVtbl->GiveFeedback(p,a)

#endif

HRESULT CALLBACK IDropSource_QueryContinueDrag_Proxy(
    IDropSource* This,
    BOOL fEscapePressed,
    DWORD grfKeyState);
void __RPC_STUB IDropSource_QueryContinueDrag_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IDropSource_GiveFeedback_Proxy(
    IDropSource* This,
    DWORD dwEffect);
void __RPC_STUB IDropSource_GiveFeedback_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IDropSource_INTERFACE_DEFINED__ */

typedef struct IDropTarget IDropTarget;
typedef IDropTarget *LPDROPTARGET;

#define MK_ALT (0x20)

#define DROPEFFECT_NONE (0)

#define DROPEFFECT_COPY (1)

#define DROPEFFECT_MOVE (2)

#define DROPEFFECT_LINK (4)

#define DROPEFFECT_SCROLL (0x7fffffff)

#define DD_DEFSCROLLINSET (11)

#define DD_DEFSCROLLDELAY (50)

#define DD_DEFSCROLLINTERVAL (50)

#define DD_DEFDRAGDELAY (200)

#define DD_DEFDRAGMINDIST (2)

/*****************************************************************************
 * IDropTarget interface
 */
#ifndef __IDropTarget_INTERFACE_DEFINED__
#define __IDropTarget_INTERFACE_DEFINED__

DEFINE_GUID(IID_IDropTarget, 0x00000122, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDropTarget: IUnknown {

    virtual HRESULT CALLBACK DragEnter(
        IDataObject* pDataObj,
        DWORD grfKeyState,
        POINTL pt,
        DWORD* pdwEffect) = 0;

    virtual HRESULT CALLBACK DragOver(
        DWORD grfKeyState,
        POINTL pt,
        DWORD* pdwEffect) = 0;

    virtual HRESULT CALLBACK DragLeave(
        ) = 0;

    virtual HRESULT CALLBACK Drop(
        IDataObject* pDataObj,
        DWORD grfKeyState,
        POINTL pt,
        DWORD* pdwEffect) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IDropTargetVtbl IDropTargetVtbl;
struct IDropTarget {
    const IDropTargetVtbl* lpVtbl;
};
struct IDropTargetVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IDropTarget methods ***/
    HRESULT (CALLBACK *DragEnter)(
        IDropTarget* This,
        IDataObject* pDataObj,
        DWORD grfKeyState,
        POINTL pt,
        DWORD* pdwEffect);

    HRESULT (CALLBACK *DragOver)(
        IDropTarget* This,
        DWORD grfKeyState,
        POINTL pt,
        DWORD* pdwEffect);

    HRESULT (CALLBACK *DragLeave)(
        IDropTarget* This);

    HRESULT (CALLBACK *Drop)(
        IDropTarget* This,
        IDataObject* pDataObj,
        DWORD grfKeyState,
        POINTL pt,
        DWORD* pdwEffect);

};

#define IDropTarget_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD4 (HRESULT,DragEnter,IDataObject*,pDataObj,DWORD,grfKeyState,POINTL,pt,DWORD*,pdwEffect) \
    ICOM_METHOD3 (HRESULT,DragOver,DWORD,grfKeyState,POINTL,pt,DWORD*,pdwEffect) \
    ICOM_METHOD  (HRESULT,DragLeave) \
    ICOM_METHOD4 (HRESULT,Drop,IDataObject*,pDataObj,DWORD,grfKeyState,POINTL,pt,DWORD*,pdwEffect)

/*** IUnknown methods ***/
#define IDropTarget_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDropTarget_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDropTarget_Release(p) (p)->lpVtbl->Release(p)
/*** IDropTarget methods ***/
#define IDropTarget_DragEnter(p,a,b,c,d) (p)->lpVtbl->DragEnter(p,a,b,c,d)
#define IDropTarget_DragOver(p,a,b,c) (p)->lpVtbl->DragOver(p,a,b,c)
#define IDropTarget_DragLeave(p) (p)->lpVtbl->DragLeave(p)
#define IDropTarget_Drop(p,a,b,c,d) (p)->lpVtbl->Drop(p,a,b,c,d)

#endif

HRESULT CALLBACK IDropTarget_DragEnter_Proxy(
    IDropTarget* This,
    IDataObject* pDataObj,
    DWORD grfKeyState,
    POINTL pt,
    DWORD* pdwEffect);
void __RPC_STUB IDropTarget_DragEnter_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IDropTarget_DragOver_Proxy(
    IDropTarget* This,
    DWORD grfKeyState,
    POINTL pt,
    DWORD* pdwEffect);
void __RPC_STUB IDropTarget_DragOver_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IDropTarget_DragLeave_Proxy(
    IDropTarget* This);
void __RPC_STUB IDropTarget_DragLeave_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IDropTarget_Drop_Proxy(
    IDropTarget* This,
    IDataObject* pDataObj,
    DWORD grfKeyState,
    POINTL pt,
    DWORD* pdwEffect);
void __RPC_STUB IDropTarget_Drop_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IDropTarget_INTERFACE_DEFINED__ */

typedef IEnumOLEVERB *LPENUMOLEVERB;

typedef struct tagOLEVERB {
    LONG lVerb;
    LPOLESTR lpszVerbName;
    DWORD fuFlags;
    DWORD grfAttribs;
} OLEVERB, *LPOLEVERB;

typedef enum tagOLEVERBATTRIB {
    OLEVERBATTRIB_NEVERDIRTIES = 1,
    OLEVERBATTRIB_ONCONTAINERMENU = 2
} OLEVERBATTRIB;

/*****************************************************************************
 * IEnumOLEVERB interface
 */
#ifndef __IEnumOLEVERB_INTERFACE_DEFINED__
#define __IEnumOLEVERB_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumOLEVERB, 0x00000104, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IEnumOLEVERB: IUnknown {

    virtual HRESULT CALLBACK Next(
        ULONG celt,
        LPOLEVERB rgelt,
        ULONG* pceltFetched) = 0;

    virtual HRESULT CALLBACK Skip(
        ULONG celt) = 0;

    virtual HRESULT CALLBACK Reset(
        ) = 0;

    virtual HRESULT CALLBACK Clone(
        IEnumOLEVERB** ppenum) = 0;

} ICOM_COM_INTERFACE_ATTRIBUTE;
#else
typedef struct IEnumOLEVERBVtbl IEnumOLEVERBVtbl;
struct IEnumOLEVERB {
    const IEnumOLEVERBVtbl* lpVtbl;
};
struct IEnumOLEVERBVtbl {
    ICOM_MSVTABLE_COMPAT_FIELDS

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

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

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

    /*** IEnumOLEVERB methods ***/
    HRESULT (CALLBACK *Next)(
        IEnumOLEVERB* This,
        ULONG celt,
        LPOLEVERB rgelt,
        ULONG* pceltFetched);

    HRESULT (CALLBACK *Skip)(
        IEnumOLEVERB* This,
        ULONG celt);

    HRESULT (CALLBACK *Reset)(
        IEnumOLEVERB* This);

    HRESULT (CALLBACK *Clone)(
        IEnumOLEVERB* This,
        IEnumOLEVERB** ppenum);

};

#define IEnumOLEVERB_IMETHODS \
    IUnknown_IMETHODS \
    ICOM_METHOD3 (HRESULT,Next,ULONG,celt,LPOLEVERB,rgelt,ULONG*,pceltFetched) \
    ICOM_METHOD1 (HRESULT,Skip,ULONG,celt) \
    ICOM_METHOD  (HRESULT,Reset) \
    ICOM_METHOD1 (HRESULT,Clone,IEnumOLEVERB**,ppenum)

/*** IUnknown methods ***/
#define IEnumOLEVERB_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IEnumOLEVERB_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IEnumOLEVERB_Release(p) (p)->lpVtbl->Release(p)
/*** IEnumOLEVERB methods ***/
#define IEnumOLEVERB_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
#define IEnumOLEVERB_Skip(p,a) (p)->lpVtbl->Skip(p,a)
#define IEnumOLEVERB_Reset(p) (p)->lpVtbl->Reset(p)
#define IEnumOLEVERB_Clone(p,a) (p)->lpVtbl->Clone(p,a)

#endif

HRESULT CALLBACK IEnumOLEVERB_RemoteNext_Proxy(
    IEnumOLEVERB* This,
    ULONG celt,
    LPOLEVERB rgelt,
    ULONG* pceltFetched);
void __RPC_STUB IEnumOLEVERB_RemoteNext_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IEnumOLEVERB_Next_Proxy(
    IEnumOLEVERB* This,
    ULONG celt,
    LPOLEVERB rgelt,
    ULONG* pceltFetched);
HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub(
    IEnumOLEVERB* This,
    ULONG celt,
    LPOLEVERB rgelt,
    ULONG* pceltFetched);
HRESULT CALLBACK IEnumOLEVERB_Skip_Proxy(
    IEnumOLEVERB* This,
    ULONG celt);
void __RPC_STUB IEnumOLEVERB_Skip_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IEnumOLEVERB_Reset_Proxy(
    IEnumOLEVERB* This);
void __RPC_STUB IEnumOLEVERB_Reset_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT CALLBACK IEnumOLEVERB_Clone_Proxy(
    IEnumOLEVERB* This,
    IEnumOLEVERB** ppenum);
void __RPC_STUB IEnumOLEVERB_Clone_Stub(
    struct IRpcStubBuffer* This,
    struct IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumOLEVERB_INTERFACE_DEFINED__ */

#ifdef __cplusplus
}
#endif
#endif /* __WIDL_OLEIDL_H */
