/*** Autogenerated by WIDL 1.3.12 from msctf.idl - Do not edit ***/

#include <rpc.h>
#include <rpcndr.h>

#ifndef __WIDL_MSCTF_H
#define __WIDL_MSCTF_H

/* Forward declarations */

#ifndef __ITfThreadMgr_FWD_DEFINED__
#define __ITfThreadMgr_FWD_DEFINED__
typedef interface ITfThreadMgr ITfThreadMgr;
#endif

#ifndef __ITfCompositionView_FWD_DEFINED__
#define __ITfCompositionView_FWD_DEFINED__
typedef interface ITfCompositionView ITfCompositionView;
#endif

#ifndef __ITfDocumentMgr_FWD_DEFINED__
#define __ITfDocumentMgr_FWD_DEFINED__
typedef interface ITfDocumentMgr ITfDocumentMgr;
#endif

#ifndef __ITfContext_FWD_DEFINED__
#define __ITfContext_FWD_DEFINED__
typedef interface ITfContext ITfContext;
#endif

#ifndef __ITfSource_FWD_DEFINED__
#define __ITfSource_FWD_DEFINED__
typedef interface ITfSource ITfSource;
#endif

#ifndef __ITfInputProcessorProfiles_FWD_DEFINED__
#define __ITfInputProcessorProfiles_FWD_DEFINED__
typedef interface ITfInputProcessorProfiles ITfInputProcessorProfiles;
#endif

#ifndef __ITfDisplayAttributeInfo_FWD_DEFINED__
#define __ITfDisplayAttributeInfo_FWD_DEFINED__
typedef interface ITfDisplayAttributeInfo ITfDisplayAttributeInfo;
#endif

#ifndef __IEnumTfDisplayAttributeInfo_FWD_DEFINED__
#define __IEnumTfDisplayAttributeInfo_FWD_DEFINED__
typedef interface IEnumTfDisplayAttributeInfo IEnumTfDisplayAttributeInfo;
#endif

#ifndef __ITfDisplayAttributeMgr_FWD_DEFINED__
#define __ITfDisplayAttributeMgr_FWD_DEFINED__
typedef interface ITfDisplayAttributeMgr ITfDisplayAttributeMgr;
#endif

#ifndef __ITfCategoryMgr_FWD_DEFINED__
#define __ITfCategoryMgr_FWD_DEFINED__
typedef interface ITfCategoryMgr ITfCategoryMgr;
#endif

#ifndef __ITfTextEditSink_FWD_DEFINED__
#define __ITfTextEditSink_FWD_DEFINED__
typedef interface ITfTextEditSink ITfTextEditSink;
#endif

#ifndef __ITfContextOwnerCompositionSink_FWD_DEFINED__
#define __ITfContextOwnerCompositionSink_FWD_DEFINED__
typedef interface ITfContextOwnerCompositionSink ITfContextOwnerCompositionSink;
#endif

#ifndef __IEnumTfLanguageProfiles_FWD_DEFINED__
#define __IEnumTfLanguageProfiles_FWD_DEFINED__
typedef interface IEnumTfLanguageProfiles IEnumTfLanguageProfiles;
#endif

#ifndef __ITfTextInputProcessor_FWD_DEFINED__
#define __ITfTextInputProcessor_FWD_DEFINED__
typedef interface ITfTextInputProcessor ITfTextInputProcessor;
#endif

#ifndef __ITfThreadMgrEventSink_FWD_DEFINED__
#define __ITfThreadMgrEventSink_FWD_DEFINED__
typedef interface ITfThreadMgrEventSink ITfThreadMgrEventSink;
#endif

#ifndef __ITfKeystrokeMgr_FWD_DEFINED__
#define __ITfKeystrokeMgr_FWD_DEFINED__
typedef interface ITfKeystrokeMgr ITfKeystrokeMgr;
#endif

#ifndef __ITfKeyEventSink_FWD_DEFINED__
#define __ITfKeyEventSink_FWD_DEFINED__
typedef interface ITfKeyEventSink ITfKeyEventSink;
#endif

#ifndef __ITfMessagePump_FWD_DEFINED__
#define __ITfMessagePump_FWD_DEFINED__
typedef interface ITfMessagePump ITfMessagePump;
#endif

#ifndef __ITfClientId_FWD_DEFINED__
#define __ITfClientId_FWD_DEFINED__
typedef interface ITfClientId ITfClientId;
#endif

#ifndef __ITfLanguageProfileNotifySink_FWD_DEFINED__
#define __ITfLanguageProfileNotifySink_FWD_DEFINED__
typedef interface ITfLanguageProfileNotifySink ITfLanguageProfileNotifySink;
#endif

#ifndef __ITfEditSession_FWD_DEFINED__
#define __ITfEditSession_FWD_DEFINED__
typedef interface ITfEditSession ITfEditSession;
#endif

#ifndef __ITfRange_FWD_DEFINED__
#define __ITfRange_FWD_DEFINED__
typedef interface ITfRange ITfRange;
#endif

#ifndef __ITfRangeACP_FWD_DEFINED__
#define __ITfRangeACP_FWD_DEFINED__
typedef interface ITfRangeACP ITfRangeACP;
#endif

#ifndef __ITfInsertAtSelection_FWD_DEFINED__
#define __ITfInsertAtSelection_FWD_DEFINED__
typedef interface ITfInsertAtSelection ITfInsertAtSelection;
#endif

#ifndef __ITfPropertyStore_FWD_DEFINED__
#define __ITfPropertyStore_FWD_DEFINED__
typedef interface ITfPropertyStore ITfPropertyStore;
#endif

#ifndef __IEnumTfRanges_FWD_DEFINED__
#define __IEnumTfRanges_FWD_DEFINED__
typedef interface IEnumTfRanges IEnumTfRanges;
#endif

#ifndef __IEnumITfCompositionView_FWD_DEFINED__
#define __IEnumITfCompositionView_FWD_DEFINED__
typedef interface IEnumITfCompositionView IEnumITfCompositionView;
#endif

#ifndef __ITfComposition_FWD_DEFINED__
#define __ITfComposition_FWD_DEFINED__
typedef interface ITfComposition ITfComposition;
#endif

#ifndef __ITfCompositionSink_FWD_DEFINED__
#define __ITfCompositionSink_FWD_DEFINED__
typedef interface ITfCompositionSink ITfCompositionSink;
#endif

#ifndef __ITfContextComposition_FWD_DEFINED__
#define __ITfContextComposition_FWD_DEFINED__
typedef interface ITfContextComposition ITfContextComposition;
#endif

#ifndef __ITfContextOwnerCompositionServices_FWD_DEFINED__
#define __ITfContextOwnerCompositionServices_FWD_DEFINED__
typedef interface ITfContextOwnerCompositionServices ITfContextOwnerCompositionServices;
#endif

#ifndef __ITfReadOnlyProperty_FWD_DEFINED__
#define __ITfReadOnlyProperty_FWD_DEFINED__
typedef interface ITfReadOnlyProperty ITfReadOnlyProperty;
#endif

#ifndef __ITfProperty_FWD_DEFINED__
#define __ITfProperty_FWD_DEFINED__
typedef interface ITfProperty ITfProperty;
#endif

#ifndef __ITfCompartment_FWD_DEFINED__
#define __ITfCompartment_FWD_DEFINED__
typedef interface ITfCompartment ITfCompartment;
#endif

#ifndef __ITfCompartmentMgr_FWD_DEFINED__
#define __ITfCompartmentMgr_FWD_DEFINED__
typedef interface ITfCompartmentMgr ITfCompartmentMgr;
#endif

#ifndef __ITfCompartmentEventSink_FWD_DEFINED__
#define __ITfCompartmentEventSink_FWD_DEFINED__
typedef interface ITfCompartmentEventSink ITfCompartmentEventSink;
#endif

#ifndef __IEnumTfContexts_FWD_DEFINED__
#define __IEnumTfContexts_FWD_DEFINED__
typedef interface IEnumTfContexts IEnumTfContexts;
#endif

#ifndef __IEnumTfDocumentMgrs_FWD_DEFINED__
#define __IEnumTfDocumentMgrs_FWD_DEFINED__
typedef interface IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
#endif

#ifndef __ITfSourceSingle_FWD_DEFINED__
#define __ITfSourceSingle_FWD_DEFINED__
typedef interface ITfSourceSingle ITfSourceSingle;
#endif

#ifndef __ITfThreadFocusSink_FWD_DEFINED__
#define __ITfThreadFocusSink_FWD_DEFINED__
typedef interface ITfThreadFocusSink ITfThreadFocusSink;
#endif

/* Headers for imported files */

#include <oaidl.h>
#include <comcat.h>
#include <textstor.h>
#include <ctfutb.h>

#ifdef __cplusplus
extern "C" {
#endif

#include <winuser.h>
#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)
#define TF_E_DISCONNECTED    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0504)
#define TF_E_ALREADY_EXISTS  MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)
#define TF_E_NOLOCK          MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)
HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);
HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);
HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);
HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm);
EXTERN_C const GUID GUID_PROP_TEXTOWNER;
DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);
EXTERN_C const GUID GUID_PROP_LANGID;
EXTERN_C const GUID GUID_PROP_READING;
EXTERN_C const GUID GUID_PROP_COMPOSING;
EXTERN_C const CLSID CLSID_TF_ThreadMgr;
EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;
EXTERN_C const CLSID CLSID_TF_LangBarMgr;
EXTERN_C const CLSID CLSID_TF_CategoryMgr;
EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;
EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;
EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;
EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;
EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;
EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;
EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;
EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;
EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;
EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;
EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;
EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;
EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;
EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;
typedef DWORD TfEditCookie;
typedef DWORD TfClientId;
typedef DWORD TfGuidAtom;
#define TF_MOD_ALT                   0x0001
#define TF_MOD_CONTROL               0x0002
#define TF_MOD_SHIFT                 0x0004
#define TF_MOD_RALT                  0x0008
#define TF_MOD_RCONTROL              0x0010
#define TF_MOD_RSHIFT                0x0020
#define TF_MOD_LALT                  0x0040
#define TF_MOD_LCONTROL              0x0080
#define TF_MOD_LSHIFT                0x0100
#define TF_MOD_ON_KEYUP              0x0200
#define TF_MOD_IGNORE_ALL_MODIFIER   0x0400
#ifndef __ITfDocumentMgr_FWD_DEFINED__
#define __ITfDocumentMgr_FWD_DEFINED__
typedef interface ITfDocumentMgr ITfDocumentMgr;
#endif

#ifndef __ITfContext_FWD_DEFINED__
#define __ITfContext_FWD_DEFINED__
typedef interface ITfContext ITfContext;
#endif

#ifndef __IEnumTfDocumentMgrs_FWD_DEFINED__
#define __IEnumTfDocumentMgrs_FWD_DEFINED__
typedef interface IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
#endif

#ifndef __IEnumTfContexts_FWD_DEFINED__
#define __IEnumTfContexts_FWD_DEFINED__
typedef interface IEnumTfContexts IEnumTfContexts;
#endif

#ifndef __ITfFunctionProvider_FWD_DEFINED__
#define __ITfFunctionProvider_FWD_DEFINED__
typedef interface ITfFunctionProvider ITfFunctionProvider;
#endif

#ifndef __IEnumTfFunctionProviders_FWD_DEFINED__
#define __IEnumTfFunctionProviders_FWD_DEFINED__
typedef interface IEnumTfFunctionProviders IEnumTfFunctionProviders;
#endif

#ifndef __ITfCompartmentMgr_FWD_DEFINED__
#define __ITfCompartmentMgr_FWD_DEFINED__
typedef interface ITfCompartmentMgr ITfCompartmentMgr;
#endif

#ifndef __ITfEditSession_FWD_DEFINED__
#define __ITfEditSession_FWD_DEFINED__
typedef interface ITfEditSession ITfEditSession;
#endif

#ifndef __ITfRange_FWD_DEFINED__
#define __ITfRange_FWD_DEFINED__
typedef interface ITfRange ITfRange;
#endif

#ifndef __ITfContextView_FWD_DEFINED__
#define __ITfContextView_FWD_DEFINED__
typedef interface ITfContextView ITfContextView;
#endif

#ifndef __IEnumTfContextViews_FWD_DEFINED__
#define __IEnumTfContextViews_FWD_DEFINED__
typedef interface IEnumTfContextViews IEnumTfContextViews;
#endif

#ifndef __ITfProperty_FWD_DEFINED__
#define __ITfProperty_FWD_DEFINED__
typedef interface ITfProperty ITfProperty;
#endif

#ifndef __ITfReadOnlyProperty_FWD_DEFINED__
#define __ITfReadOnlyProperty_FWD_DEFINED__
typedef interface ITfReadOnlyProperty ITfReadOnlyProperty;
#endif

#ifndef __IEnumTfProperties_FWD_DEFINED__
#define __IEnumTfProperties_FWD_DEFINED__
typedef interface IEnumTfProperties IEnumTfProperties;
#endif

#ifndef __ITfRangeBackup_FWD_DEFINED__
#define __ITfRangeBackup_FWD_DEFINED__
typedef interface ITfRangeBackup ITfRangeBackup;
#endif

#ifndef __IEnumTfLanguageProfiles_FWD_DEFINED__
#define __IEnumTfLanguageProfiles_FWD_DEFINED__
typedef interface IEnumTfLanguageProfiles IEnumTfLanguageProfiles;
#endif

#ifndef __ITfEditRecord_FWD_DEFINED__
#define __ITfEditRecord_FWD_DEFINED__
typedef interface ITfEditRecord ITfEditRecord;
#endif

#ifndef __ITfCompositionView_FWD_DEFINED__
#define __ITfCompositionView_FWD_DEFINED__
typedef interface ITfCompositionView ITfCompositionView;
#endif

#ifndef __ITfKeyEventSink_FWD_DEFINED__
#define __ITfKeyEventSink_FWD_DEFINED__
typedef interface ITfKeyEventSink ITfKeyEventSink;
#endif

typedef struct TF_LANGUAGEPROFILE {
    CLSID clsid;
    LANGID langid;
    GUID catid;
    BOOL fActive;
    GUID guidProfile;
} TF_LANGUAGEPROFILE;
typedef struct TF_PRESERVEDKEY {
    UINT uVKey;
    UINT uModifiers;
} TF_PRESERVEDKEY;
typedef enum __WIDL_msctf_generated_name_00000000 {
    TF_ANCHOR_START = 0,
    TF_ANCHOR_END = 1
} TfAnchor;
/*****************************************************************************
 * ITfThreadMgr interface
 */
#ifndef __ITfThreadMgr_INTERFACE_DEFINED__
#define __ITfThreadMgr_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfThreadMgr, 0xaa80e801, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfThreadMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Activate(
        TfClientId *ptid) = 0;

    virtual HRESULT STDMETHODCALLTYPE Deactivate(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDocumentMgr(
        ITfDocumentMgr **ppdim) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumDocumentMgrs(
        IEnumTfDocumentMgrs **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFocus(
        ITfDocumentMgr **ppdimFocus) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFocus(
        ITfDocumentMgr *pdimFocus) = 0;

    virtual HRESULT STDMETHODCALLTYPE AssociateFocus(
        HWND hwnd,
        ITfDocumentMgr *pdimNew,
        ITfDocumentMgr **ppdimPrev) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsThreadFocus(
        BOOL *pfThreadFocus) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFunctionProvider(
        REFCLSID clsid,
        ITfFunctionProvider **ppFuncProv) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumFunctionProviders(
        IEnumTfFunctionProviders **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGlobalCompartment(
        ITfCompartmentMgr **ppCompMgr) = 0;

};
#else
typedef struct ITfThreadMgrVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfThreadMgr* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfThreadMgr* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfThreadMgr* This);

    /*** ITfThreadMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *Activate)(
        ITfThreadMgr* This,
        TfClientId *ptid);

    HRESULT (STDMETHODCALLTYPE *Deactivate)(
        ITfThreadMgr* This);

    HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(
        ITfThreadMgr* This,
        ITfDocumentMgr **ppdim);

    HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(
        ITfThreadMgr* This,
        IEnumTfDocumentMgrs **ppEnum);

    HRESULT (STDMETHODCALLTYPE *GetFocus)(
        ITfThreadMgr* This,
        ITfDocumentMgr **ppdimFocus);

    HRESULT (STDMETHODCALLTYPE *SetFocus)(
        ITfThreadMgr* This,
        ITfDocumentMgr *pdimFocus);

    HRESULT (STDMETHODCALLTYPE *AssociateFocus)(
        ITfThreadMgr* This,
        HWND hwnd,
        ITfDocumentMgr *pdimNew,
        ITfDocumentMgr **ppdimPrev);

    HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(
        ITfThreadMgr* This,
        BOOL *pfThreadFocus);

    HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(
        ITfThreadMgr* This,
        REFCLSID clsid,
        ITfFunctionProvider **ppFuncProv);

    HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(
        ITfThreadMgr* This,
        IEnumTfFunctionProviders **ppEnum);

    HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(
        ITfThreadMgr* This,
        ITfCompartmentMgr **ppCompMgr);

    END_INTERFACE
} ITfThreadMgrVtbl;
interface ITfThreadMgr {
    CONST_VTBL ITfThreadMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfThreadMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfThreadMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfThreadMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfThreadMgr methods ***/
#define ITfThreadMgr_Activate(This,ptid) (This)->lpVtbl->Activate(This,ptid)
#define ITfThreadMgr_Deactivate(This) (This)->lpVtbl->Deactivate(This)
#define ITfThreadMgr_CreateDocumentMgr(This,ppdim) (This)->lpVtbl->CreateDocumentMgr(This,ppdim)
#define ITfThreadMgr_EnumDocumentMgrs(This,ppEnum) (This)->lpVtbl->EnumDocumentMgrs(This,ppEnum)
#define ITfThreadMgr_GetFocus(This,ppdimFocus) (This)->lpVtbl->GetFocus(This,ppdimFocus)
#define ITfThreadMgr_SetFocus(This,pdimFocus) (This)->lpVtbl->SetFocus(This,pdimFocus)
#define ITfThreadMgr_AssociateFocus(This,hwnd,pdimNew,ppdimPrev) (This)->lpVtbl->AssociateFocus(This,hwnd,pdimNew,ppdimPrev)
#define ITfThreadMgr_IsThreadFocus(This,pfThreadFocus) (This)->lpVtbl->IsThreadFocus(This,pfThreadFocus)
#define ITfThreadMgr_GetFunctionProvider(This,clsid,ppFuncProv) (This)->lpVtbl->GetFunctionProvider(This,clsid,ppFuncProv)
#define ITfThreadMgr_EnumFunctionProviders(This,ppEnum) (This)->lpVtbl->EnumFunctionProviders(This,ppEnum)
#define ITfThreadMgr_GetGlobalCompartment(This,ppCompMgr) (This)->lpVtbl->GetGlobalCompartment(This,ppCompMgr)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfThreadMgr_Activate_Proxy(
    ITfThreadMgr* This,
    TfClientId *ptid);
void __RPC_STUB ITfThreadMgr_Activate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_Deactivate_Proxy(
    ITfThreadMgr* This);
void __RPC_STUB ITfThreadMgr_Deactivate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_CreateDocumentMgr_Proxy(
    ITfThreadMgr* This,
    ITfDocumentMgr **ppdim);
void __RPC_STUB ITfThreadMgr_CreateDocumentMgr_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_EnumDocumentMgrs_Proxy(
    ITfThreadMgr* This,
    IEnumTfDocumentMgrs **ppEnum);
void __RPC_STUB ITfThreadMgr_EnumDocumentMgrs_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_GetFocus_Proxy(
    ITfThreadMgr* This,
    ITfDocumentMgr **ppdimFocus);
void __RPC_STUB ITfThreadMgr_GetFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_SetFocus_Proxy(
    ITfThreadMgr* This,
    ITfDocumentMgr *pdimFocus);
void __RPC_STUB ITfThreadMgr_SetFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_AssociateFocus_Proxy(
    ITfThreadMgr* This,
    HWND hwnd,
    ITfDocumentMgr *pdimNew,
    ITfDocumentMgr **ppdimPrev);
void __RPC_STUB ITfThreadMgr_AssociateFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_IsThreadFocus_Proxy(
    ITfThreadMgr* This,
    BOOL *pfThreadFocus);
void __RPC_STUB ITfThreadMgr_IsThreadFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_GetFunctionProvider_Proxy(
    ITfThreadMgr* This,
    REFCLSID clsid,
    ITfFunctionProvider **ppFuncProv);
void __RPC_STUB ITfThreadMgr_GetFunctionProvider_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_EnumFunctionProviders_Proxy(
    ITfThreadMgr* This,
    IEnumTfFunctionProviders **ppEnum);
void __RPC_STUB ITfThreadMgr_EnumFunctionProviders_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgr_GetGlobalCompartment_Proxy(
    ITfThreadMgr* This,
    ITfCompartmentMgr **ppCompMgr);
void __RPC_STUB ITfThreadMgr_GetGlobalCompartment_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfThreadMgr_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfCompositionView interface
 */
#ifndef __ITfCompositionView_INTERFACE_DEFINED__
#define __ITfCompositionView_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfCompositionView, 0xd7540241, 0xf9a1, 0x4364, 0xbe,0xfc, 0xdb,0xcd,0x2c,0x43,0x95,0xb7);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfCompositionView : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetOwnerClsid(
        CLSID *pclsid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRange(
        ITfRange **ppRange) = 0;

};
#else
typedef struct ITfCompositionViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfCompositionView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfCompositionView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfCompositionView* This);

    /*** ITfCompositionView methods ***/
    HRESULT (STDMETHODCALLTYPE *GetOwnerClsid)(
        ITfCompositionView* This,
        CLSID *pclsid);

    HRESULT (STDMETHODCALLTYPE *GetRange)(
        ITfCompositionView* This,
        ITfRange **ppRange);

    END_INTERFACE
} ITfCompositionViewVtbl;
interface ITfCompositionView {
    CONST_VTBL ITfCompositionViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfCompositionView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfCompositionView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfCompositionView_Release(This) (This)->lpVtbl->Release(This)
/*** ITfCompositionView methods ***/
#define ITfCompositionView_GetOwnerClsid(This,pclsid) (This)->lpVtbl->GetOwnerClsid(This,pclsid)
#define ITfCompositionView_GetRange(This,ppRange) (This)->lpVtbl->GetRange(This,ppRange)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfCompositionView_GetOwnerClsid_Proxy(
    ITfCompositionView* This,
    CLSID *pclsid);
void __RPC_STUB ITfCompositionView_GetOwnerClsid_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCompositionView_GetRange_Proxy(
    ITfCompositionView* This,
    ITfRange **ppRange);
void __RPC_STUB ITfCompositionView_GetRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfCompositionView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfDocumentMgr interface
 */
#ifndef __ITfDocumentMgr_INTERFACE_DEFINED__
#define __ITfDocumentMgr_INTERFACE_DEFINED__

#define TF_POPF_ALL (0x1)

DEFINE_GUID(IID_ITfDocumentMgr, 0xaa80e7f4, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfDocumentMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE CreateContext(
        TfClientId tidOwner,
        DWORD dwFlags,
        IUnknown *punk,
        ITfContext **ppic,
        TfEditCookie *pecTextStore) = 0;

    virtual HRESULT STDMETHODCALLTYPE Push(
        ITfContext *pic) = 0;

    virtual HRESULT STDMETHODCALLTYPE Pop(
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTop(
        ITfContext **ppic) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBase(
        ITfContext **ppic) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumContexts(
        IEnumTfContexts **ppEnum) = 0;

};
#else
typedef struct ITfDocumentMgrVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfDocumentMgr* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfDocumentMgr* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfDocumentMgr* This);

    /*** ITfDocumentMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *CreateContext)(
        ITfDocumentMgr* This,
        TfClientId tidOwner,
        DWORD dwFlags,
        IUnknown *punk,
        ITfContext **ppic,
        TfEditCookie *pecTextStore);

    HRESULT (STDMETHODCALLTYPE *Push)(
        ITfDocumentMgr* This,
        ITfContext *pic);

    HRESULT (STDMETHODCALLTYPE *Pop)(
        ITfDocumentMgr* This,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *GetTop)(
        ITfDocumentMgr* This,
        ITfContext **ppic);

    HRESULT (STDMETHODCALLTYPE *GetBase)(
        ITfDocumentMgr* This,
        ITfContext **ppic);

    HRESULT (STDMETHODCALLTYPE *EnumContexts)(
        ITfDocumentMgr* This,
        IEnumTfContexts **ppEnum);

    END_INTERFACE
} ITfDocumentMgrVtbl;
interface ITfDocumentMgr {
    CONST_VTBL ITfDocumentMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfDocumentMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfDocumentMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfDocumentMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfDocumentMgr methods ***/
#define ITfDocumentMgr_CreateContext(This,tidOwner,dwFlags,punk,ppic,pecTextStore) (This)->lpVtbl->CreateContext(This,tidOwner,dwFlags,punk,ppic,pecTextStore)
#define ITfDocumentMgr_Push(This,pic) (This)->lpVtbl->Push(This,pic)
#define ITfDocumentMgr_Pop(This,dwFlags) (This)->lpVtbl->Pop(This,dwFlags)
#define ITfDocumentMgr_GetTop(This,ppic) (This)->lpVtbl->GetTop(This,ppic)
#define ITfDocumentMgr_GetBase(This,ppic) (This)->lpVtbl->GetBase(This,ppic)
#define ITfDocumentMgr_EnumContexts(This,ppEnum) (This)->lpVtbl->EnumContexts(This,ppEnum)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfDocumentMgr_CreateContext_Proxy(
    ITfDocumentMgr* This,
    TfClientId tidOwner,
    DWORD dwFlags,
    IUnknown *punk,
    ITfContext **ppic,
    TfEditCookie *pecTextStore);
void __RPC_STUB ITfDocumentMgr_CreateContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDocumentMgr_Push_Proxy(
    ITfDocumentMgr* This,
    ITfContext *pic);
void __RPC_STUB ITfDocumentMgr_Push_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDocumentMgr_Pop_Proxy(
    ITfDocumentMgr* This,
    DWORD dwFlags);
void __RPC_STUB ITfDocumentMgr_Pop_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDocumentMgr_GetTop_Proxy(
    ITfDocumentMgr* This,
    ITfContext **ppic);
void __RPC_STUB ITfDocumentMgr_GetTop_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDocumentMgr_GetBase_Proxy(
    ITfDocumentMgr* This,
    ITfContext **ppic);
void __RPC_STUB ITfDocumentMgr_GetBase_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDocumentMgr_EnumContexts_Proxy(
    ITfDocumentMgr* This,
    IEnumTfContexts **ppEnum);
void __RPC_STUB ITfDocumentMgr_EnumContexts_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfDocumentMgr_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfContext interface
 */
#ifndef __ITfContext_INTERFACE_DEFINED__
#define __ITfContext_INTERFACE_DEFINED__

#define TF_ES_ASYNCDONTCARE (0x0)

#define TF_ES_SYNC (0x1)

#define TF_ES_READ (0x2)

#define TF_ES_READWRITE (0x6)

#define TF_ES_ASYNC (0x8)

typedef enum __WIDL_msctf_generated_name_00000001 {
    TF_AE_NONE = 0,
    TF_AE_START = 1,
    TF_AE_END = 2
} TfActiveSelEnd;
typedef struct TF_SELECTIONSTYLE {
    TfActiveSelEnd ase;
    BOOL fInterimChar;
} TF_SELECTIONSTYLE;
typedef struct TF_SELECTION {
    ITfRange *range;
    TF_SELECTIONSTYLE style;
} TF_SELECTION;
#define TF_DEFAULT_SELECTION (TS_DEFAULT_SELECTION)

typedef TS_STATUS TF_STATUS;
#define TF_SD_READONLY (TS_SD_READONLY)

#define TF_SD_LOADING (TS_SD_LOADING)

#define TF_SS_DISJOINTSEL (TS_SS_DISJOINTSEL)

#define TF_SS_REGIONS (TS_SS_REGIONS)

#define TF_SS_TRANSITORY (TS_SS_TRANSITORY)

DEFINE_GUID(IID_ITfContext, 0xaa80e7fd, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfContext : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE RequestEditSession(
        TfClientId tid,
        ITfEditSession *pes,
        DWORD dwFlags,
        HRESULT *phrSession) = 0;

    virtual HRESULT STDMETHODCALLTYPE InWriteSession(
        TfClientId tid,
        BOOL *pfWriteSession) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSelection(
        TfEditCookie ec,
        ULONG ulIndex,
        ULONG ulCount,
        TF_SELECTION *pSelection,
        ULONG *pcFetched) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSelection(
        TfEditCookie ec,
        ULONG ulCount,
        const TF_SELECTION *pSelection) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStart(
        TfEditCookie ec,
        ITfRange **ppStart) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEnd(
        TfEditCookie ec,
        ITfRange **ppEnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetActiveView(
        ITfContextView **ppView) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumViews(
        IEnumTfContextViews **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStatus(
        TF_STATUS *pdcs) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetProperty(
        REFGUID guidProp,
        ITfProperty **ppProp) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAppProperty(
        REFGUID guidProp,
        ITfReadOnlyProperty **ppProp) = 0;

    virtual HRESULT STDMETHODCALLTYPE TrackProperties(
        const GUID **prgProp,
        ULONG cProp,
        const GUID **prgAppProp,
        ULONG cAppProp,
        ITfReadOnlyProperty **ppProperty) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumProperties(
        IEnumTfProperties **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDocumentMgr(
        ITfDocumentMgr **ppDm) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateRangeBackup(
        TfEditCookie ec,
        ITfRange *pRange,
        ITfRangeBackup **ppBackup) = 0;

};
#else
typedef struct ITfContextVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfContext* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfContext* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfContext* This);

    /*** ITfContext methods ***/
    HRESULT (STDMETHODCALLTYPE *RequestEditSession)(
        ITfContext* This,
        TfClientId tid,
        ITfEditSession *pes,
        DWORD dwFlags,
        HRESULT *phrSession);

    HRESULT (STDMETHODCALLTYPE *InWriteSession)(
        ITfContext* This,
        TfClientId tid,
        BOOL *pfWriteSession);

    HRESULT (STDMETHODCALLTYPE *GetSelection)(
        ITfContext* This,
        TfEditCookie ec,
        ULONG ulIndex,
        ULONG ulCount,
        TF_SELECTION *pSelection,
        ULONG *pcFetched);

    HRESULT (STDMETHODCALLTYPE *SetSelection)(
        ITfContext* This,
        TfEditCookie ec,
        ULONG ulCount,
        const TF_SELECTION *pSelection);

    HRESULT (STDMETHODCALLTYPE *GetStart)(
        ITfContext* This,
        TfEditCookie ec,
        ITfRange **ppStart);

    HRESULT (STDMETHODCALLTYPE *GetEnd)(
        ITfContext* This,
        TfEditCookie ec,
        ITfRange **ppEnd);

    HRESULT (STDMETHODCALLTYPE *GetActiveView)(
        ITfContext* This,
        ITfContextView **ppView);

    HRESULT (STDMETHODCALLTYPE *EnumViews)(
        ITfContext* This,
        IEnumTfContextViews **ppEnum);

    HRESULT (STDMETHODCALLTYPE *GetStatus)(
        ITfContext* This,
        TF_STATUS *pdcs);

    HRESULT (STDMETHODCALLTYPE *GetProperty)(
        ITfContext* This,
        REFGUID guidProp,
        ITfProperty **ppProp);

    HRESULT (STDMETHODCALLTYPE *GetAppProperty)(
        ITfContext* This,
        REFGUID guidProp,
        ITfReadOnlyProperty **ppProp);

    HRESULT (STDMETHODCALLTYPE *TrackProperties)(
        ITfContext* This,
        const GUID **prgProp,
        ULONG cProp,
        const GUID **prgAppProp,
        ULONG cAppProp,
        ITfReadOnlyProperty **ppProperty);

    HRESULT (STDMETHODCALLTYPE *EnumProperties)(
        ITfContext* This,
        IEnumTfProperties **ppEnum);

    HRESULT (STDMETHODCALLTYPE *GetDocumentMgr)(
        ITfContext* This,
        ITfDocumentMgr **ppDm);

    HRESULT (STDMETHODCALLTYPE *CreateRangeBackup)(
        ITfContext* This,
        TfEditCookie ec,
        ITfRange *pRange,
        ITfRangeBackup **ppBackup);

    END_INTERFACE
} ITfContextVtbl;
interface ITfContext {
    CONST_VTBL ITfContextVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfContext_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfContext_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfContext_Release(This) (This)->lpVtbl->Release(This)
/*** ITfContext methods ***/
#define ITfContext_RequestEditSession(This,tid,pes,dwFlags,phrSession) (This)->lpVtbl->RequestEditSession(This,tid,pes,dwFlags,phrSession)
#define ITfContext_InWriteSession(This,tid,pfWriteSession) (This)->lpVtbl->InWriteSession(This,tid,pfWriteSession)
#define ITfContext_GetSelection(This,ec,ulIndex,ulCount,pSelection,pcFetched) (This)->lpVtbl->GetSelection(This,ec,ulIndex,ulCount,pSelection,pcFetched)
#define ITfContext_SetSelection(This,ec,ulCount,pSelection) (This)->lpVtbl->SetSelection(This,ec,ulCount,pSelection)
#define ITfContext_GetStart(This,ec,ppStart) (This)->lpVtbl->GetStart(This,ec,ppStart)
#define ITfContext_GetEnd(This,ec,ppEnd) (This)->lpVtbl->GetEnd(This,ec,ppEnd)
#define ITfContext_GetActiveView(This,ppView) (This)->lpVtbl->GetActiveView(This,ppView)
#define ITfContext_EnumViews(This,ppEnum) (This)->lpVtbl->EnumViews(This,ppEnum)
#define ITfContext_GetStatus(This,pdcs) (This)->lpVtbl->GetStatus(This,pdcs)
#define ITfContext_GetProperty(This,guidProp,ppProp) (This)->lpVtbl->GetProperty(This,guidProp,ppProp)
#define ITfContext_GetAppProperty(This,guidProp,ppProp) (This)->lpVtbl->GetAppProperty(This,guidProp,ppProp)
#define ITfContext_TrackProperties(This,prgProp,cProp,prgAppProp,cAppProp,ppProperty) (This)->lpVtbl->TrackProperties(This,prgProp,cProp,prgAppProp,cAppProp,ppProperty)
#define ITfContext_EnumProperties(This,ppEnum) (This)->lpVtbl->EnumProperties(This,ppEnum)
#define ITfContext_GetDocumentMgr(This,ppDm) (This)->lpVtbl->GetDocumentMgr(This,ppDm)
#define ITfContext_CreateRangeBackup(This,ec,pRange,ppBackup) (This)->lpVtbl->CreateRangeBackup(This,ec,pRange,ppBackup)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfContext_RequestEditSession_Proxy(
    ITfContext* This,
    TfClientId tid,
    ITfEditSession *pes,
    DWORD dwFlags,
    HRESULT *phrSession);
void __RPC_STUB ITfContext_RequestEditSession_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_InWriteSession_Proxy(
    ITfContext* This,
    TfClientId tid,
    BOOL *pfWriteSession);
void __RPC_STUB ITfContext_InWriteSession_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetSelection_Proxy(
    ITfContext* This,
    TfEditCookie ec,
    ULONG ulIndex,
    ULONG ulCount,
    TF_SELECTION *pSelection,
    ULONG *pcFetched);
void __RPC_STUB ITfContext_GetSelection_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_SetSelection_Proxy(
    ITfContext* This,
    TfEditCookie ec,
    ULONG ulCount,
    const TF_SELECTION *pSelection);
void __RPC_STUB ITfContext_SetSelection_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetStart_Proxy(
    ITfContext* This,
    TfEditCookie ec,
    ITfRange **ppStart);
void __RPC_STUB ITfContext_GetStart_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetEnd_Proxy(
    ITfContext* This,
    TfEditCookie ec,
    ITfRange **ppEnd);
void __RPC_STUB ITfContext_GetEnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetActiveView_Proxy(
    ITfContext* This,
    ITfContextView **ppView);
void __RPC_STUB ITfContext_GetActiveView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_EnumViews_Proxy(
    ITfContext* This,
    IEnumTfContextViews **ppEnum);
void __RPC_STUB ITfContext_EnumViews_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetStatus_Proxy(
    ITfContext* This,
    TF_STATUS *pdcs);
void __RPC_STUB ITfContext_GetStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetProperty_Proxy(
    ITfContext* This,
    REFGUID guidProp,
    ITfProperty **ppProp);
void __RPC_STUB ITfContext_GetProperty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetAppProperty_Proxy(
    ITfContext* This,
    REFGUID guidProp,
    ITfReadOnlyProperty **ppProp);
void __RPC_STUB ITfContext_GetAppProperty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_TrackProperties_Proxy(
    ITfContext* This,
    const GUID **prgProp,
    ULONG cProp,
    const GUID **prgAppProp,
    ULONG cAppProp,
    ITfReadOnlyProperty **ppProperty);
void __RPC_STUB ITfContext_TrackProperties_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_EnumProperties_Proxy(
    ITfContext* This,
    IEnumTfProperties **ppEnum);
void __RPC_STUB ITfContext_EnumProperties_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_GetDocumentMgr_Proxy(
    ITfContext* This,
    ITfDocumentMgr **ppDm);
void __RPC_STUB ITfContext_GetDocumentMgr_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContext_CreateRangeBackup_Proxy(
    ITfContext* This,
    TfEditCookie ec,
    ITfRange *pRange,
    ITfRangeBackup **ppBackup);
void __RPC_STUB ITfContext_CreateRangeBackup_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfContext_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfSource interface
 */
#ifndef __ITfSource_INTERFACE_DEFINED__
#define __ITfSource_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfSource, 0x4ea48a35, 0x60ae, 0x446f, 0x8f,0xd6, 0xe6,0xa8,0xd8,0x24,0x59,0xf7);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfSource : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE AdviseSink(
        REFIID riid,
        IUnknown *punk,
        DWORD *pdwCookie) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnadviseSink(
        DWORD dwCookie) = 0;

};
#else
typedef struct ITfSourceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfSource* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfSource* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfSource* This);

    /*** ITfSource methods ***/
    HRESULT (STDMETHODCALLTYPE *AdviseSink)(
        ITfSource* This,
        REFIID riid,
        IUnknown *punk,
        DWORD *pdwCookie);

    HRESULT (STDMETHODCALLTYPE *UnadviseSink)(
        ITfSource* This,
        DWORD dwCookie);

    END_INTERFACE
} ITfSourceVtbl;
interface ITfSource {
    CONST_VTBL ITfSourceVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfSource_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfSource_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfSource_Release(This) (This)->lpVtbl->Release(This)
/*** ITfSource methods ***/
#define ITfSource_AdviseSink(This,riid,punk,pdwCookie) (This)->lpVtbl->AdviseSink(This,riid,punk,pdwCookie)
#define ITfSource_UnadviseSink(This,dwCookie) (This)->lpVtbl->UnadviseSink(This,dwCookie)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfSource_AdviseSink_Proxy(
    ITfSource* This,
    REFIID riid,
    IUnknown *punk,
    DWORD *pdwCookie);
void __RPC_STUB ITfSource_AdviseSink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfSource_UnadviseSink_Proxy(
    ITfSource* This,
    DWORD dwCookie);
void __RPC_STUB ITfSource_UnadviseSink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfSource_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfInputProcessorProfiles interface
 */
#ifndef __ITfInputProcessorProfiles_INTERFACE_DEFINED__
#define __ITfInputProcessorProfiles_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfInputProcessorProfiles, 0x1f02b6c5, 0x7842, 0x4ee6, 0x8a,0x0b, 0x9a,0x24,0x18,0x3a,0x95,0xca);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfInputProcessorProfiles : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Register(
        REFCLSID rclsid) = 0;

    virtual HRESULT STDMETHODCALLTYPE Unregister(
        REFCLSID rclsid) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddLanguageProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        const WCHAR *pchDesc,
        ULONG cchDesc,
        const WCHAR *pchIconFile,
        ULONG cchFile,
        ULONG uIconIndex) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveLanguageProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumInputProcessorInfo(
        IEnumGUID **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDefaultLanguageProfile(
        LANGID langid,
        REFGUID catid,
        CLSID *pclsid,
        GUID *pguidProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDefaultLanguageProfile(
        LANGID langid,
        REFCLSID rclsid,
        REFGUID guidProfiles) = 0;

    virtual HRESULT STDMETHODCALLTYPE ActivateLanguageProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfiles) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetActiveLanguageProfile(
        REFCLSID rclsid,
        LANGID *plangid,
        GUID *pguidProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLanguageProfileDescription(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BSTR *pbstrProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCurrentLanguage(
        LANGID *plangid) = 0;

    virtual HRESULT STDMETHODCALLTYPE ChangeCurrentLanguage(
        LANGID langid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLanguageList(
        LANGID **ppLangId,
        ULONG *pulCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumLanguageProfiles(
        LANGID langid,
        IEnumTfLanguageProfiles **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnableLanguageProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BOOL fEnable) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEnabledLanguageProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BOOL *pfEnable) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnableLanguageProfileByDefault(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BOOL fEnable) = 0;

    virtual HRESULT STDMETHODCALLTYPE SubstituteKeyboardLayout(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        HKL hKL) = 0;

};
#else
typedef struct ITfInputProcessorProfilesVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfInputProcessorProfiles* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfInputProcessorProfiles* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfInputProcessorProfiles* This);

    /*** ITfInputProcessorProfiles methods ***/
    HRESULT (STDMETHODCALLTYPE *Register)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid);

    HRESULT (STDMETHODCALLTYPE *Unregister)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid);

    HRESULT (STDMETHODCALLTYPE *AddLanguageProfile)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        const WCHAR *pchDesc,
        ULONG cchDesc,
        const WCHAR *pchIconFile,
        ULONG cchFile,
        ULONG uIconIndex);

    HRESULT (STDMETHODCALLTYPE *RemoveLanguageProfile)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile);

    HRESULT (STDMETHODCALLTYPE *EnumInputProcessorInfo)(
        ITfInputProcessorProfiles* This,
        IEnumGUID **ppEnum);

    HRESULT (STDMETHODCALLTYPE *GetDefaultLanguageProfile)(
        ITfInputProcessorProfiles* This,
        LANGID langid,
        REFGUID catid,
        CLSID *pclsid,
        GUID *pguidProfile);

    HRESULT (STDMETHODCALLTYPE *SetDefaultLanguageProfile)(
        ITfInputProcessorProfiles* This,
        LANGID langid,
        REFCLSID rclsid,
        REFGUID guidProfiles);

    HRESULT (STDMETHODCALLTYPE *ActivateLanguageProfile)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfiles);

    HRESULT (STDMETHODCALLTYPE *GetActiveLanguageProfile)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID *plangid,
        GUID *pguidProfile);

    HRESULT (STDMETHODCALLTYPE *GetLanguageProfileDescription)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BSTR *pbstrProfile);

    HRESULT (STDMETHODCALLTYPE *GetCurrentLanguage)(
        ITfInputProcessorProfiles* This,
        LANGID *plangid);

    HRESULT (STDMETHODCALLTYPE *ChangeCurrentLanguage)(
        ITfInputProcessorProfiles* This,
        LANGID langid);

    HRESULT (STDMETHODCALLTYPE *GetLanguageList)(
        ITfInputProcessorProfiles* This,
        LANGID **ppLangId,
        ULONG *pulCount);

    HRESULT (STDMETHODCALLTYPE *EnumLanguageProfiles)(
        ITfInputProcessorProfiles* This,
        LANGID langid,
        IEnumTfLanguageProfiles **ppEnum);

    HRESULT (STDMETHODCALLTYPE *EnableLanguageProfile)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BOOL fEnable);

    HRESULT (STDMETHODCALLTYPE *IsEnabledLanguageProfile)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BOOL *pfEnable);

    HRESULT (STDMETHODCALLTYPE *EnableLanguageProfileByDefault)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        BOOL fEnable);

    HRESULT (STDMETHODCALLTYPE *SubstituteKeyboardLayout)(
        ITfInputProcessorProfiles* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        HKL hKL);

    END_INTERFACE
} ITfInputProcessorProfilesVtbl;
interface ITfInputProcessorProfiles {
    CONST_VTBL ITfInputProcessorProfilesVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfInputProcessorProfiles_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfInputProcessorProfiles_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfInputProcessorProfiles_Release(This) (This)->lpVtbl->Release(This)
/*** ITfInputProcessorProfiles methods ***/
#define ITfInputProcessorProfiles_Register(This,rclsid) (This)->lpVtbl->Register(This,rclsid)
#define ITfInputProcessorProfiles_Unregister(This,rclsid) (This)->lpVtbl->Unregister(This,rclsid)
#define ITfInputProcessorProfiles_AddLanguageProfile(This,rclsid,langid,guidProfile,pchDesc,cchDesc,pchIconFile,cchFile,uIconIndex) (This)->lpVtbl->AddLanguageProfile(This,rclsid,langid,guidProfile,pchDesc,cchDesc,pchIconFile,cchFile,uIconIndex)
#define ITfInputProcessorProfiles_RemoveLanguageProfile(This,rclsid,langid,guidProfile) (This)->lpVtbl->RemoveLanguageProfile(This,rclsid,langid,guidProfile)
#define ITfInputProcessorProfiles_EnumInputProcessorInfo(This,ppEnum) (This)->lpVtbl->EnumInputProcessorInfo(This,ppEnum)
#define ITfInputProcessorProfiles_GetDefaultLanguageProfile(This,langid,catid,pclsid,pguidProfile) (This)->lpVtbl->GetDefaultLanguageProfile(This,langid,catid,pclsid,pguidProfile)
#define ITfInputProcessorProfiles_SetDefaultLanguageProfile(This,langid,rclsid,guidProfiles) (This)->lpVtbl->SetDefaultLanguageProfile(This,langid,rclsid,guidProfiles)
#define ITfInputProcessorProfiles_ActivateLanguageProfile(This,rclsid,langid,guidProfiles) (This)->lpVtbl->ActivateLanguageProfile(This,rclsid,langid,guidProfiles)
#define ITfInputProcessorProfiles_GetActiveLanguageProfile(This,rclsid,plangid,pguidProfile) (This)->lpVtbl->GetActiveLanguageProfile(This,rclsid,plangid,pguidProfile)
#define ITfInputProcessorProfiles_GetLanguageProfileDescription(This,rclsid,langid,guidProfile,pbstrProfile) (This)->lpVtbl->GetLanguageProfileDescription(This,rclsid,langid,guidProfile,pbstrProfile)
#define ITfInputProcessorProfiles_GetCurrentLanguage(This,plangid) (This)->lpVtbl->GetCurrentLanguage(This,plangid)
#define ITfInputProcessorProfiles_ChangeCurrentLanguage(This,langid) (This)->lpVtbl->ChangeCurrentLanguage(This,langid)
#define ITfInputProcessorProfiles_GetLanguageList(This,ppLangId,pulCount) (This)->lpVtbl->GetLanguageList(This,ppLangId,pulCount)
#define ITfInputProcessorProfiles_EnumLanguageProfiles(This,langid,ppEnum) (This)->lpVtbl->EnumLanguageProfiles(This,langid,ppEnum)
#define ITfInputProcessorProfiles_EnableLanguageProfile(This,rclsid,langid,guidProfile,fEnable) (This)->lpVtbl->EnableLanguageProfile(This,rclsid,langid,guidProfile,fEnable)
#define ITfInputProcessorProfiles_IsEnabledLanguageProfile(This,rclsid,langid,guidProfile,pfEnable) (This)->lpVtbl->IsEnabledLanguageProfile(This,rclsid,langid,guidProfile,pfEnable)
#define ITfInputProcessorProfiles_EnableLanguageProfileByDefault(This,rclsid,langid,guidProfile,fEnable) (This)->lpVtbl->EnableLanguageProfileByDefault(This,rclsid,langid,guidProfile,fEnable)
#define ITfInputProcessorProfiles_SubstituteKeyboardLayout(This,rclsid,langid,guidProfile,hKL) (This)->lpVtbl->SubstituteKeyboardLayout(This,rclsid,langid,guidProfile,hKL)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_Register_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid);
void __RPC_STUB ITfInputProcessorProfiles_Register_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_Unregister_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid);
void __RPC_STUB ITfInputProcessorProfiles_Unregister_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_AddLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    const WCHAR *pchDesc,
    ULONG cchDesc,
    const WCHAR *pchIconFile,
    ULONG cchFile,
    ULONG uIconIndex);
void __RPC_STUB ITfInputProcessorProfiles_AddLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_RemoveLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile);
void __RPC_STUB ITfInputProcessorProfiles_RemoveLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_EnumInputProcessorInfo_Proxy(
    ITfInputProcessorProfiles* This,
    IEnumGUID **ppEnum);
void __RPC_STUB ITfInputProcessorProfiles_EnumInputProcessorInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_GetDefaultLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    LANGID langid,
    REFGUID catid,
    CLSID *pclsid,
    GUID *pguidProfile);
void __RPC_STUB ITfInputProcessorProfiles_GetDefaultLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_SetDefaultLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    LANGID langid,
    REFCLSID rclsid,
    REFGUID guidProfiles);
void __RPC_STUB ITfInputProcessorProfiles_SetDefaultLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_ActivateLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfiles);
void __RPC_STUB ITfInputProcessorProfiles_ActivateLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_GetActiveLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID *plangid,
    GUID *pguidProfile);
void __RPC_STUB ITfInputProcessorProfiles_GetActiveLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_GetLanguageProfileDescription_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    BSTR *pbstrProfile);
void __RPC_STUB ITfInputProcessorProfiles_GetLanguageProfileDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_GetCurrentLanguage_Proxy(
    ITfInputProcessorProfiles* This,
    LANGID *plangid);
void __RPC_STUB ITfInputProcessorProfiles_GetCurrentLanguage_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_ChangeCurrentLanguage_Proxy(
    ITfInputProcessorProfiles* This,
    LANGID langid);
void __RPC_STUB ITfInputProcessorProfiles_ChangeCurrentLanguage_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_GetLanguageList_Proxy(
    ITfInputProcessorProfiles* This,
    LANGID **ppLangId,
    ULONG *pulCount);
void __RPC_STUB ITfInputProcessorProfiles_GetLanguageList_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_EnumLanguageProfiles_Proxy(
    ITfInputProcessorProfiles* This,
    LANGID langid,
    IEnumTfLanguageProfiles **ppEnum);
void __RPC_STUB ITfInputProcessorProfiles_EnumLanguageProfiles_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_EnableLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    BOOL fEnable);
void __RPC_STUB ITfInputProcessorProfiles_EnableLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_IsEnabledLanguageProfile_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    BOOL *pfEnable);
void __RPC_STUB ITfInputProcessorProfiles_IsEnabledLanguageProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_EnableLanguageProfileByDefault_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    BOOL fEnable);
void __RPC_STUB ITfInputProcessorProfiles_EnableLanguageProfileByDefault_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfiles_SubstituteKeyboardLayout_Proxy(
    ITfInputProcessorProfiles* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    HKL hKL);
void __RPC_STUB ITfInputProcessorProfiles_SubstituteKeyboardLayout_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfInputProcessorProfiles_INTERFACE_DEFINED__ */

typedef enum __WIDL_msctf_generated_name_00000002 {
    TF_LS_NONE = 0,
    TF_LS_SOLID = 1,
    TF_LS_DOT = 2,
    TF_LS_DASH = 3,
    TF_LS_SQUIGGLE = 4
} TF_DA_LINESTYLE;
typedef enum __WIDL_msctf_generated_name_00000003 {
    TF_CT_NONE = 0,
    TF_CT_SYSCOLOR = 1,
    TF_CT_COLORREF = 2
} TF_DA_COLORTYPE;
typedef struct TF_DA_COLOR {
    TF_DA_COLORTYPE type;
    union {
        int nIndex;
        COLORREF cr;
    };
} TF_DA_COLOR;
typedef enum __WIDL_msctf_generated_name_00000004 {
    TF_ATTR_INPUT = 0,
    TF_ATTR_TARGET_CONVERTED = 1,
    TF_ATTR_CONVERTED = 2,
    TF_ATTR_TARGET_NOTCONVERTED = 3,
    TF_ATTR_INPUT_ERROR = 4,
    TF_ATTR_FIXEDCONVERTED = 5,
    TF_ATTR_OTHER = -1
} TF_DA_ATTR_INFO;
typedef struct TF_DISPLAYATTRIBUTE {
    TF_DA_COLOR crText;
    TF_DA_COLOR crBk;
    TF_DA_LINESTYLE lsStyle;
    BOOL fBoldLine;
    TF_DA_COLOR crLine;
    TF_DA_ATTR_INFO bAttr;
} TF_DISPLAYATTRIBUTE;
/*****************************************************************************
 * ITfDisplayAttributeInfo interface
 */
#ifndef __ITfDisplayAttributeInfo_INTERFACE_DEFINED__
#define __ITfDisplayAttributeInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfDisplayAttributeInfo, 0x70528852, 0x2f26, 0x4aea, 0x8c,0x96, 0x21,0x51,0x50,0x57,0x89,0x32);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfDisplayAttributeInfo : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetGUID(
        GUID *pguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDescription(
        BSTR *pbstrDesc) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAttributeInfo(
        TF_DISPLAYATTRIBUTE *pda) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAttributeInfo(
        const TF_DISPLAYATTRIBUTE *pda) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

};
#else
typedef struct ITfDisplayAttributeInfoVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfDisplayAttributeInfo* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfDisplayAttributeInfo* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfDisplayAttributeInfo* This);

    /*** ITfDisplayAttributeInfo methods ***/
    HRESULT (STDMETHODCALLTYPE *GetGUID)(
        ITfDisplayAttributeInfo* This,
        GUID *pguid);

    HRESULT (STDMETHODCALLTYPE *GetDescription)(
        ITfDisplayAttributeInfo* This,
        BSTR *pbstrDesc);

    HRESULT (STDMETHODCALLTYPE *GetAttributeInfo)(
        ITfDisplayAttributeInfo* This,
        TF_DISPLAYATTRIBUTE *pda);

    HRESULT (STDMETHODCALLTYPE *SetAttributeInfo)(
        ITfDisplayAttributeInfo* This,
        const TF_DISPLAYATTRIBUTE *pda);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        ITfDisplayAttributeInfo* This);

    END_INTERFACE
} ITfDisplayAttributeInfoVtbl;
interface ITfDisplayAttributeInfo {
    CONST_VTBL ITfDisplayAttributeInfoVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfDisplayAttributeInfo_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfDisplayAttributeInfo_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfDisplayAttributeInfo_Release(This) (This)->lpVtbl->Release(This)
/*** ITfDisplayAttributeInfo methods ***/
#define ITfDisplayAttributeInfo_GetGUID(This,pguid) (This)->lpVtbl->GetGUID(This,pguid)
#define ITfDisplayAttributeInfo_GetDescription(This,pbstrDesc) (This)->lpVtbl->GetDescription(This,pbstrDesc)
#define ITfDisplayAttributeInfo_GetAttributeInfo(This,pda) (This)->lpVtbl->GetAttributeInfo(This,pda)
#define ITfDisplayAttributeInfo_SetAttributeInfo(This,pda) (This)->lpVtbl->SetAttributeInfo(This,pda)
#define ITfDisplayAttributeInfo_Reset(This) (This)->lpVtbl->Reset(This)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfDisplayAttributeInfo_GetGUID_Proxy(
    ITfDisplayAttributeInfo* This,
    GUID *pguid);
void __RPC_STUB ITfDisplayAttributeInfo_GetGUID_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDisplayAttributeInfo_GetDescription_Proxy(
    ITfDisplayAttributeInfo* This,
    BSTR *pbstrDesc);
void __RPC_STUB ITfDisplayAttributeInfo_GetDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDisplayAttributeInfo_GetAttributeInfo_Proxy(
    ITfDisplayAttributeInfo* This,
    TF_DISPLAYATTRIBUTE *pda);
void __RPC_STUB ITfDisplayAttributeInfo_GetAttributeInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDisplayAttributeInfo_SetAttributeInfo_Proxy(
    ITfDisplayAttributeInfo* This,
    const TF_DISPLAYATTRIBUTE *pda);
void __RPC_STUB ITfDisplayAttributeInfo_SetAttributeInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDisplayAttributeInfo_Reset_Proxy(
    ITfDisplayAttributeInfo* This);
void __RPC_STUB ITfDisplayAttributeInfo_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfDisplayAttributeInfo_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IEnumTfDisplayAttributeInfo interface
 */
#ifndef __IEnumTfDisplayAttributeInfo_INTERFACE_DEFINED__
#define __IEnumTfDisplayAttributeInfo_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumTfDisplayAttributeInfo, 0x7cef04d7, 0xcb75, 0x4e80, 0xa7,0xab, 0x5f,0x5b,0xc7,0xd3,0x32,0xde);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IEnumTfDisplayAttributeInfo : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumTfDisplayAttributeInfo **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Next(
        ULONG ulCount,
        ITfDisplayAttributeInfo **rgInfo,
        ULONG *pcFetched) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#else
typedef struct IEnumTfDisplayAttributeInfoVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IEnumTfDisplayAttributeInfo* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IEnumTfDisplayAttributeInfo* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IEnumTfDisplayAttributeInfo* This);

    /*** IEnumTfDisplayAttributeInfo methods ***/
    HRESULT (STDMETHODCALLTYPE *Clone)(
        IEnumTfDisplayAttributeInfo* This,
        IEnumTfDisplayAttributeInfo **ppEnum);

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumTfDisplayAttributeInfo* This,
        ULONG ulCount,
        ITfDisplayAttributeInfo **rgInfo,
        ULONG *pcFetched);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IEnumTfDisplayAttributeInfo* This);

    HRESULT (STDMETHODCALLTYPE *Skip)(
        IEnumTfDisplayAttributeInfo* This,
        ULONG ulCount);

    END_INTERFACE
} IEnumTfDisplayAttributeInfoVtbl;
interface IEnumTfDisplayAttributeInfo {
    CONST_VTBL IEnumTfDisplayAttributeInfoVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IEnumTfDisplayAttributeInfo_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumTfDisplayAttributeInfo_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumTfDisplayAttributeInfo_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumTfDisplayAttributeInfo methods ***/
#define IEnumTfDisplayAttributeInfo_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumTfDisplayAttributeInfo_Next(This,ulCount,rgInfo,pcFetched) (This)->lpVtbl->Next(This,ulCount,rgInfo,pcFetched)
#define IEnumTfDisplayAttributeInfo_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumTfDisplayAttributeInfo_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumTfDisplayAttributeInfo_Clone_Proxy(
    IEnumTfDisplayAttributeInfo* This,
    IEnumTfDisplayAttributeInfo **ppEnum);
void __RPC_STUB IEnumTfDisplayAttributeInfo_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfDisplayAttributeInfo_Next_Proxy(
    IEnumTfDisplayAttributeInfo* This,
    ULONG ulCount,
    ITfDisplayAttributeInfo **rgInfo,
    ULONG *pcFetched);
void __RPC_STUB IEnumTfDisplayAttributeInfo_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfDisplayAttributeInfo_Reset_Proxy(
    IEnumTfDisplayAttributeInfo* This);
void __RPC_STUB IEnumTfDisplayAttributeInfo_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfDisplayAttributeInfo_Skip_Proxy(
    IEnumTfDisplayAttributeInfo* This,
    ULONG ulCount);
void __RPC_STUB IEnumTfDisplayAttributeInfo_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumTfDisplayAttributeInfo_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfDisplayAttributeMgr interface
 */
#ifndef __ITfDisplayAttributeMgr_INTERFACE_DEFINED__
#define __ITfDisplayAttributeMgr_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfDisplayAttributeMgr, 0x8ded7393, 0x5db1, 0x475c, 0x9e,0x71, 0xa3,0x91,0x11,0xb0,0xff,0x67);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfDisplayAttributeMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnUpdateInfo(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumDisplayAttributeInfo(
        IEnumTfDisplayAttributeInfo **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDisplayAttributeInfo(
        REFGUID guid,
        ITfDisplayAttributeInfo **ppInfo,
        CLSID *pclsidOwner) = 0;

};
#else
typedef struct ITfDisplayAttributeMgrVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfDisplayAttributeMgr* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfDisplayAttributeMgr* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfDisplayAttributeMgr* This);

    /*** ITfDisplayAttributeMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *OnUpdateInfo)(
        ITfDisplayAttributeMgr* This);

    HRESULT (STDMETHODCALLTYPE *EnumDisplayAttributeInfo)(
        ITfDisplayAttributeMgr* This,
        IEnumTfDisplayAttributeInfo **ppEnum);

    HRESULT (STDMETHODCALLTYPE *GetDisplayAttributeInfo)(
        ITfDisplayAttributeMgr* This,
        REFGUID guid,
        ITfDisplayAttributeInfo **ppInfo,
        CLSID *pclsidOwner);

    END_INTERFACE
} ITfDisplayAttributeMgrVtbl;
interface ITfDisplayAttributeMgr {
    CONST_VTBL ITfDisplayAttributeMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfDisplayAttributeMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfDisplayAttributeMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfDisplayAttributeMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfDisplayAttributeMgr methods ***/
#define ITfDisplayAttributeMgr_OnUpdateInfo(This) (This)->lpVtbl->OnUpdateInfo(This)
#define ITfDisplayAttributeMgr_EnumDisplayAttributeInfo(This,ppEnum) (This)->lpVtbl->EnumDisplayAttributeInfo(This,ppEnum)
#define ITfDisplayAttributeMgr_GetDisplayAttributeInfo(This,guid,ppInfo,pclsidOwner) (This)->lpVtbl->GetDisplayAttributeInfo(This,guid,ppInfo,pclsidOwner)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfDisplayAttributeMgr_OnUpdateInfo_Proxy(
    ITfDisplayAttributeMgr* This);
void __RPC_STUB ITfDisplayAttributeMgr_OnUpdateInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDisplayAttributeMgr_EnumDisplayAttributeInfo_Proxy(
    ITfDisplayAttributeMgr* This,
    IEnumTfDisplayAttributeInfo **ppEnum);
void __RPC_STUB ITfDisplayAttributeMgr_EnumDisplayAttributeInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfDisplayAttributeMgr_GetDisplayAttributeInfo_Proxy(
    ITfDisplayAttributeMgr* This,
    REFGUID guid,
    ITfDisplayAttributeInfo **ppInfo,
    CLSID *pclsidOwner);
void __RPC_STUB ITfDisplayAttributeMgr_GetDisplayAttributeInfo_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfDisplayAttributeMgr_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfCategoryMgr interface
 */
#ifndef __ITfCategoryMgr_INTERFACE_DEFINED__
#define __ITfCategoryMgr_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfCategoryMgr, 0xc3acefb5, 0xf69d, 0x4905, 0x93,0x8f, 0xfc,0xad,0xcf,0x4b,0xe8,0x30);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfCategoryMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE RegisterCategory(
        REFCLSID rclsid,
        REFGUID rcatid,
        REFGUID rguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnregisterCategory(
        REFCLSID rclsid,
        REFGUID rcatid,
        REFGUID rguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumCategoriesInItem(
        REFGUID rguid,
        IEnumGUID **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumItemsInCategory(
        REFGUID rcatid,
        IEnumGUID **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE FindClosestCategory(
        REFGUID rguid,
        GUID *pcatid,
        const GUID **ppcatidList,
        ULONG ulCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE RegisterGUIDDescription(
        REFCLSID rclsid,
        REFGUID rguid,
        const WCHAR *pchDesc,
        ULONG cch) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnregisterGUIDDescription(
        REFCLSID rclsid,
        REFGUID rguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGUIDDescription(
        REFGUID rguid,
        BSTR *pbstrDesc) = 0;

    virtual HRESULT STDMETHODCALLTYPE RegisterGUIDDWORD(
        REFCLSID rclsid,
        REFGUID rguid,
        DWORD dw) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnregisterGUIDDWORD(
        REFCLSID rclsid,
        REFGUID rguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGUIDDWORD(
        REFGUID rguid,
        DWORD *pdw) = 0;

    virtual HRESULT STDMETHODCALLTYPE RegisterGUID(
        REFGUID rguid,
        TfGuidAtom *pguidatom) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGUID(
        TfGuidAtom guidatom,
        GUID *pguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqualTfGuidAtom(
        TfGuidAtom guidatom,
        REFGUID rguid,
        BOOL *pfEqual) = 0;

};
#else
typedef struct ITfCategoryMgrVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfCategoryMgr* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfCategoryMgr* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfCategoryMgr* This);

    /*** ITfCategoryMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *RegisterCategory)(
        ITfCategoryMgr* This,
        REFCLSID rclsid,
        REFGUID rcatid,
        REFGUID rguid);

    HRESULT (STDMETHODCALLTYPE *UnregisterCategory)(
        ITfCategoryMgr* This,
        REFCLSID rclsid,
        REFGUID rcatid,
        REFGUID rguid);

    HRESULT (STDMETHODCALLTYPE *EnumCategoriesInItem)(
        ITfCategoryMgr* This,
        REFGUID rguid,
        IEnumGUID **ppEnum);

    HRESULT (STDMETHODCALLTYPE *EnumItemsInCategory)(
        ITfCategoryMgr* This,
        REFGUID rcatid,
        IEnumGUID **ppEnum);

    HRESULT (STDMETHODCALLTYPE *FindClosestCategory)(
        ITfCategoryMgr* This,
        REFGUID rguid,
        GUID *pcatid,
        const GUID **ppcatidList,
        ULONG ulCount);

    HRESULT (STDMETHODCALLTYPE *RegisterGUIDDescription)(
        ITfCategoryMgr* This,
        REFCLSID rclsid,
        REFGUID rguid,
        const WCHAR *pchDesc,
        ULONG cch);

    HRESULT (STDMETHODCALLTYPE *UnregisterGUIDDescription)(
        ITfCategoryMgr* This,
        REFCLSID rclsid,
        REFGUID rguid);

    HRESULT (STDMETHODCALLTYPE *GetGUIDDescription)(
        ITfCategoryMgr* This,
        REFGUID rguid,
        BSTR *pbstrDesc);

    HRESULT (STDMETHODCALLTYPE *RegisterGUIDDWORD)(
        ITfCategoryMgr* This,
        REFCLSID rclsid,
        REFGUID rguid,
        DWORD dw);

    HRESULT (STDMETHODCALLTYPE *UnregisterGUIDDWORD)(
        ITfCategoryMgr* This,
        REFCLSID rclsid,
        REFGUID rguid);

    HRESULT (STDMETHODCALLTYPE *GetGUIDDWORD)(
        ITfCategoryMgr* This,
        REFGUID rguid,
        DWORD *pdw);

    HRESULT (STDMETHODCALLTYPE *RegisterGUID)(
        ITfCategoryMgr* This,
        REFGUID rguid,
        TfGuidAtom *pguidatom);

    HRESULT (STDMETHODCALLTYPE *GetGUID)(
        ITfCategoryMgr* This,
        TfGuidAtom guidatom,
        GUID *pguid);

    HRESULT (STDMETHODCALLTYPE *IsEqualTfGuidAtom)(
        ITfCategoryMgr* This,
        TfGuidAtom guidatom,
        REFGUID rguid,
        BOOL *pfEqual);

    END_INTERFACE
} ITfCategoryMgrVtbl;
interface ITfCategoryMgr {
    CONST_VTBL ITfCategoryMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfCategoryMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfCategoryMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfCategoryMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfCategoryMgr methods ***/
#define ITfCategoryMgr_RegisterCategory(This,rclsid,rcatid,rguid) (This)->lpVtbl->RegisterCategory(This,rclsid,rcatid,rguid)
#define ITfCategoryMgr_UnregisterCategory(This,rclsid,rcatid,rguid) (This)->lpVtbl->UnregisterCategory(This,rclsid,rcatid,rguid)
#define ITfCategoryMgr_EnumCategoriesInItem(This,rguid,ppEnum) (This)->lpVtbl->EnumCategoriesInItem(This,rguid,ppEnum)
#define ITfCategoryMgr_EnumItemsInCategory(This,rcatid,ppEnum) (This)->lpVtbl->EnumItemsInCategory(This,rcatid,ppEnum)
#define ITfCategoryMgr_FindClosestCategory(This,rguid,pcatid,ppcatidList,ulCount) (This)->lpVtbl->FindClosestCategory(This,rguid,pcatid,ppcatidList,ulCount)
#define ITfCategoryMgr_RegisterGUIDDescription(This,rclsid,rguid,pchDesc,cch) (This)->lpVtbl->RegisterGUIDDescription(This,rclsid,rguid,pchDesc,cch)
#define ITfCategoryMgr_UnregisterGUIDDescription(This,rclsid,rguid) (This)->lpVtbl->UnregisterGUIDDescription(This,rclsid,rguid)
#define ITfCategoryMgr_GetGUIDDescription(This,rguid,pbstrDesc) (This)->lpVtbl->GetGUIDDescription(This,rguid,pbstrDesc)
#define ITfCategoryMgr_RegisterGUIDDWORD(This,rclsid,rguid,dw) (This)->lpVtbl->RegisterGUIDDWORD(This,rclsid,rguid,dw)
#define ITfCategoryMgr_UnregisterGUIDDWORD(This,rclsid,rguid) (This)->lpVtbl->UnregisterGUIDDWORD(This,rclsid,rguid)
#define ITfCategoryMgr_GetGUIDDWORD(This,rguid,pdw) (This)->lpVtbl->GetGUIDDWORD(This,rguid,pdw)
#define ITfCategoryMgr_RegisterGUID(This,rguid,pguidatom) (This)->lpVtbl->RegisterGUID(This,rguid,pguidatom)
#define ITfCategoryMgr_GetGUID(This,guidatom,pguid) (This)->lpVtbl->GetGUID(This,guidatom,pguid)
#define ITfCategoryMgr_IsEqualTfGuidAtom(This,guidatom,rguid,pfEqual) (This)->lpVtbl->IsEqualTfGuidAtom(This,guidatom,rguid,pfEqual)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfCategoryMgr_RegisterCategory_Proxy(
    ITfCategoryMgr* This,
    REFCLSID rclsid,
    REFGUID rcatid,
    REFGUID rguid);
void __RPC_STUB ITfCategoryMgr_RegisterCategory_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_UnregisterCategory_Proxy(
    ITfCategoryMgr* This,
    REFCLSID rclsid,
    REFGUID rcatid,
    REFGUID rguid);
void __RPC_STUB ITfCategoryMgr_UnregisterCategory_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_EnumCategoriesInItem_Proxy(
    ITfCategoryMgr* This,
    REFGUID rguid,
    IEnumGUID **ppEnum);
void __RPC_STUB ITfCategoryMgr_EnumCategoriesInItem_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_EnumItemsInCategory_Proxy(
    ITfCategoryMgr* This,
    REFGUID rcatid,
    IEnumGUID **ppEnum);
void __RPC_STUB ITfCategoryMgr_EnumItemsInCategory_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_FindClosestCategory_Proxy(
    ITfCategoryMgr* This,
    REFGUID rguid,
    GUID *pcatid,
    const GUID **ppcatidList,
    ULONG ulCount);
void __RPC_STUB ITfCategoryMgr_FindClosestCategory_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_RegisterGUIDDescription_Proxy(
    ITfCategoryMgr* This,
    REFCLSID rclsid,
    REFGUID rguid,
    const WCHAR *pchDesc,
    ULONG cch);
void __RPC_STUB ITfCategoryMgr_RegisterGUIDDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_UnregisterGUIDDescription_Proxy(
    ITfCategoryMgr* This,
    REFCLSID rclsid,
    REFGUID rguid);
void __RPC_STUB ITfCategoryMgr_UnregisterGUIDDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_GetGUIDDescription_Proxy(
    ITfCategoryMgr* This,
    REFGUID rguid,
    BSTR *pbstrDesc);
void __RPC_STUB ITfCategoryMgr_GetGUIDDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_RegisterGUIDDWORD_Proxy(
    ITfCategoryMgr* This,
    REFCLSID rclsid,
    REFGUID rguid,
    DWORD dw);
void __RPC_STUB ITfCategoryMgr_RegisterGUIDDWORD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_UnregisterGUIDDWORD_Proxy(
    ITfCategoryMgr* This,
    REFCLSID rclsid,
    REFGUID rguid);
void __RPC_STUB ITfCategoryMgr_UnregisterGUIDDWORD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_GetGUIDDWORD_Proxy(
    ITfCategoryMgr* This,
    REFGUID rguid,
    DWORD *pdw);
void __RPC_STUB ITfCategoryMgr_GetGUIDDWORD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_RegisterGUID_Proxy(
    ITfCategoryMgr* This,
    REFGUID rguid,
    TfGuidAtom *pguidatom);
void __RPC_STUB ITfCategoryMgr_RegisterGUID_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_GetGUID_Proxy(
    ITfCategoryMgr* This,
    TfGuidAtom guidatom,
    GUID *pguid);
void __RPC_STUB ITfCategoryMgr_GetGUID_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCategoryMgr_IsEqualTfGuidAtom_Proxy(
    ITfCategoryMgr* This,
    TfGuidAtom guidatom,
    REFGUID rguid,
    BOOL *pfEqual);
void __RPC_STUB ITfCategoryMgr_IsEqualTfGuidAtom_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfCategoryMgr_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfTextEditSink interface
 */
#ifndef __ITfTextEditSink_INTERFACE_DEFINED__
#define __ITfTextEditSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfTextEditSink, 0x8127d409, 0xccd3, 0x4683, 0x96,0x7a, 0xb4,0x3d,0x5b,0x48,0x2b,0xf7);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfTextEditSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnEndEdit(
        ITfContext *pic,
        TfEditCookie ecReadOnly,
        ITfEditRecord *pEditRecord) = 0;

};
#else
typedef struct ITfTextEditSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfTextEditSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfTextEditSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfTextEditSink* This);

    /*** ITfTextEditSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnEndEdit)(
        ITfTextEditSink* This,
        ITfContext *pic,
        TfEditCookie ecReadOnly,
        ITfEditRecord *pEditRecord);

    END_INTERFACE
} ITfTextEditSinkVtbl;
interface ITfTextEditSink {
    CONST_VTBL ITfTextEditSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfTextEditSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfTextEditSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfTextEditSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfTextEditSink methods ***/
#define ITfTextEditSink_OnEndEdit(This,pic,ecReadOnly,pEditRecord) (This)->lpVtbl->OnEndEdit(This,pic,ecReadOnly,pEditRecord)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfTextEditSink_OnEndEdit_Proxy(
    ITfTextEditSink* This,
    ITfContext *pic,
    TfEditCookie ecReadOnly,
    ITfEditRecord *pEditRecord);
void __RPC_STUB ITfTextEditSink_OnEndEdit_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfTextEditSink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfContextOwnerCompositionSink interface
 */
#ifndef __ITfContextOwnerCompositionSink_INTERFACE_DEFINED__
#define __ITfContextOwnerCompositionSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfContextOwnerCompositionSink, 0x5f20aa40, 0xb57a, 0x4f34, 0x96,0xab, 0x35,0x76,0xf3,0x77,0xcc,0x79);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfContextOwnerCompositionSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnStartComposition(
        ITfCompositionView *pComposition,
        BOOL *pfOk) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnUpdateComposition(
        ITfCompositionView *pComposition,
        ITfRange *pRangeNew) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnEndComposition(
        ITfCompositionView *pComposition) = 0;

};
#else
typedef struct ITfContextOwnerCompositionSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfContextOwnerCompositionSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfContextOwnerCompositionSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfContextOwnerCompositionSink* This);

    /*** ITfContextOwnerCompositionSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnStartComposition)(
        ITfContextOwnerCompositionSink* This,
        ITfCompositionView *pComposition,
        BOOL *pfOk);

    HRESULT (STDMETHODCALLTYPE *OnUpdateComposition)(
        ITfContextOwnerCompositionSink* This,
        ITfCompositionView *pComposition,
        ITfRange *pRangeNew);

    HRESULT (STDMETHODCALLTYPE *OnEndComposition)(
        ITfContextOwnerCompositionSink* This,
        ITfCompositionView *pComposition);

    END_INTERFACE
} ITfContextOwnerCompositionSinkVtbl;
interface ITfContextOwnerCompositionSink {
    CONST_VTBL ITfContextOwnerCompositionSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfContextOwnerCompositionSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfContextOwnerCompositionSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfContextOwnerCompositionSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfContextOwnerCompositionSink methods ***/
#define ITfContextOwnerCompositionSink_OnStartComposition(This,pComposition,pfOk) (This)->lpVtbl->OnStartComposition(This,pComposition,pfOk)
#define ITfContextOwnerCompositionSink_OnUpdateComposition(This,pComposition,pRangeNew) (This)->lpVtbl->OnUpdateComposition(This,pComposition,pRangeNew)
#define ITfContextOwnerCompositionSink_OnEndComposition(This,pComposition) (This)->lpVtbl->OnEndComposition(This,pComposition)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfContextOwnerCompositionSink_OnStartComposition_Proxy(
    ITfContextOwnerCompositionSink* This,
    ITfCompositionView *pComposition,
    BOOL *pfOk);
void __RPC_STUB ITfContextOwnerCompositionSink_OnStartComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerCompositionSink_OnUpdateComposition_Proxy(
    ITfContextOwnerCompositionSink* This,
    ITfCompositionView *pComposition,
    ITfRange *pRangeNew);
void __RPC_STUB ITfContextOwnerCompositionSink_OnUpdateComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerCompositionSink_OnEndComposition_Proxy(
    ITfContextOwnerCompositionSink* This,
    ITfCompositionView *pComposition);
void __RPC_STUB ITfContextOwnerCompositionSink_OnEndComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfContextOwnerCompositionSink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IEnumTfLanguageProfiles interface
 */
#ifndef __IEnumTfLanguageProfiles_INTERFACE_DEFINED__
#define __IEnumTfLanguageProfiles_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumTfLanguageProfiles, 0x3d61bf11, 0xac5f, 0x42c8, 0xa4,0xcb, 0x93,0x1b,0xcc,0x28,0xc7,0x44);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IEnumTfLanguageProfiles : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumTfLanguageProfiles **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Next(
        ULONG ulCount,
        TF_LANGUAGEPROFILE *pProfile,
        ULONG *pcFetch) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#else
typedef struct IEnumTfLanguageProfilesVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IEnumTfLanguageProfiles* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IEnumTfLanguageProfiles* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IEnumTfLanguageProfiles* This);

    /*** IEnumTfLanguageProfiles methods ***/
    HRESULT (STDMETHODCALLTYPE *Clone)(
        IEnumTfLanguageProfiles* This,
        IEnumTfLanguageProfiles **ppEnum);

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumTfLanguageProfiles* This,
        ULONG ulCount,
        TF_LANGUAGEPROFILE *pProfile,
        ULONG *pcFetch);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IEnumTfLanguageProfiles* This);

    HRESULT (STDMETHODCALLTYPE *Skip)(
        IEnumTfLanguageProfiles* This,
        ULONG ulCount);

    END_INTERFACE
} IEnumTfLanguageProfilesVtbl;
interface IEnumTfLanguageProfiles {
    CONST_VTBL IEnumTfLanguageProfilesVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IEnumTfLanguageProfiles_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumTfLanguageProfiles_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumTfLanguageProfiles_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumTfLanguageProfiles methods ***/
#define IEnumTfLanguageProfiles_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumTfLanguageProfiles_Next(This,ulCount,pProfile,pcFetch) (This)->lpVtbl->Next(This,ulCount,pProfile,pcFetch)
#define IEnumTfLanguageProfiles_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumTfLanguageProfiles_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumTfLanguageProfiles_Clone_Proxy(
    IEnumTfLanguageProfiles* This,
    IEnumTfLanguageProfiles **ppEnum);
void __RPC_STUB IEnumTfLanguageProfiles_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfLanguageProfiles_Next_Proxy(
    IEnumTfLanguageProfiles* This,
    ULONG ulCount,
    TF_LANGUAGEPROFILE *pProfile,
    ULONG *pcFetch);
void __RPC_STUB IEnumTfLanguageProfiles_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfLanguageProfiles_Reset_Proxy(
    IEnumTfLanguageProfiles* This);
void __RPC_STUB IEnumTfLanguageProfiles_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfLanguageProfiles_Skip_Proxy(
    IEnumTfLanguageProfiles* This,
    ULONG ulCount);
void __RPC_STUB IEnumTfLanguageProfiles_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumTfLanguageProfiles_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfTextInputProcessor interface
 */
#ifndef __ITfTextInputProcessor_INTERFACE_DEFINED__
#define __ITfTextInputProcessor_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfTextInputProcessor, 0xaa80e7f7, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfTextInputProcessor : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Activate(
        ITfThreadMgr *ptim,
        TfClientId tid) = 0;

    virtual HRESULT STDMETHODCALLTYPE Deactivate(
        ) = 0;

};
#else
typedef struct ITfTextInputProcessorVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfTextInputProcessor* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfTextInputProcessor* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfTextInputProcessor* This);

    /*** ITfTextInputProcessor methods ***/
    HRESULT (STDMETHODCALLTYPE *Activate)(
        ITfTextInputProcessor* This,
        ITfThreadMgr *ptim,
        TfClientId tid);

    HRESULT (STDMETHODCALLTYPE *Deactivate)(
        ITfTextInputProcessor* This);

    END_INTERFACE
} ITfTextInputProcessorVtbl;
interface ITfTextInputProcessor {
    CONST_VTBL ITfTextInputProcessorVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfTextInputProcessor_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfTextInputProcessor_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfTextInputProcessor_Release(This) (This)->lpVtbl->Release(This)
/*** ITfTextInputProcessor methods ***/
#define ITfTextInputProcessor_Activate(This,ptim,tid) (This)->lpVtbl->Activate(This,ptim,tid)
#define ITfTextInputProcessor_Deactivate(This) (This)->lpVtbl->Deactivate(This)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfTextInputProcessor_Activate_Proxy(
    ITfTextInputProcessor* This,
    ITfThreadMgr *ptim,
    TfClientId tid);
void __RPC_STUB ITfTextInputProcessor_Activate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfTextInputProcessor_Deactivate_Proxy(
    ITfTextInputProcessor* This);
void __RPC_STUB ITfTextInputProcessor_Deactivate_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfTextInputProcessor_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfThreadMgrEventSink interface
 */
#ifndef __ITfThreadMgrEventSink_INTERFACE_DEFINED__
#define __ITfThreadMgrEventSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfThreadMgrEventSink, 0xaa80e80e, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfThreadMgrEventSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnInitDocumentMgr(
        ITfDocumentMgr *pdim) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnUninitDocumentMgr(
        ITfDocumentMgr *pdim) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnSetFocus(
        ITfDocumentMgr *pdimFocus,
        ITfDocumentMgr *pdimPrevFocus) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnPushContext(
        ITfContext *pic) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnPopContext(
        ITfContext *pic) = 0;

};
#else
typedef struct ITfThreadMgrEventSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfThreadMgrEventSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfThreadMgrEventSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfThreadMgrEventSink* This);

    /*** ITfThreadMgrEventSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnInitDocumentMgr)(
        ITfThreadMgrEventSink* This,
        ITfDocumentMgr *pdim);

    HRESULT (STDMETHODCALLTYPE *OnUninitDocumentMgr)(
        ITfThreadMgrEventSink* This,
        ITfDocumentMgr *pdim);

    HRESULT (STDMETHODCALLTYPE *OnSetFocus)(
        ITfThreadMgrEventSink* This,
        ITfDocumentMgr *pdimFocus,
        ITfDocumentMgr *pdimPrevFocus);

    HRESULT (STDMETHODCALLTYPE *OnPushContext)(
        ITfThreadMgrEventSink* This,
        ITfContext *pic);

    HRESULT (STDMETHODCALLTYPE *OnPopContext)(
        ITfThreadMgrEventSink* This,
        ITfContext *pic);

    END_INTERFACE
} ITfThreadMgrEventSinkVtbl;
interface ITfThreadMgrEventSink {
    CONST_VTBL ITfThreadMgrEventSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfThreadMgrEventSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfThreadMgrEventSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfThreadMgrEventSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfThreadMgrEventSink methods ***/
#define ITfThreadMgrEventSink_OnInitDocumentMgr(This,pdim) (This)->lpVtbl->OnInitDocumentMgr(This,pdim)
#define ITfThreadMgrEventSink_OnUninitDocumentMgr(This,pdim) (This)->lpVtbl->OnUninitDocumentMgr(This,pdim)
#define ITfThreadMgrEventSink_OnSetFocus(This,pdimFocus,pdimPrevFocus) (This)->lpVtbl->OnSetFocus(This,pdimFocus,pdimPrevFocus)
#define ITfThreadMgrEventSink_OnPushContext(This,pic) (This)->lpVtbl->OnPushContext(This,pic)
#define ITfThreadMgrEventSink_OnPopContext(This,pic) (This)->lpVtbl->OnPopContext(This,pic)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfThreadMgrEventSink_OnInitDocumentMgr_Proxy(
    ITfThreadMgrEventSink* This,
    ITfDocumentMgr *pdim);
void __RPC_STUB ITfThreadMgrEventSink_OnInitDocumentMgr_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgrEventSink_OnUninitDocumentMgr_Proxy(
    ITfThreadMgrEventSink* This,
    ITfDocumentMgr *pdim);
void __RPC_STUB ITfThreadMgrEventSink_OnUninitDocumentMgr_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgrEventSink_OnSetFocus_Proxy(
    ITfThreadMgrEventSink* This,
    ITfDocumentMgr *pdimFocus,
    ITfDocumentMgr *pdimPrevFocus);
void __RPC_STUB ITfThreadMgrEventSink_OnSetFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgrEventSink_OnPushContext_Proxy(
    ITfThreadMgrEventSink* This,
    ITfContext *pic);
void __RPC_STUB ITfThreadMgrEventSink_OnPushContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadMgrEventSink_OnPopContext_Proxy(
    ITfThreadMgrEventSink* This,
    ITfContext *pic);
void __RPC_STUB ITfThreadMgrEventSink_OnPopContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfThreadMgrEventSink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfKeystrokeMgr interface
 */
#ifndef __ITfKeystrokeMgr_INTERFACE_DEFINED__
#define __ITfKeystrokeMgr_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfKeystrokeMgr, 0xaa80e7f0, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfKeystrokeMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE AdviseKeyEventSink(
        TfClientId tid,
        ITfKeyEventSink *pSink,
        BOOL fForeground) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnadviseKeyEventSink(
        TfClientId tid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetForeground(
        CLSID *pclsid) = 0;

    virtual HRESULT STDMETHODCALLTYPE TestKeyDown(
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE TestKeyUp(
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE KeyDown(
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE KeyUp(
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPreservedKey(
        ITfContext *pic,
        const TF_PRESERVEDKEY *pprekey,
        GUID *pguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsPreservedKey(
        REFGUID rguid,
        const TF_PRESERVEDKEY *pprekey,
        BOOL *pfRegistered) = 0;

    virtual HRESULT STDMETHODCALLTYPE PreserveKey(
        TfClientId tid,
        REFGUID rguid,
        const TF_PRESERVEDKEY *prekey,
        const WCHAR *pchDesc,
        ULONG cchDesc) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnpreserveKey(
        REFGUID rguid,
        const TF_PRESERVEDKEY *pprekey) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPreservedKeyDescription(
        REFGUID rguid,
        const WCHAR *pchDesc,
        ULONG cchDesc) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPreservedKeyDescription(
        REFGUID rguid,
        BSTR *pbstrDesc) = 0;

    virtual HRESULT STDMETHODCALLTYPE SimulatePreservedKey(
        ITfContext *pic,
        REFGUID rguid,
        BOOL *pfEaten) = 0;

};
#else
typedef struct ITfKeystrokeMgrVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfKeystrokeMgr* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfKeystrokeMgr* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfKeystrokeMgr* This);

    /*** ITfKeystrokeMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *AdviseKeyEventSink)(
        ITfKeystrokeMgr* This,
        TfClientId tid,
        ITfKeyEventSink *pSink,
        BOOL fForeground);

    HRESULT (STDMETHODCALLTYPE *UnadviseKeyEventSink)(
        ITfKeystrokeMgr* This,
        TfClientId tid);

    HRESULT (STDMETHODCALLTYPE *GetForeground)(
        ITfKeystrokeMgr* This,
        CLSID *pclsid);

    HRESULT (STDMETHODCALLTYPE *TestKeyDown)(
        ITfKeystrokeMgr* This,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *TestKeyUp)(
        ITfKeystrokeMgr* This,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *KeyDown)(
        ITfKeystrokeMgr* This,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *KeyUp)(
        ITfKeystrokeMgr* This,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *GetPreservedKey)(
        ITfKeystrokeMgr* This,
        ITfContext *pic,
        const TF_PRESERVEDKEY *pprekey,
        GUID *pguid);

    HRESULT (STDMETHODCALLTYPE *IsPreservedKey)(
        ITfKeystrokeMgr* This,
        REFGUID rguid,
        const TF_PRESERVEDKEY *pprekey,
        BOOL *pfRegistered);

    HRESULT (STDMETHODCALLTYPE *PreserveKey)(
        ITfKeystrokeMgr* This,
        TfClientId tid,
        REFGUID rguid,
        const TF_PRESERVEDKEY *prekey,
        const WCHAR *pchDesc,
        ULONG cchDesc);

    HRESULT (STDMETHODCALLTYPE *UnpreserveKey)(
        ITfKeystrokeMgr* This,
        REFGUID rguid,
        const TF_PRESERVEDKEY *pprekey);

    HRESULT (STDMETHODCALLTYPE *SetPreservedKeyDescription)(
        ITfKeystrokeMgr* This,
        REFGUID rguid,
        const WCHAR *pchDesc,
        ULONG cchDesc);

    HRESULT (STDMETHODCALLTYPE *GetPreservedKeyDescription)(
        ITfKeystrokeMgr* This,
        REFGUID rguid,
        BSTR *pbstrDesc);

    HRESULT (STDMETHODCALLTYPE *SimulatePreservedKey)(
        ITfKeystrokeMgr* This,
        ITfContext *pic,
        REFGUID rguid,
        BOOL *pfEaten);

    END_INTERFACE
} ITfKeystrokeMgrVtbl;
interface ITfKeystrokeMgr {
    CONST_VTBL ITfKeystrokeMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfKeystrokeMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfKeystrokeMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfKeystrokeMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfKeystrokeMgr methods ***/
#define ITfKeystrokeMgr_AdviseKeyEventSink(This,tid,pSink,fForeground) (This)->lpVtbl->AdviseKeyEventSink(This,tid,pSink,fForeground)
#define ITfKeystrokeMgr_UnadviseKeyEventSink(This,tid) (This)->lpVtbl->UnadviseKeyEventSink(This,tid)
#define ITfKeystrokeMgr_GetForeground(This,pclsid) (This)->lpVtbl->GetForeground(This,pclsid)
#define ITfKeystrokeMgr_TestKeyDown(This,wParam,lParam,pfEaten) (This)->lpVtbl->TestKeyDown(This,wParam,lParam,pfEaten)
#define ITfKeystrokeMgr_TestKeyUp(This,wParam,lParam,pfEaten) (This)->lpVtbl->TestKeyUp(This,wParam,lParam,pfEaten)
#define ITfKeystrokeMgr_KeyDown(This,wParam,lParam,pfEaten) (This)->lpVtbl->KeyDown(This,wParam,lParam,pfEaten)
#define ITfKeystrokeMgr_KeyUp(This,wParam,lParam,pfEaten) (This)->lpVtbl->KeyUp(This,wParam,lParam,pfEaten)
#define ITfKeystrokeMgr_GetPreservedKey(This,pic,pprekey,pguid) (This)->lpVtbl->GetPreservedKey(This,pic,pprekey,pguid)
#define ITfKeystrokeMgr_IsPreservedKey(This,rguid,pprekey,pfRegistered) (This)->lpVtbl->IsPreservedKey(This,rguid,pprekey,pfRegistered)
#define ITfKeystrokeMgr_PreserveKey(This,tid,rguid,prekey,pchDesc,cchDesc) (This)->lpVtbl->PreserveKey(This,tid,rguid,prekey,pchDesc,cchDesc)
#define ITfKeystrokeMgr_UnpreserveKey(This,rguid,pprekey) (This)->lpVtbl->UnpreserveKey(This,rguid,pprekey)
#define ITfKeystrokeMgr_SetPreservedKeyDescription(This,rguid,pchDesc,cchDesc) (This)->lpVtbl->SetPreservedKeyDescription(This,rguid,pchDesc,cchDesc)
#define ITfKeystrokeMgr_GetPreservedKeyDescription(This,rguid,pbstrDesc) (This)->lpVtbl->GetPreservedKeyDescription(This,rguid,pbstrDesc)
#define ITfKeystrokeMgr_SimulatePreservedKey(This,pic,rguid,pfEaten) (This)->lpVtbl->SimulatePreservedKey(This,pic,rguid,pfEaten)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_AdviseKeyEventSink_Proxy(
    ITfKeystrokeMgr* This,
    TfClientId tid,
    ITfKeyEventSink *pSink,
    BOOL fForeground);
void __RPC_STUB ITfKeystrokeMgr_AdviseKeyEventSink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_UnadviseKeyEventSink_Proxy(
    ITfKeystrokeMgr* This,
    TfClientId tid);
void __RPC_STUB ITfKeystrokeMgr_UnadviseKeyEventSink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_GetForeground_Proxy(
    ITfKeystrokeMgr* This,
    CLSID *pclsid);
void __RPC_STUB ITfKeystrokeMgr_GetForeground_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_TestKeyDown_Proxy(
    ITfKeystrokeMgr* This,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeystrokeMgr_TestKeyDown_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_TestKeyUp_Proxy(
    ITfKeystrokeMgr* This,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeystrokeMgr_TestKeyUp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_KeyDown_Proxy(
    ITfKeystrokeMgr* This,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeystrokeMgr_KeyDown_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_KeyUp_Proxy(
    ITfKeystrokeMgr* This,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeystrokeMgr_KeyUp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_GetPreservedKey_Proxy(
    ITfKeystrokeMgr* This,
    ITfContext *pic,
    const TF_PRESERVEDKEY *pprekey,
    GUID *pguid);
void __RPC_STUB ITfKeystrokeMgr_GetPreservedKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_IsPreservedKey_Proxy(
    ITfKeystrokeMgr* This,
    REFGUID rguid,
    const TF_PRESERVEDKEY *pprekey,
    BOOL *pfRegistered);
void __RPC_STUB ITfKeystrokeMgr_IsPreservedKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_PreserveKey_Proxy(
    ITfKeystrokeMgr* This,
    TfClientId tid,
    REFGUID rguid,
    const TF_PRESERVEDKEY *prekey,
    const WCHAR *pchDesc,
    ULONG cchDesc);
void __RPC_STUB ITfKeystrokeMgr_PreserveKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_UnpreserveKey_Proxy(
    ITfKeystrokeMgr* This,
    REFGUID rguid,
    const TF_PRESERVEDKEY *pprekey);
void __RPC_STUB ITfKeystrokeMgr_UnpreserveKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_SetPreservedKeyDescription_Proxy(
    ITfKeystrokeMgr* This,
    REFGUID rguid,
    const WCHAR *pchDesc,
    ULONG cchDesc);
void __RPC_STUB ITfKeystrokeMgr_SetPreservedKeyDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_GetPreservedKeyDescription_Proxy(
    ITfKeystrokeMgr* This,
    REFGUID rguid,
    BSTR *pbstrDesc);
void __RPC_STUB ITfKeystrokeMgr_GetPreservedKeyDescription_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeystrokeMgr_SimulatePreservedKey_Proxy(
    ITfKeystrokeMgr* This,
    ITfContext *pic,
    REFGUID rguid,
    BOOL *pfEaten);
void __RPC_STUB ITfKeystrokeMgr_SimulatePreservedKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfKeystrokeMgr_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfKeyEventSink interface
 */
#ifndef __ITfKeyEventSink_INTERFACE_DEFINED__
#define __ITfKeyEventSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfKeyEventSink, 0xaa80e7f5, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfKeyEventSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnSetFocus(
        BOOL fForeground) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnTestKeyDown(
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnTestKeyUp(
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnKeyDown(
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnKeyUp(
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnPreservedKey(
        ITfContext *pic,
        REFGUID rguid,
        BOOL *pfEaten) = 0;

};
#else
typedef struct ITfKeyEventSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfKeyEventSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfKeyEventSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfKeyEventSink* This);

    /*** ITfKeyEventSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnSetFocus)(
        ITfKeyEventSink* This,
        BOOL fForeground);

    HRESULT (STDMETHODCALLTYPE *OnTestKeyDown)(
        ITfKeyEventSink* This,
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *OnTestKeyUp)(
        ITfKeyEventSink* This,
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *OnKeyDown)(
        ITfKeyEventSink* This,
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *OnKeyUp)(
        ITfKeyEventSink* This,
        ITfContext *pic,
        WPARAM wParam,
        LPARAM lParam,
        BOOL *pfEaten);

    HRESULT (STDMETHODCALLTYPE *OnPreservedKey)(
        ITfKeyEventSink* This,
        ITfContext *pic,
        REFGUID rguid,
        BOOL *pfEaten);

    END_INTERFACE
} ITfKeyEventSinkVtbl;
interface ITfKeyEventSink {
    CONST_VTBL ITfKeyEventSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfKeyEventSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfKeyEventSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfKeyEventSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfKeyEventSink methods ***/
#define ITfKeyEventSink_OnSetFocus(This,fForeground) (This)->lpVtbl->OnSetFocus(This,fForeground)
#define ITfKeyEventSink_OnTestKeyDown(This,pic,wParam,lParam,pfEaten) (This)->lpVtbl->OnTestKeyDown(This,pic,wParam,lParam,pfEaten)
#define ITfKeyEventSink_OnTestKeyUp(This,pic,wParam,lParam,pfEaten) (This)->lpVtbl->OnTestKeyUp(This,pic,wParam,lParam,pfEaten)
#define ITfKeyEventSink_OnKeyDown(This,pic,wParam,lParam,pfEaten) (This)->lpVtbl->OnKeyDown(This,pic,wParam,lParam,pfEaten)
#define ITfKeyEventSink_OnKeyUp(This,pic,wParam,lParam,pfEaten) (This)->lpVtbl->OnKeyUp(This,pic,wParam,lParam,pfEaten)
#define ITfKeyEventSink_OnPreservedKey(This,pic,rguid,pfEaten) (This)->lpVtbl->OnPreservedKey(This,pic,rguid,pfEaten)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfKeyEventSink_OnSetFocus_Proxy(
    ITfKeyEventSink* This,
    BOOL fForeground);
void __RPC_STUB ITfKeyEventSink_OnSetFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeyEventSink_OnTestKeyDown_Proxy(
    ITfKeyEventSink* This,
    ITfContext *pic,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeyEventSink_OnTestKeyDown_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeyEventSink_OnTestKeyUp_Proxy(
    ITfKeyEventSink* This,
    ITfContext *pic,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeyEventSink_OnTestKeyUp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeyEventSink_OnKeyDown_Proxy(
    ITfKeyEventSink* This,
    ITfContext *pic,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeyEventSink_OnKeyDown_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeyEventSink_OnKeyUp_Proxy(
    ITfKeyEventSink* This,
    ITfContext *pic,
    WPARAM wParam,
    LPARAM lParam,
    BOOL *pfEaten);
void __RPC_STUB ITfKeyEventSink_OnKeyUp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfKeyEventSink_OnPreservedKey_Proxy(
    ITfKeyEventSink* This,
    ITfContext *pic,
    REFGUID rguid,
    BOOL *pfEaten);
void __RPC_STUB ITfKeyEventSink_OnPreservedKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfKeyEventSink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfMessagePump interface
 */
#ifndef __ITfMessagePump_INTERFACE_DEFINED__
#define __ITfMessagePump_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfMessagePump, 0x8f1b8ad8, 0x0b6b, 0x4874, 0x90,0xc5, 0xbd,0x76,0x01,0x1e,0x8f,0x7c);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfMessagePump : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE PeekMessageA(
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        UINT wRemoveMsg,
        BOOL *pfResult) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMessageA(
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        BOOL *pfResult) = 0;

    virtual HRESULT STDMETHODCALLTYPE PeekMessageW(
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        UINT wRemoveMsg,
        BOOL *pfResult) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMessageW(
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        BOOL *pfResult) = 0;

};
#else
typedef struct ITfMessagePumpVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfMessagePump* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfMessagePump* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfMessagePump* This);

    /*** ITfMessagePump methods ***/
    HRESULT (STDMETHODCALLTYPE *PeekMessageA)(
        ITfMessagePump* This,
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        UINT wRemoveMsg,
        BOOL *pfResult);

    HRESULT (STDMETHODCALLTYPE *GetMessageA)(
        ITfMessagePump* This,
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        BOOL *pfResult);

    HRESULT (STDMETHODCALLTYPE *PeekMessageW)(
        ITfMessagePump* This,
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        UINT wRemoveMsg,
        BOOL *pfResult);

    HRESULT (STDMETHODCALLTYPE *GetMessageW)(
        ITfMessagePump* This,
        LPMSG pMsg,
        HWND hwnd,
        UINT wMsgFilterMin,
        UINT wMsgFilterMax,
        BOOL *pfResult);

    END_INTERFACE
} ITfMessagePumpVtbl;
interface ITfMessagePump {
    CONST_VTBL ITfMessagePumpVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfMessagePump_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfMessagePump_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfMessagePump_Release(This) (This)->lpVtbl->Release(This)
/*** ITfMessagePump methods ***/
#define ITfMessagePump_PeekMessageA(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg,pfResult) (This)->lpVtbl->PeekMessageA(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg,pfResult)
#define ITfMessagePump_GetMessageA(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,pfResult) (This)->lpVtbl->GetMessageA(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,pfResult)
#define ITfMessagePump_PeekMessageW(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg,pfResult) (This)->lpVtbl->PeekMessageW(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg,pfResult)
#define ITfMessagePump_GetMessageW(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,pfResult) (This)->lpVtbl->GetMessageW(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,pfResult)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfMessagePump_PeekMessageA_Proxy(
    ITfMessagePump* This,
    LPMSG pMsg,
    HWND hwnd,
    UINT wMsgFilterMin,
    UINT wMsgFilterMax,
    UINT wRemoveMsg,
    BOOL *pfResult);
void __RPC_STUB ITfMessagePump_PeekMessageA_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfMessagePump_GetMessageA_Proxy(
    ITfMessagePump* This,
    LPMSG pMsg,
    HWND hwnd,
    UINT wMsgFilterMin,
    UINT wMsgFilterMax,
    BOOL *pfResult);
void __RPC_STUB ITfMessagePump_GetMessageA_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfMessagePump_PeekMessageW_Proxy(
    ITfMessagePump* This,
    LPMSG pMsg,
    HWND hwnd,
    UINT wMsgFilterMin,
    UINT wMsgFilterMax,
    UINT wRemoveMsg,
    BOOL *pfResult);
void __RPC_STUB ITfMessagePump_PeekMessageW_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfMessagePump_GetMessageW_Proxy(
    ITfMessagePump* This,
    LPMSG pMsg,
    HWND hwnd,
    UINT wMsgFilterMin,
    UINT wMsgFilterMax,
    BOOL *pfResult);
void __RPC_STUB ITfMessagePump_GetMessageW_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfMessagePump_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfClientId interface
 */
#ifndef __ITfClientId_INTERFACE_DEFINED__
#define __ITfClientId_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfClientId, 0xd60a7b49, 0x1b9f, 0x4be2, 0xb7,0x02, 0x47,0xe9,0xdc,0x05,0xde,0xc3);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfClientId : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetClientId(
        REFCLSID rclsid,
        TfClientId *ptid) = 0;

};
#else
typedef struct ITfClientIdVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfClientId* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfClientId* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfClientId* This);

    /*** ITfClientId methods ***/
    HRESULT (STDMETHODCALLTYPE *GetClientId)(
        ITfClientId* This,
        REFCLSID rclsid,
        TfClientId *ptid);

    END_INTERFACE
} ITfClientIdVtbl;
interface ITfClientId {
    CONST_VTBL ITfClientIdVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfClientId_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfClientId_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfClientId_Release(This) (This)->lpVtbl->Release(This)
/*** ITfClientId methods ***/
#define ITfClientId_GetClientId(This,rclsid,ptid) (This)->lpVtbl->GetClientId(This,rclsid,ptid)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfClientId_GetClientId_Proxy(
    ITfClientId* This,
    REFCLSID rclsid,
    TfClientId *ptid);
void __RPC_STUB ITfClientId_GetClientId_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfClientId_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfLanguageProfileNotifySink interface
 */
#ifndef __ITfLanguageProfileNotifySink_INTERFACE_DEFINED__
#define __ITfLanguageProfileNotifySink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfLanguageProfileNotifySink, 0x43c9fe15, 0xf494, 0x4c17, 0x9d,0xe2, 0xb8,0xa4,0xac,0x35,0x0a,0xa8);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfLanguageProfileNotifySink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnLanguageChange(
        LANGID langid,
        BOOL *pfAccept) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnLanguageChanged(
        ) = 0;

};
#else
typedef struct ITfLanguageProfileNotifySinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfLanguageProfileNotifySink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfLanguageProfileNotifySink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfLanguageProfileNotifySink* This);

    /*** ITfLanguageProfileNotifySink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnLanguageChange)(
        ITfLanguageProfileNotifySink* This,
        LANGID langid,
        BOOL *pfAccept);

    HRESULT (STDMETHODCALLTYPE *OnLanguageChanged)(
        ITfLanguageProfileNotifySink* This);

    END_INTERFACE
} ITfLanguageProfileNotifySinkVtbl;
interface ITfLanguageProfileNotifySink {
    CONST_VTBL ITfLanguageProfileNotifySinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfLanguageProfileNotifySink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfLanguageProfileNotifySink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfLanguageProfileNotifySink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfLanguageProfileNotifySink methods ***/
#define ITfLanguageProfileNotifySink_OnLanguageChange(This,langid,pfAccept) (This)->lpVtbl->OnLanguageChange(This,langid,pfAccept)
#define ITfLanguageProfileNotifySink_OnLanguageChanged(This) (This)->lpVtbl->OnLanguageChanged(This)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfLanguageProfileNotifySink_OnLanguageChange_Proxy(
    ITfLanguageProfileNotifySink* This,
    LANGID langid,
    BOOL *pfAccept);
void __RPC_STUB ITfLanguageProfileNotifySink_OnLanguageChange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfLanguageProfileNotifySink_OnLanguageChanged_Proxy(
    ITfLanguageProfileNotifySink* This);
void __RPC_STUB ITfLanguageProfileNotifySink_OnLanguageChanged_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfLanguageProfileNotifySink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfEditSession interface
 */
#ifndef __ITfEditSession_INTERFACE_DEFINED__
#define __ITfEditSession_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfEditSession, 0xaa80e803, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfEditSession : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE DoEditSession(
        TfEditCookie ec) = 0;

};
#else
typedef struct ITfEditSessionVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfEditSession* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfEditSession* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfEditSession* This);

    /*** ITfEditSession methods ***/
    HRESULT (STDMETHODCALLTYPE *DoEditSession)(
        ITfEditSession* This,
        TfEditCookie ec);

    END_INTERFACE
} ITfEditSessionVtbl;
interface ITfEditSession {
    CONST_VTBL ITfEditSessionVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfEditSession_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfEditSession_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfEditSession_Release(This) (This)->lpVtbl->Release(This)
/*** ITfEditSession methods ***/
#define ITfEditSession_DoEditSession(This,ec) (This)->lpVtbl->DoEditSession(This,ec)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfEditSession_DoEditSession_Proxy(
    ITfEditSession* This,
    TfEditCookie ec);
void __RPC_STUB ITfEditSession_DoEditSession_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfEditSession_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfRange interface
 */
#ifndef __ITfRange_INTERFACE_DEFINED__
#define __ITfRange_INTERFACE_DEFINED__

#define TF_CHAR_EMBEDDED (TS_CHAR_EMBEDDED)

typedef enum __WIDL_msctf_generated_name_00000005 {
    TF_GRAVITY_BACKWARD = 0,
    TF_GRAVITY_FORWARD = 1
} TfGravity;
typedef enum __WIDL_msctf_generated_name_00000006 {
    TF_SD_BACKWARD = 0,
    TF_SD_FORWARD = 1
} TfShiftDir;
#define TF_HF_OBJECT (1)

#define TF_TF_MOVESTART (1)

#define TF_TF_IGNOREEND (2)

#define TF_ST_CORRECTION (1)

#define TF_IE_CORRECTION (1)

typedef struct TF_HALTCOND {
    ITfRange *pHaltRange;
    TfAnchor aHaltPos;
    DWORD dwFlags;
} TF_HALTCOND;
DEFINE_GUID(IID_ITfRange, 0xaa80e7ff, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfRange : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetText(
        TfEditCookie ec,
        DWORD dwFlags,
        WCHAR *pchText,
        ULONG cchMax,
        ULONG *pcch) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetText(
        TfEditCookie ec,
        DWORD dwFlags,
        const WCHAR *pchText,
        LONG cch) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFormattedText(
        TfEditCookie ec,
        IDataObject **ppDataObject) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEmbedded(
        TfEditCookie ec,
        REFGUID rguidService,
        REFIID riid,
        IUnknown **ppunk) = 0;

    virtual HRESULT STDMETHODCALLTYPE InsertEmbedded(
        TfEditCookie ec,
        DWORD dwFlags,
        IDataObject *pDataObject) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftStart(
        TfEditCookie ec,
        LONG cchReq,
        LONG *pcch,
        const TF_HALTCOND *pHalt) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftEnd(
        TfEditCookie ec,
        LONG cchReq,
        LONG *pcch,
        const TF_HALTCOND *pHalt) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftStartToRange(
        TfEditCookie ec,
        ITfRange *pRange,
        TfAnchor aPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftEndToRange(
        TfEditCookie ec,
        ITfRange *pRange,
        TfAnchor aPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftStartRegion(
        TfEditCookie ec,
        TfShiftDir dir,
        BOOL *pfNoRegion) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftEndRegion(
        TfEditCookie ec,
        TfShiftDir dir,
        BOOL *pfNoRegion) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEmpty(
        TfEditCookie ec,
        BOOL *pfEmpty) = 0;

    virtual HRESULT STDMETHODCALLTYPE Collapse(
        TfEditCookie ec,
        TfAnchor aPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqualStart(
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        BOOL *pfEqual) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqualEnd(
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        BOOL *pfEqual) = 0;

    virtual HRESULT STDMETHODCALLTYPE CompareStart(
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        LONG *plResult) = 0;

    virtual HRESULT STDMETHODCALLTYPE CompareEnd(
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        LONG *plResult) = 0;

    virtual HRESULT STDMETHODCALLTYPE AdjustForInsert(
        TfEditCookie ec,
        ULONG cchInsert,
        BOOL *pfInsertOk) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGravity(
        TfGravity *pgStart,
        TfGravity *pgEnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetGravity(
        TfEditCookie ec,
        TfGravity gStart,
        TfGravity gEnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE Clone(
        ITfRange **ppClone) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetContext(
        ITfContext **ppContext) = 0;

};
#else
typedef struct ITfRangeVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfRange* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfRange* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfRange* This);

    /*** ITfRange methods ***/
    HRESULT (STDMETHODCALLTYPE *GetText)(
        ITfRange* This,
        TfEditCookie ec,
        DWORD dwFlags,
        WCHAR *pchText,
        ULONG cchMax,
        ULONG *pcch);

    HRESULT (STDMETHODCALLTYPE *SetText)(
        ITfRange* This,
        TfEditCookie ec,
        DWORD dwFlags,
        const WCHAR *pchText,
        LONG cch);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText)(
        ITfRange* This,
        TfEditCookie ec,
        IDataObject **ppDataObject);

    HRESULT (STDMETHODCALLTYPE *GetEmbedded)(
        ITfRange* This,
        TfEditCookie ec,
        REFGUID rguidService,
        REFIID riid,
        IUnknown **ppunk);

    HRESULT (STDMETHODCALLTYPE *InsertEmbedded)(
        ITfRange* This,
        TfEditCookie ec,
        DWORD dwFlags,
        IDataObject *pDataObject);

    HRESULT (STDMETHODCALLTYPE *ShiftStart)(
        ITfRange* This,
        TfEditCookie ec,
        LONG cchReq,
        LONG *pcch,
        const TF_HALTCOND *pHalt);

    HRESULT (STDMETHODCALLTYPE *ShiftEnd)(
        ITfRange* This,
        TfEditCookie ec,
        LONG cchReq,
        LONG *pcch,
        const TF_HALTCOND *pHalt);

    HRESULT (STDMETHODCALLTYPE *ShiftStartToRange)(
        ITfRange* This,
        TfEditCookie ec,
        ITfRange *pRange,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *ShiftEndToRange)(
        ITfRange* This,
        TfEditCookie ec,
        ITfRange *pRange,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *ShiftStartRegion)(
        ITfRange* This,
        TfEditCookie ec,
        TfShiftDir dir,
        BOOL *pfNoRegion);

    HRESULT (STDMETHODCALLTYPE *ShiftEndRegion)(
        ITfRange* This,
        TfEditCookie ec,
        TfShiftDir dir,
        BOOL *pfNoRegion);

    HRESULT (STDMETHODCALLTYPE *IsEmpty)(
        ITfRange* This,
        TfEditCookie ec,
        BOOL *pfEmpty);

    HRESULT (STDMETHODCALLTYPE *Collapse)(
        ITfRange* This,
        TfEditCookie ec,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *IsEqualStart)(
        ITfRange* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        BOOL *pfEqual);

    HRESULT (STDMETHODCALLTYPE *IsEqualEnd)(
        ITfRange* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        BOOL *pfEqual);

    HRESULT (STDMETHODCALLTYPE *CompareStart)(
        ITfRange* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        LONG *plResult);

    HRESULT (STDMETHODCALLTYPE *CompareEnd)(
        ITfRange* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        LONG *plResult);

    HRESULT (STDMETHODCALLTYPE *AdjustForInsert)(
        ITfRange* This,
        TfEditCookie ec,
        ULONG cchInsert,
        BOOL *pfInsertOk);

    HRESULT (STDMETHODCALLTYPE *GetGravity)(
        ITfRange* This,
        TfGravity *pgStart,
        TfGravity *pgEnd);

    HRESULT (STDMETHODCALLTYPE *SetGravity)(
        ITfRange* This,
        TfEditCookie ec,
        TfGravity gStart,
        TfGravity gEnd);

    HRESULT (STDMETHODCALLTYPE *Clone)(
        ITfRange* This,
        ITfRange **ppClone);

    HRESULT (STDMETHODCALLTYPE *GetContext)(
        ITfRange* This,
        ITfContext **ppContext);

    END_INTERFACE
} ITfRangeVtbl;
interface ITfRange {
    CONST_VTBL ITfRangeVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfRange_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfRange_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfRange_Release(This) (This)->lpVtbl->Release(This)
/*** ITfRange methods ***/
#define ITfRange_GetText(This,ec,dwFlags,pchText,cchMax,pcch) (This)->lpVtbl->GetText(This,ec,dwFlags,pchText,cchMax,pcch)
#define ITfRange_SetText(This,ec,dwFlags,pchText,cch) (This)->lpVtbl->SetText(This,ec,dwFlags,pchText,cch)
#define ITfRange_GetFormattedText(This,ec,ppDataObject) (This)->lpVtbl->GetFormattedText(This,ec,ppDataObject)
#define ITfRange_GetEmbedded(This,ec,rguidService,riid,ppunk) (This)->lpVtbl->GetEmbedded(This,ec,rguidService,riid,ppunk)
#define ITfRange_InsertEmbedded(This,ec,dwFlags,pDataObject) (This)->lpVtbl->InsertEmbedded(This,ec,dwFlags,pDataObject)
#define ITfRange_ShiftStart(This,ec,cchReq,pcch,pHalt) (This)->lpVtbl->ShiftStart(This,ec,cchReq,pcch,pHalt)
#define ITfRange_ShiftEnd(This,ec,cchReq,pcch,pHalt) (This)->lpVtbl->ShiftEnd(This,ec,cchReq,pcch,pHalt)
#define ITfRange_ShiftStartToRange(This,ec,pRange,aPos) (This)->lpVtbl->ShiftStartToRange(This,ec,pRange,aPos)
#define ITfRange_ShiftEndToRange(This,ec,pRange,aPos) (This)->lpVtbl->ShiftEndToRange(This,ec,pRange,aPos)
#define ITfRange_ShiftStartRegion(This,ec,dir,pfNoRegion) (This)->lpVtbl->ShiftStartRegion(This,ec,dir,pfNoRegion)
#define ITfRange_ShiftEndRegion(This,ec,dir,pfNoRegion) (This)->lpVtbl->ShiftEndRegion(This,ec,dir,pfNoRegion)
#define ITfRange_IsEmpty(This,ec,pfEmpty) (This)->lpVtbl->IsEmpty(This,ec,pfEmpty)
#define ITfRange_Collapse(This,ec,aPos) (This)->lpVtbl->Collapse(This,ec,aPos)
#define ITfRange_IsEqualStart(This,ec,pWith,aPos,pfEqual) (This)->lpVtbl->IsEqualStart(This,ec,pWith,aPos,pfEqual)
#define ITfRange_IsEqualEnd(This,ec,pWith,aPos,pfEqual) (This)->lpVtbl->IsEqualEnd(This,ec,pWith,aPos,pfEqual)
#define ITfRange_CompareStart(This,ec,pWith,aPos,plResult) (This)->lpVtbl->CompareStart(This,ec,pWith,aPos,plResult)
#define ITfRange_CompareEnd(This,ec,pWith,aPos,plResult) (This)->lpVtbl->CompareEnd(This,ec,pWith,aPos,plResult)
#define ITfRange_AdjustForInsert(This,ec,cchInsert,pfInsertOk) (This)->lpVtbl->AdjustForInsert(This,ec,cchInsert,pfInsertOk)
#define ITfRange_GetGravity(This,pgStart,pgEnd) (This)->lpVtbl->GetGravity(This,pgStart,pgEnd)
#define ITfRange_SetGravity(This,ec,gStart,gEnd) (This)->lpVtbl->SetGravity(This,ec,gStart,gEnd)
#define ITfRange_Clone(This,ppClone) (This)->lpVtbl->Clone(This,ppClone)
#define ITfRange_GetContext(This,ppContext) (This)->lpVtbl->GetContext(This,ppContext)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfRange_GetText_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    DWORD dwFlags,
    WCHAR *pchText,
    ULONG cchMax,
    ULONG *pcch);
void __RPC_STUB ITfRange_GetText_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_SetText_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    DWORD dwFlags,
    const WCHAR *pchText,
    LONG cch);
void __RPC_STUB ITfRange_SetText_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_GetFormattedText_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    IDataObject **ppDataObject);
void __RPC_STUB ITfRange_GetFormattedText_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_GetEmbedded_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    REFGUID rguidService,
    REFIID riid,
    IUnknown **ppunk);
void __RPC_STUB ITfRange_GetEmbedded_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_InsertEmbedded_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    DWORD dwFlags,
    IDataObject *pDataObject);
void __RPC_STUB ITfRange_InsertEmbedded_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_ShiftStart_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    LONG cchReq,
    LONG *pcch,
    const TF_HALTCOND *pHalt);
void __RPC_STUB ITfRange_ShiftStart_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_ShiftEnd_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    LONG cchReq,
    LONG *pcch,
    const TF_HALTCOND *pHalt);
void __RPC_STUB ITfRange_ShiftEnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_ShiftStartToRange_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ITfRange *pRange,
    TfAnchor aPos);
void __RPC_STUB ITfRange_ShiftStartToRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_ShiftEndToRange_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ITfRange *pRange,
    TfAnchor aPos);
void __RPC_STUB ITfRange_ShiftEndToRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_ShiftStartRegion_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    TfShiftDir dir,
    BOOL *pfNoRegion);
void __RPC_STUB ITfRange_ShiftStartRegion_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_ShiftEndRegion_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    TfShiftDir dir,
    BOOL *pfNoRegion);
void __RPC_STUB ITfRange_ShiftEndRegion_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_IsEmpty_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    BOOL *pfEmpty);
void __RPC_STUB ITfRange_IsEmpty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_Collapse_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    TfAnchor aPos);
void __RPC_STUB ITfRange_Collapse_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_IsEqualStart_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ITfRange *pWith,
    TfAnchor aPos,
    BOOL *pfEqual);
void __RPC_STUB ITfRange_IsEqualStart_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_IsEqualEnd_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ITfRange *pWith,
    TfAnchor aPos,
    BOOL *pfEqual);
void __RPC_STUB ITfRange_IsEqualEnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_CompareStart_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ITfRange *pWith,
    TfAnchor aPos,
    LONG *plResult);
void __RPC_STUB ITfRange_CompareStart_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_CompareEnd_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ITfRange *pWith,
    TfAnchor aPos,
    LONG *plResult);
void __RPC_STUB ITfRange_CompareEnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_AdjustForInsert_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    ULONG cchInsert,
    BOOL *pfInsertOk);
void __RPC_STUB ITfRange_AdjustForInsert_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_GetGravity_Proxy(
    ITfRange* This,
    TfGravity *pgStart,
    TfGravity *pgEnd);
void __RPC_STUB ITfRange_GetGravity_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_SetGravity_Proxy(
    ITfRange* This,
    TfEditCookie ec,
    TfGravity gStart,
    TfGravity gEnd);
void __RPC_STUB ITfRange_SetGravity_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_Clone_Proxy(
    ITfRange* This,
    ITfRange **ppClone);
void __RPC_STUB ITfRange_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRange_GetContext_Proxy(
    ITfRange* This,
    ITfContext **ppContext);
void __RPC_STUB ITfRange_GetContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfRange_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfRangeACP interface
 */
#ifndef __ITfRangeACP_INTERFACE_DEFINED__
#define __ITfRangeACP_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfRangeACP, 0x057a6296, 0x029b, 0x4154, 0xb7,0x9a, 0x0d,0x46,0x1d,0x4e,0xa9,0x4c);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfRangeACP : public ITfRange
{
    virtual HRESULT STDMETHODCALLTYPE GetExtent(
        LONG *pacpAnchor,
        LONG *pcch) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetExtent(
        LONG acpAnchor,
        LONG cch) = 0;

};
#else
typedef struct ITfRangeACPVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfRangeACP* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfRangeACP* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfRangeACP* This);

    /*** ITfRange methods ***/
    HRESULT (STDMETHODCALLTYPE *GetText)(
        ITfRangeACP* This,
        TfEditCookie ec,
        DWORD dwFlags,
        WCHAR *pchText,
        ULONG cchMax,
        ULONG *pcch);

    HRESULT (STDMETHODCALLTYPE *SetText)(
        ITfRangeACP* This,
        TfEditCookie ec,
        DWORD dwFlags,
        const WCHAR *pchText,
        LONG cch);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText)(
        ITfRangeACP* This,
        TfEditCookie ec,
        IDataObject **ppDataObject);

    HRESULT (STDMETHODCALLTYPE *GetEmbedded)(
        ITfRangeACP* This,
        TfEditCookie ec,
        REFGUID rguidService,
        REFIID riid,
        IUnknown **ppunk);

    HRESULT (STDMETHODCALLTYPE *InsertEmbedded)(
        ITfRangeACP* This,
        TfEditCookie ec,
        DWORD dwFlags,
        IDataObject *pDataObject);

    HRESULT (STDMETHODCALLTYPE *ShiftStart)(
        ITfRangeACP* This,
        TfEditCookie ec,
        LONG cchReq,
        LONG *pcch,
        const TF_HALTCOND *pHalt);

    HRESULT (STDMETHODCALLTYPE *ShiftEnd)(
        ITfRangeACP* This,
        TfEditCookie ec,
        LONG cchReq,
        LONG *pcch,
        const TF_HALTCOND *pHalt);

    HRESULT (STDMETHODCALLTYPE *ShiftStartToRange)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ITfRange *pRange,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *ShiftEndToRange)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ITfRange *pRange,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *ShiftStartRegion)(
        ITfRangeACP* This,
        TfEditCookie ec,
        TfShiftDir dir,
        BOOL *pfNoRegion);

    HRESULT (STDMETHODCALLTYPE *ShiftEndRegion)(
        ITfRangeACP* This,
        TfEditCookie ec,
        TfShiftDir dir,
        BOOL *pfNoRegion);

    HRESULT (STDMETHODCALLTYPE *IsEmpty)(
        ITfRangeACP* This,
        TfEditCookie ec,
        BOOL *pfEmpty);

    HRESULT (STDMETHODCALLTYPE *Collapse)(
        ITfRangeACP* This,
        TfEditCookie ec,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *IsEqualStart)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        BOOL *pfEqual);

    HRESULT (STDMETHODCALLTYPE *IsEqualEnd)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        BOOL *pfEqual);

    HRESULT (STDMETHODCALLTYPE *CompareStart)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        LONG *plResult);

    HRESULT (STDMETHODCALLTYPE *CompareEnd)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ITfRange *pWith,
        TfAnchor aPos,
        LONG *plResult);

    HRESULT (STDMETHODCALLTYPE *AdjustForInsert)(
        ITfRangeACP* This,
        TfEditCookie ec,
        ULONG cchInsert,
        BOOL *pfInsertOk);

    HRESULT (STDMETHODCALLTYPE *GetGravity)(
        ITfRangeACP* This,
        TfGravity *pgStart,
        TfGravity *pgEnd);

    HRESULT (STDMETHODCALLTYPE *SetGravity)(
        ITfRangeACP* This,
        TfEditCookie ec,
        TfGravity gStart,
        TfGravity gEnd);

    HRESULT (STDMETHODCALLTYPE *Clone)(
        ITfRangeACP* This,
        ITfRange **ppClone);

    HRESULT (STDMETHODCALLTYPE *GetContext)(
        ITfRangeACP* This,
        ITfContext **ppContext);

    /*** ITfRangeACP methods ***/
    HRESULT (STDMETHODCALLTYPE *GetExtent)(
        ITfRangeACP* This,
        LONG *pacpAnchor,
        LONG *pcch);

    HRESULT (STDMETHODCALLTYPE *SetExtent)(
        ITfRangeACP* This,
        LONG acpAnchor,
        LONG cch);

    END_INTERFACE
} ITfRangeACPVtbl;
interface ITfRangeACP {
    CONST_VTBL ITfRangeACPVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfRangeACP_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfRangeACP_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfRangeACP_Release(This) (This)->lpVtbl->Release(This)
/*** ITfRange methods ***/
#define ITfRangeACP_GetText(This,ec,dwFlags,pchText,cchMax,pcch) (This)->lpVtbl->GetText(This,ec,dwFlags,pchText,cchMax,pcch)
#define ITfRangeACP_SetText(This,ec,dwFlags,pchText,cch) (This)->lpVtbl->SetText(This,ec,dwFlags,pchText,cch)
#define ITfRangeACP_GetFormattedText(This,ec,ppDataObject) (This)->lpVtbl->GetFormattedText(This,ec,ppDataObject)
#define ITfRangeACP_GetEmbedded(This,ec,rguidService,riid,ppunk) (This)->lpVtbl->GetEmbedded(This,ec,rguidService,riid,ppunk)
#define ITfRangeACP_InsertEmbedded(This,ec,dwFlags,pDataObject) (This)->lpVtbl->InsertEmbedded(This,ec,dwFlags,pDataObject)
#define ITfRangeACP_ShiftStart(This,ec,cchReq,pcch,pHalt) (This)->lpVtbl->ShiftStart(This,ec,cchReq,pcch,pHalt)
#define ITfRangeACP_ShiftEnd(This,ec,cchReq,pcch,pHalt) (This)->lpVtbl->ShiftEnd(This,ec,cchReq,pcch,pHalt)
#define ITfRangeACP_ShiftStartToRange(This,ec,pRange,aPos) (This)->lpVtbl->ShiftStartToRange(This,ec,pRange,aPos)
#define ITfRangeACP_ShiftEndToRange(This,ec,pRange,aPos) (This)->lpVtbl->ShiftEndToRange(This,ec,pRange,aPos)
#define ITfRangeACP_ShiftStartRegion(This,ec,dir,pfNoRegion) (This)->lpVtbl->ShiftStartRegion(This,ec,dir,pfNoRegion)
#define ITfRangeACP_ShiftEndRegion(This,ec,dir,pfNoRegion) (This)->lpVtbl->ShiftEndRegion(This,ec,dir,pfNoRegion)
#define ITfRangeACP_IsEmpty(This,ec,pfEmpty) (This)->lpVtbl->IsEmpty(This,ec,pfEmpty)
#define ITfRangeACP_Collapse(This,ec,aPos) (This)->lpVtbl->Collapse(This,ec,aPos)
#define ITfRangeACP_IsEqualStart(This,ec,pWith,aPos,pfEqual) (This)->lpVtbl->IsEqualStart(This,ec,pWith,aPos,pfEqual)
#define ITfRangeACP_IsEqualEnd(This,ec,pWith,aPos,pfEqual) (This)->lpVtbl->IsEqualEnd(This,ec,pWith,aPos,pfEqual)
#define ITfRangeACP_CompareStart(This,ec,pWith,aPos,plResult) (This)->lpVtbl->CompareStart(This,ec,pWith,aPos,plResult)
#define ITfRangeACP_CompareEnd(This,ec,pWith,aPos,plResult) (This)->lpVtbl->CompareEnd(This,ec,pWith,aPos,plResult)
#define ITfRangeACP_AdjustForInsert(This,ec,cchInsert,pfInsertOk) (This)->lpVtbl->AdjustForInsert(This,ec,cchInsert,pfInsertOk)
#define ITfRangeACP_GetGravity(This,pgStart,pgEnd) (This)->lpVtbl->GetGravity(This,pgStart,pgEnd)
#define ITfRangeACP_SetGravity(This,ec,gStart,gEnd) (This)->lpVtbl->SetGravity(This,ec,gStart,gEnd)
#define ITfRangeACP_Clone(This,ppClone) (This)->lpVtbl->Clone(This,ppClone)
#define ITfRangeACP_GetContext(This,ppContext) (This)->lpVtbl->GetContext(This,ppContext)
/*** ITfRangeACP methods ***/
#define ITfRangeACP_GetExtent(This,pacpAnchor,pcch) (This)->lpVtbl->GetExtent(This,pacpAnchor,pcch)
#define ITfRangeACP_SetExtent(This,acpAnchor,cch) (This)->lpVtbl->SetExtent(This,acpAnchor,cch)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfRangeACP_GetExtent_Proxy(
    ITfRangeACP* This,
    LONG *pacpAnchor,
    LONG *pcch);
void __RPC_STUB ITfRangeACP_GetExtent_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfRangeACP_SetExtent_Proxy(
    ITfRangeACP* This,
    LONG acpAnchor,
    LONG cch);
void __RPC_STUB ITfRangeACP_SetExtent_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfRangeACP_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfInsertAtSelection interface
 */
#ifndef __ITfInsertAtSelection_INTERFACE_DEFINED__
#define __ITfInsertAtSelection_INTERFACE_DEFINED__

#define TF_IAS_NOQUERY (0x1)

#define TF_IAS_QUERYONLY (0x2)

#define TF_IAS_NO_DEFAULT_COMPOSITION (0x80000000)

DEFINE_GUID(IID_ITfInsertAtSelection, 0x55ce16ba, 0x3014, 0x41c1, 0x9c,0xeb, 0xfa,0xde,0x14,0x46,0xac,0x6c);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfInsertAtSelection : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE InsertTextAtSelection(
        TfEditCookie ec,
        DWORD dwFlags,
        const WCHAR *pchText,
        LONG cch,
        ITfRange **ppRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE InsertEmbeddedAtSelection(
        TfEditCookie ec,
        DWORD dwFlags,
        IDataObject *pDataObject,
        ITfRange **ppRange) = 0;

};
#else
typedef struct ITfInsertAtSelectionVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfInsertAtSelection* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfInsertAtSelection* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfInsertAtSelection* This);

    /*** ITfInsertAtSelection methods ***/
    HRESULT (STDMETHODCALLTYPE *InsertTextAtSelection)(
        ITfInsertAtSelection* This,
        TfEditCookie ec,
        DWORD dwFlags,
        const WCHAR *pchText,
        LONG cch,
        ITfRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *InsertEmbeddedAtSelection)(
        ITfInsertAtSelection* This,
        TfEditCookie ec,
        DWORD dwFlags,
        IDataObject *pDataObject,
        ITfRange **ppRange);

    END_INTERFACE
} ITfInsertAtSelectionVtbl;
interface ITfInsertAtSelection {
    CONST_VTBL ITfInsertAtSelectionVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfInsertAtSelection_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfInsertAtSelection_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfInsertAtSelection_Release(This) (This)->lpVtbl->Release(This)
/*** ITfInsertAtSelection methods ***/
#define ITfInsertAtSelection_InsertTextAtSelection(This,ec,dwFlags,pchText,cch,ppRange) (This)->lpVtbl->InsertTextAtSelection(This,ec,dwFlags,pchText,cch,ppRange)
#define ITfInsertAtSelection_InsertEmbeddedAtSelection(This,ec,dwFlags,pDataObject,ppRange) (This)->lpVtbl->InsertEmbeddedAtSelection(This,ec,dwFlags,pDataObject,ppRange)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfInsertAtSelection_InsertTextAtSelection_Proxy(
    ITfInsertAtSelection* This,
    TfEditCookie ec,
    DWORD dwFlags,
    const WCHAR *pchText,
    LONG cch,
    ITfRange **ppRange);
void __RPC_STUB ITfInsertAtSelection_InsertTextAtSelection_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInsertAtSelection_InsertEmbeddedAtSelection_Proxy(
    ITfInsertAtSelection* This,
    TfEditCookie ec,
    DWORD dwFlags,
    IDataObject *pDataObject,
    ITfRange **ppRange);
void __RPC_STUB ITfInsertAtSelection_InsertEmbeddedAtSelection_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfInsertAtSelection_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfPropertyStore interface
 */
#ifndef __ITfPropertyStore_INTERFACE_DEFINED__
#define __ITfPropertyStore_INTERFACE_DEFINED__

#define TF_TU_CORRECTION (0x1)

DEFINE_GUID(IID_ITfPropertyStore, 0x6834b120, 0x88cb, 0x11d2, 0xbf,0x45, 0x00,0x10,0x5a,0x27,0x99,0xb5);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfPropertyStore : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetType(
        GUID *pguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDataType(
        DWORD *pdwReserved) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetData(
        VARIANT *pvarValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnTextUpdated(
        DWORD dwFlags,
        ITfRange *pRangeNew,
        BOOL *pfAccept) = 0;

    virtual HRESULT STDMETHODCALLTYPE Shrink(
        ITfRange *pRangeNew,
        BOOL *pfFree) = 0;

    virtual HRESULT STDMETHODCALLTYPE Divide(
        ITfRange *pRangeThis,
        ITfRange *pRangeNew,
        ITfPropertyStore **ppPropStore) = 0;

    virtual HRESULT STDMETHODCALLTYPE Clone(
        ITfPropertyStore **pPropStore) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPropertyRangeCreator(
        CLSID *pclsid) = 0;

    virtual HRESULT STDMETHODCALLTYPE Serialize(
        IStream *pStream,
        ULONG *pcb) = 0;

};
#else
typedef struct ITfPropertyStoreVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfPropertyStore* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfPropertyStore* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfPropertyStore* This);

    /*** ITfPropertyStore methods ***/
    HRESULT (STDMETHODCALLTYPE *GetType)(
        ITfPropertyStore* This,
        GUID *pguid);

    HRESULT (STDMETHODCALLTYPE *GetDataType)(
        ITfPropertyStore* This,
        DWORD *pdwReserved);

    HRESULT (STDMETHODCALLTYPE *GetData)(
        ITfPropertyStore* This,
        VARIANT *pvarValue);

    HRESULT (STDMETHODCALLTYPE *OnTextUpdated)(
        ITfPropertyStore* This,
        DWORD dwFlags,
        ITfRange *pRangeNew,
        BOOL *pfAccept);

    HRESULT (STDMETHODCALLTYPE *Shrink)(
        ITfPropertyStore* This,
        ITfRange *pRangeNew,
        BOOL *pfFree);

    HRESULT (STDMETHODCALLTYPE *Divide)(
        ITfPropertyStore* This,
        ITfRange *pRangeThis,
        ITfRange *pRangeNew,
        ITfPropertyStore **ppPropStore);

    HRESULT (STDMETHODCALLTYPE *Clone)(
        ITfPropertyStore* This,
        ITfPropertyStore **pPropStore);

    HRESULT (STDMETHODCALLTYPE *GetPropertyRangeCreator)(
        ITfPropertyStore* This,
        CLSID *pclsid);

    HRESULT (STDMETHODCALLTYPE *Serialize)(
        ITfPropertyStore* This,
        IStream *pStream,
        ULONG *pcb);

    END_INTERFACE
} ITfPropertyStoreVtbl;
interface ITfPropertyStore {
    CONST_VTBL ITfPropertyStoreVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfPropertyStore_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfPropertyStore_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfPropertyStore_Release(This) (This)->lpVtbl->Release(This)
/*** ITfPropertyStore methods ***/
#define ITfPropertyStore_GetType(This,pguid) (This)->lpVtbl->GetType(This,pguid)
#define ITfPropertyStore_GetDataType(This,pdwReserved) (This)->lpVtbl->GetDataType(This,pdwReserved)
#define ITfPropertyStore_GetData(This,pvarValue) (This)->lpVtbl->GetData(This,pvarValue)
#define ITfPropertyStore_OnTextUpdated(This,dwFlags,pRangeNew,pfAccept) (This)->lpVtbl->OnTextUpdated(This,dwFlags,pRangeNew,pfAccept)
#define ITfPropertyStore_Shrink(This,pRangeNew,pfFree) (This)->lpVtbl->Shrink(This,pRangeNew,pfFree)
#define ITfPropertyStore_Divide(This,pRangeThis,pRangeNew,ppPropStore) (This)->lpVtbl->Divide(This,pRangeThis,pRangeNew,ppPropStore)
#define ITfPropertyStore_Clone(This,pPropStore) (This)->lpVtbl->Clone(This,pPropStore)
#define ITfPropertyStore_GetPropertyRangeCreator(This,pclsid) (This)->lpVtbl->GetPropertyRangeCreator(This,pclsid)
#define ITfPropertyStore_Serialize(This,pStream,pcb) (This)->lpVtbl->Serialize(This,pStream,pcb)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfPropertyStore_GetType_Proxy(
    ITfPropertyStore* This,
    GUID *pguid);
void __RPC_STUB ITfPropertyStore_GetType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_GetDataType_Proxy(
    ITfPropertyStore* This,
    DWORD *pdwReserved);
void __RPC_STUB ITfPropertyStore_GetDataType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_GetData_Proxy(
    ITfPropertyStore* This,
    VARIANT *pvarValue);
void __RPC_STUB ITfPropertyStore_GetData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_OnTextUpdated_Proxy(
    ITfPropertyStore* This,
    DWORD dwFlags,
    ITfRange *pRangeNew,
    BOOL *pfAccept);
void __RPC_STUB ITfPropertyStore_OnTextUpdated_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_Shrink_Proxy(
    ITfPropertyStore* This,
    ITfRange *pRangeNew,
    BOOL *pfFree);
void __RPC_STUB ITfPropertyStore_Shrink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_Divide_Proxy(
    ITfPropertyStore* This,
    ITfRange *pRangeThis,
    ITfRange *pRangeNew,
    ITfPropertyStore **ppPropStore);
void __RPC_STUB ITfPropertyStore_Divide_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_Clone_Proxy(
    ITfPropertyStore* This,
    ITfPropertyStore **pPropStore);
void __RPC_STUB ITfPropertyStore_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_GetPropertyRangeCreator_Proxy(
    ITfPropertyStore* This,
    CLSID *pclsid);
void __RPC_STUB ITfPropertyStore_GetPropertyRangeCreator_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfPropertyStore_Serialize_Proxy(
    ITfPropertyStore* This,
    IStream *pStream,
    ULONG *pcb);
void __RPC_STUB ITfPropertyStore_Serialize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfPropertyStore_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IEnumTfRanges interface
 */
#ifndef __IEnumTfRanges_INTERFACE_DEFINED__
#define __IEnumTfRanges_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumTfRanges, 0xf99d3f40, 0x8e32, 0x11d2, 0xbf,0x46, 0x00,0x10,0x5a,0x27,0x99,0xb5);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IEnumTfRanges : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumTfRanges **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Next(
        ULONG ulCount,
        ITfRange **ppRange,
        ULONG *pcFetched) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#else
typedef struct IEnumTfRangesVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IEnumTfRanges* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IEnumTfRanges* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IEnumTfRanges* This);

    /*** IEnumTfRanges methods ***/
    HRESULT (STDMETHODCALLTYPE *Clone)(
        IEnumTfRanges* This,
        IEnumTfRanges **ppEnum);

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumTfRanges* This,
        ULONG ulCount,
        ITfRange **ppRange,
        ULONG *pcFetched);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IEnumTfRanges* This);

    HRESULT (STDMETHODCALLTYPE *Skip)(
        IEnumTfRanges* This,
        ULONG ulCount);

    END_INTERFACE
} IEnumTfRangesVtbl;
interface IEnumTfRanges {
    CONST_VTBL IEnumTfRangesVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IEnumTfRanges_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumTfRanges_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumTfRanges_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumTfRanges methods ***/
#define IEnumTfRanges_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumTfRanges_Next(This,ulCount,ppRange,pcFetched) (This)->lpVtbl->Next(This,ulCount,ppRange,pcFetched)
#define IEnumTfRanges_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumTfRanges_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumTfRanges_Clone_Proxy(
    IEnumTfRanges* This,
    IEnumTfRanges **ppEnum);
void __RPC_STUB IEnumTfRanges_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfRanges_Next_Proxy(
    IEnumTfRanges* This,
    ULONG ulCount,
    ITfRange **ppRange,
    ULONG *pcFetched);
void __RPC_STUB IEnumTfRanges_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfRanges_Reset_Proxy(
    IEnumTfRanges* This);
void __RPC_STUB IEnumTfRanges_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfRanges_Skip_Proxy(
    IEnumTfRanges* This,
    ULONG ulCount);
void __RPC_STUB IEnumTfRanges_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumTfRanges_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IEnumITfCompositionView interface
 */
#ifndef __IEnumITfCompositionView_INTERFACE_DEFINED__
#define __IEnumITfCompositionView_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumITfCompositionView, 0x5efd22ba, 0x7838, 0x46cb, 0x88,0xe2, 0xca,0xdb,0x14,0x12,0x4f,0x8f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IEnumITfCompositionView : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumITfCompositionView **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Next(
        ULONG ulCount,
        ITfCompositionView **rgCompositionView,
        ULONG *pcFetched) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#else
typedef struct IEnumITfCompositionViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IEnumITfCompositionView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IEnumITfCompositionView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IEnumITfCompositionView* This);

    /*** IEnumITfCompositionView methods ***/
    HRESULT (STDMETHODCALLTYPE *Clone)(
        IEnumITfCompositionView* This,
        IEnumITfCompositionView **ppEnum);

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumITfCompositionView* This,
        ULONG ulCount,
        ITfCompositionView **rgCompositionView,
        ULONG *pcFetched);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IEnumITfCompositionView* This);

    HRESULT (STDMETHODCALLTYPE *Skip)(
        IEnumITfCompositionView* This,
        ULONG ulCount);

    END_INTERFACE
} IEnumITfCompositionViewVtbl;
interface IEnumITfCompositionView {
    CONST_VTBL IEnumITfCompositionViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IEnumITfCompositionView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumITfCompositionView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumITfCompositionView_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumITfCompositionView methods ***/
#define IEnumITfCompositionView_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumITfCompositionView_Next(This,ulCount,rgCompositionView,pcFetched) (This)->lpVtbl->Next(This,ulCount,rgCompositionView,pcFetched)
#define IEnumITfCompositionView_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumITfCompositionView_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumITfCompositionView_Clone_Proxy(
    IEnumITfCompositionView* This,
    IEnumITfCompositionView **ppEnum);
void __RPC_STUB IEnumITfCompositionView_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumITfCompositionView_Next_Proxy(
    IEnumITfCompositionView* This,
    ULONG ulCount,
    ITfCompositionView **rgCompositionView,
    ULONG *pcFetched);
void __RPC_STUB IEnumITfCompositionView_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumITfCompositionView_Reset_Proxy(
    IEnumITfCompositionView* This);
void __RPC_STUB IEnumITfCompositionView_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumITfCompositionView_Skip_Proxy(
    IEnumITfCompositionView* This,
    ULONG ulCount);
void __RPC_STUB IEnumITfCompositionView_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumITfCompositionView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfComposition interface
 */
#ifndef __ITfComposition_INTERFACE_DEFINED__
#define __ITfComposition_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfComposition, 0x20168d64, 0x5a8f, 0x4a5a, 0xb7,0xbd, 0xcf,0xa2,0x9f,0x4d,0x0f,0xd9);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfComposition : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetRange(
        ITfRange **ppRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftStart(
        TfEditCookie ecWrite,
        ITfRange *pNewStart) = 0;

    virtual HRESULT STDMETHODCALLTYPE ShiftEnd(
        TfEditCookie ecWrite,
        ITfRange *pNewEnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE EndComposition(
        TfEditCookie ecWrite) = 0;

};
#else
typedef struct ITfCompositionVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfComposition* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfComposition* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfComposition* This);

    /*** ITfComposition methods ***/
    HRESULT (STDMETHODCALLTYPE *GetRange)(
        ITfComposition* This,
        ITfRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *ShiftStart)(
        ITfComposition* This,
        TfEditCookie ecWrite,
        ITfRange *pNewStart);

    HRESULT (STDMETHODCALLTYPE *ShiftEnd)(
        ITfComposition* This,
        TfEditCookie ecWrite,
        ITfRange *pNewEnd);

    HRESULT (STDMETHODCALLTYPE *EndComposition)(
        ITfComposition* This,
        TfEditCookie ecWrite);

    END_INTERFACE
} ITfCompositionVtbl;
interface ITfComposition {
    CONST_VTBL ITfCompositionVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfComposition_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfComposition_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfComposition_Release(This) (This)->lpVtbl->Release(This)
/*** ITfComposition methods ***/
#define ITfComposition_GetRange(This,ppRange) (This)->lpVtbl->GetRange(This,ppRange)
#define ITfComposition_ShiftStart(This,ecWrite,pNewStart) (This)->lpVtbl->ShiftStart(This,ecWrite,pNewStart)
#define ITfComposition_ShiftEnd(This,ecWrite,pNewEnd) (This)->lpVtbl->ShiftEnd(This,ecWrite,pNewEnd)
#define ITfComposition_EndComposition(This,ecWrite) (This)->lpVtbl->EndComposition(This,ecWrite)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfComposition_GetRange_Proxy(
    ITfComposition* This,
    ITfRange **ppRange);
void __RPC_STUB ITfComposition_GetRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfComposition_ShiftStart_Proxy(
    ITfComposition* This,
    TfEditCookie ecWrite,
    ITfRange *pNewStart);
void __RPC_STUB ITfComposition_ShiftStart_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfComposition_ShiftEnd_Proxy(
    ITfComposition* This,
    TfEditCookie ecWrite,
    ITfRange *pNewEnd);
void __RPC_STUB ITfComposition_ShiftEnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfComposition_EndComposition_Proxy(
    ITfComposition* This,
    TfEditCookie ecWrite);
void __RPC_STUB ITfComposition_EndComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfComposition_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfCompositionSink interface
 */
#ifndef __ITfCompositionSink_INTERFACE_DEFINED__
#define __ITfCompositionSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfCompositionSink, 0xa781718c, 0x579a, 0x4b15, 0xa2,0x80, 0x32,0xb8,0x57,0x7a,0xcc,0x5e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfCompositionSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnCompositionTerminated(
        TfEditCookie ecWrite,
        ITfComposition *pComposition) = 0;

};
#else
typedef struct ITfCompositionSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfCompositionSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfCompositionSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfCompositionSink* This);

    /*** ITfCompositionSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnCompositionTerminated)(
        ITfCompositionSink* This,
        TfEditCookie ecWrite,
        ITfComposition *pComposition);

    END_INTERFACE
} ITfCompositionSinkVtbl;
interface ITfCompositionSink {
    CONST_VTBL ITfCompositionSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfCompositionSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfCompositionSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfCompositionSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfCompositionSink methods ***/
#define ITfCompositionSink_OnCompositionTerminated(This,ecWrite,pComposition) (This)->lpVtbl->OnCompositionTerminated(This,ecWrite,pComposition)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfCompositionSink_OnCompositionTerminated_Proxy(
    ITfCompositionSink* This,
    TfEditCookie ecWrite,
    ITfComposition *pComposition);
void __RPC_STUB ITfCompositionSink_OnCompositionTerminated_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfCompositionSink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfContextComposition interface
 */
#ifndef __ITfContextComposition_INTERFACE_DEFINED__
#define __ITfContextComposition_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfContextComposition, 0xd40c8aae, 0xac92, 0x4fc7, 0x9a,0x11, 0x0e,0xe0,0xe2,0x3a,0xa3,0x9b);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfContextComposition : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE StartComposition(
        TfEditCookie ecWrite,
        ITfRange *pCompositionRange,
        ITfCompositionSink *pSink,
        ITfComposition **ppComposition) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumCompositions(
        IEnumITfCompositionView **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE FindComposition(
        TfEditCookie ecRead,
        ITfRange *pTestRange,
        IEnumITfCompositionView **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE TakeOwnership(
        TfEditCookie ecWrite,
        ITfCompositionView *pComposition,
        ITfCompositionSink *pSink,
        ITfComposition **ppComposition) = 0;

};
#else
typedef struct ITfContextCompositionVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfContextComposition* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfContextComposition* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfContextComposition* This);

    /*** ITfContextComposition methods ***/
    HRESULT (STDMETHODCALLTYPE *StartComposition)(
        ITfContextComposition* This,
        TfEditCookie ecWrite,
        ITfRange *pCompositionRange,
        ITfCompositionSink *pSink,
        ITfComposition **ppComposition);

    HRESULT (STDMETHODCALLTYPE *EnumCompositions)(
        ITfContextComposition* This,
        IEnumITfCompositionView **ppEnum);

    HRESULT (STDMETHODCALLTYPE *FindComposition)(
        ITfContextComposition* This,
        TfEditCookie ecRead,
        ITfRange *pTestRange,
        IEnumITfCompositionView **ppEnum);

    HRESULT (STDMETHODCALLTYPE *TakeOwnership)(
        ITfContextComposition* This,
        TfEditCookie ecWrite,
        ITfCompositionView *pComposition,
        ITfCompositionSink *pSink,
        ITfComposition **ppComposition);

    END_INTERFACE
} ITfContextCompositionVtbl;
interface ITfContextComposition {
    CONST_VTBL ITfContextCompositionVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfContextComposition_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfContextComposition_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfContextComposition_Release(This) (This)->lpVtbl->Release(This)
/*** ITfContextComposition methods ***/
#define ITfContextComposition_StartComposition(This,ecWrite,pCompositionRange,pSink,ppComposition) (This)->lpVtbl->StartComposition(This,ecWrite,pCompositionRange,pSink,ppComposition)
#define ITfContextComposition_EnumCompositions(This,ppEnum) (This)->lpVtbl->EnumCompositions(This,ppEnum)
#define ITfContextComposition_FindComposition(This,ecRead,pTestRange,ppEnum) (This)->lpVtbl->FindComposition(This,ecRead,pTestRange,ppEnum)
#define ITfContextComposition_TakeOwnership(This,ecWrite,pComposition,pSink,ppComposition) (This)->lpVtbl->TakeOwnership(This,ecWrite,pComposition,pSink,ppComposition)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfContextComposition_StartComposition_Proxy(
    ITfContextComposition* This,
    TfEditCookie ecWrite,
    ITfRange *pCompositionRange,
    ITfCompositionSink *pSink,
    ITfComposition **ppComposition);
void __RPC_STUB ITfContextComposition_StartComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextComposition_EnumCompositions_Proxy(
    ITfContextComposition* This,
    IEnumITfCompositionView **ppEnum);
void __RPC_STUB ITfContextComposition_EnumCompositions_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextComposition_FindComposition_Proxy(
    ITfContextComposition* This,
    TfEditCookie ecRead,
    ITfRange *pTestRange,
    IEnumITfCompositionView **ppEnum);
void __RPC_STUB ITfContextComposition_FindComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextComposition_TakeOwnership_Proxy(
    ITfContextComposition* This,
    TfEditCookie ecWrite,
    ITfCompositionView *pComposition,
    ITfCompositionSink *pSink,
    ITfComposition **ppComposition);
void __RPC_STUB ITfContextComposition_TakeOwnership_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfContextComposition_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfContextOwnerCompositionServices interface
 */
#ifndef __ITfContextOwnerCompositionServices_INTERFACE_DEFINED__
#define __ITfContextOwnerCompositionServices_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfContextOwnerCompositionServices, 0x86462810, 0x593b, 0x4916, 0x97,0x64, 0x19,0xc0,0x8e,0x9c,0xe1,0x10);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfContextOwnerCompositionServices : public ITfContextComposition
{
    virtual HRESULT STDMETHODCALLTYPE TerminateComposition(
        ITfCompositionView *pComposition) = 0;

};
#else
typedef struct ITfContextOwnerCompositionServicesVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfContextOwnerCompositionServices* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfContextOwnerCompositionServices* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfContextOwnerCompositionServices* This);

    /*** ITfContextComposition methods ***/
    HRESULT (STDMETHODCALLTYPE *StartComposition)(
        ITfContextOwnerCompositionServices* This,
        TfEditCookie ecWrite,
        ITfRange *pCompositionRange,
        ITfCompositionSink *pSink,
        ITfComposition **ppComposition);

    HRESULT (STDMETHODCALLTYPE *EnumCompositions)(
        ITfContextOwnerCompositionServices* This,
        IEnumITfCompositionView **ppEnum);

    HRESULT (STDMETHODCALLTYPE *FindComposition)(
        ITfContextOwnerCompositionServices* This,
        TfEditCookie ecRead,
        ITfRange *pTestRange,
        IEnumITfCompositionView **ppEnum);

    HRESULT (STDMETHODCALLTYPE *TakeOwnership)(
        ITfContextOwnerCompositionServices* This,
        TfEditCookie ecWrite,
        ITfCompositionView *pComposition,
        ITfCompositionSink *pSink,
        ITfComposition **ppComposition);

    /*** ITfContextOwnerCompositionServices methods ***/
    HRESULT (STDMETHODCALLTYPE *TerminateComposition)(
        ITfContextOwnerCompositionServices* This,
        ITfCompositionView *pComposition);

    END_INTERFACE
} ITfContextOwnerCompositionServicesVtbl;
interface ITfContextOwnerCompositionServices {
    CONST_VTBL ITfContextOwnerCompositionServicesVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfContextOwnerCompositionServices_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfContextOwnerCompositionServices_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfContextOwnerCompositionServices_Release(This) (This)->lpVtbl->Release(This)
/*** ITfContextComposition methods ***/
#define ITfContextOwnerCompositionServices_StartComposition(This,ecWrite,pCompositionRange,pSink,ppComposition) (This)->lpVtbl->StartComposition(This,ecWrite,pCompositionRange,pSink,ppComposition)
#define ITfContextOwnerCompositionServices_EnumCompositions(This,ppEnum) (This)->lpVtbl->EnumCompositions(This,ppEnum)
#define ITfContextOwnerCompositionServices_FindComposition(This,ecRead,pTestRange,ppEnum) (This)->lpVtbl->FindComposition(This,ecRead,pTestRange,ppEnum)
#define ITfContextOwnerCompositionServices_TakeOwnership(This,ecWrite,pComposition,pSink,ppComposition) (This)->lpVtbl->TakeOwnership(This,ecWrite,pComposition,pSink,ppComposition)
/*** ITfContextOwnerCompositionServices methods ***/
#define ITfContextOwnerCompositionServices_TerminateComposition(This,pComposition) (This)->lpVtbl->TerminateComposition(This,pComposition)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfContextOwnerCompositionServices_TerminateComposition_Proxy(
    ITfContextOwnerCompositionServices* This,
    ITfCompositionView *pComposition);
void __RPC_STUB ITfContextOwnerCompositionServices_TerminateComposition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfContextOwnerCompositionServices_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfReadOnlyProperty interface
 */
#ifndef __ITfReadOnlyProperty_INTERFACE_DEFINED__
#define __ITfReadOnlyProperty_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfReadOnlyProperty, 0x17d49a3d, 0xf8b8, 0x4b2f, 0xb2,0x54, 0x52,0x31,0x9d,0xd6,0x4c,0x53);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfReadOnlyProperty : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetType(
        GUID *pguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumRanges(
        TfEditCookie ec,
        IEnumTfRanges **ppEnum,
        ITfRange *pTargetRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetValue(
        TfEditCookie ec,
        ITfRange *pRange,
        VARIANT *pvarValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetContext(
        ITfContext **ppContext) = 0;

};
#else
typedef struct ITfReadOnlyPropertyVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfReadOnlyProperty* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfReadOnlyProperty* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfReadOnlyProperty* This);

    /*** ITfReadOnlyProperty methods ***/
    HRESULT (STDMETHODCALLTYPE *GetType)(
        ITfReadOnlyProperty* This,
        GUID *pguid);

    HRESULT (STDMETHODCALLTYPE *EnumRanges)(
        ITfReadOnlyProperty* This,
        TfEditCookie ec,
        IEnumTfRanges **ppEnum,
        ITfRange *pTargetRange);

    HRESULT (STDMETHODCALLTYPE *GetValue)(
        ITfReadOnlyProperty* This,
        TfEditCookie ec,
        ITfRange *pRange,
        VARIANT *pvarValue);

    HRESULT (STDMETHODCALLTYPE *GetContext)(
        ITfReadOnlyProperty* This,
        ITfContext **ppContext);

    END_INTERFACE
} ITfReadOnlyPropertyVtbl;
interface ITfReadOnlyProperty {
    CONST_VTBL ITfReadOnlyPropertyVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfReadOnlyProperty_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfReadOnlyProperty_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfReadOnlyProperty_Release(This) (This)->lpVtbl->Release(This)
/*** ITfReadOnlyProperty methods ***/
#define ITfReadOnlyProperty_GetType(This,pguid) (This)->lpVtbl->GetType(This,pguid)
#define ITfReadOnlyProperty_EnumRanges(This,ec,ppEnum,pTargetRange) (This)->lpVtbl->EnumRanges(This,ec,ppEnum,pTargetRange)
#define ITfReadOnlyProperty_GetValue(This,ec,pRange,pvarValue) (This)->lpVtbl->GetValue(This,ec,pRange,pvarValue)
#define ITfReadOnlyProperty_GetContext(This,ppContext) (This)->lpVtbl->GetContext(This,ppContext)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfReadOnlyProperty_GetType_Proxy(
    ITfReadOnlyProperty* This,
    GUID *pguid);
void __RPC_STUB ITfReadOnlyProperty_GetType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfReadOnlyProperty_EnumRanges_Proxy(
    ITfReadOnlyProperty* This,
    TfEditCookie ec,
    IEnumTfRanges **ppEnum,
    ITfRange *pTargetRange);
void __RPC_STUB ITfReadOnlyProperty_EnumRanges_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfReadOnlyProperty_GetValue_Proxy(
    ITfReadOnlyProperty* This,
    TfEditCookie ec,
    ITfRange *pRange,
    VARIANT *pvarValue);
void __RPC_STUB ITfReadOnlyProperty_GetValue_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfReadOnlyProperty_GetContext_Proxy(
    ITfReadOnlyProperty* This,
    ITfContext **ppContext);
void __RPC_STUB ITfReadOnlyProperty_GetContext_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfReadOnlyProperty_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfProperty interface
 */
#ifndef __ITfProperty_INTERFACE_DEFINED__
#define __ITfProperty_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfProperty, 0xe2449660, 0x9542, 0x11d2, 0xbf,0x46, 0x00,0x10,0x5a,0x27,0x99,0xb5);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfProperty : public ITfReadOnlyProperty
{
    virtual HRESULT STDMETHODCALLTYPE FindRange(
        TfEditCookie ec,
        ITfRange *pRange,
        ITfRange **ppRange,
        TfAnchor aPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetValueStore(
        TfEditCookie ec,
        ITfRange *pRange,
        ITfPropertyStore *pPropStore) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetValue(
        TfEditCookie ec,
        ITfRange *pRange,
        const VARIANT *pvarValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE Clear(
        TfEditCookie ec,
        ITfRange *pRange) = 0;

};
#else
typedef struct ITfPropertyVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfProperty* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfProperty* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfProperty* This);

    /*** ITfReadOnlyProperty methods ***/
    HRESULT (STDMETHODCALLTYPE *GetType)(
        ITfProperty* This,
        GUID *pguid);

    HRESULT (STDMETHODCALLTYPE *EnumRanges)(
        ITfProperty* This,
        TfEditCookie ec,
        IEnumTfRanges **ppEnum,
        ITfRange *pTargetRange);

    HRESULT (STDMETHODCALLTYPE *GetValue)(
        ITfProperty* This,
        TfEditCookie ec,
        ITfRange *pRange,
        VARIANT *pvarValue);

    HRESULT (STDMETHODCALLTYPE *GetContext)(
        ITfProperty* This,
        ITfContext **ppContext);

    /*** ITfProperty methods ***/
    HRESULT (STDMETHODCALLTYPE *FindRange)(
        ITfProperty* This,
        TfEditCookie ec,
        ITfRange *pRange,
        ITfRange **ppRange,
        TfAnchor aPos);

    HRESULT (STDMETHODCALLTYPE *SetValueStore)(
        ITfProperty* This,
        TfEditCookie ec,
        ITfRange *pRange,
        ITfPropertyStore *pPropStore);

    HRESULT (STDMETHODCALLTYPE *SetValue)(
        ITfProperty* This,
        TfEditCookie ec,
        ITfRange *pRange,
        const VARIANT *pvarValue);

    HRESULT (STDMETHODCALLTYPE *Clear)(
        ITfProperty* This,
        TfEditCookie ec,
        ITfRange *pRange);

    END_INTERFACE
} ITfPropertyVtbl;
interface ITfProperty {
    CONST_VTBL ITfPropertyVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfProperty_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfProperty_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfProperty_Release(This) (This)->lpVtbl->Release(This)
/*** ITfReadOnlyProperty methods ***/
#define ITfProperty_GetType(This,pguid) (This)->lpVtbl->GetType(This,pguid)
#define ITfProperty_EnumRanges(This,ec,ppEnum,pTargetRange) (This)->lpVtbl->EnumRanges(This,ec,ppEnum,pTargetRange)
#define ITfProperty_GetValue(This,ec,pRange,pvarValue) (This)->lpVtbl->GetValue(This,ec,pRange,pvarValue)
#define ITfProperty_GetContext(This,ppContext) (This)->lpVtbl->GetContext(This,ppContext)
/*** ITfProperty methods ***/
#define ITfProperty_FindRange(This,ec,pRange,ppRange,aPos) (This)->lpVtbl->FindRange(This,ec,pRange,ppRange,aPos)
#define ITfProperty_SetValueStore(This,ec,pRange,pPropStore) (This)->lpVtbl->SetValueStore(This,ec,pRange,pPropStore)
#define ITfProperty_SetValue(This,ec,pRange,pvarValue) (This)->lpVtbl->SetValue(This,ec,pRange,pvarValue)
#define ITfProperty_Clear(This,ec,pRange) (This)->lpVtbl->Clear(This,ec,pRange)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfProperty_FindRange_Proxy(
    ITfProperty* This,
    TfEditCookie ec,
    ITfRange *pRange,
    ITfRange **ppRange,
    TfAnchor aPos);
void __RPC_STUB ITfProperty_FindRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfProperty_SetValueStore_Proxy(
    ITfProperty* This,
    TfEditCookie ec,
    ITfRange *pRange,
    ITfPropertyStore *pPropStore);
void __RPC_STUB ITfProperty_SetValueStore_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfProperty_SetValue_Proxy(
    ITfProperty* This,
    TfEditCookie ec,
    ITfRange *pRange,
    const VARIANT *pvarValue);
void __RPC_STUB ITfProperty_SetValue_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfProperty_Clear_Proxy(
    ITfProperty* This,
    TfEditCookie ec,
    ITfRange *pRange);
void __RPC_STUB ITfProperty_Clear_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfProperty_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfCompartment interface
 */
#ifndef __ITfCompartment_INTERFACE_DEFINED__
#define __ITfCompartment_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfCompartment, 0xbb08f7a9, 0x607a, 0x4384, 0x86,0x23, 0x05,0x68,0x92,0xb6,0x43,0x71);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfCompartment : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE SetValue(
        TfClientId tid,
        const VARIANT *pvarValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetValue(
        VARIANT *pvarValue) = 0;

};
#else
typedef struct ITfCompartmentVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfCompartment* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfCompartment* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfCompartment* This);

    /*** ITfCompartment methods ***/
    HRESULT (STDMETHODCALLTYPE *SetValue)(
        ITfCompartment* This,
        TfClientId tid,
        const VARIANT *pvarValue);

    HRESULT (STDMETHODCALLTYPE *GetValue)(
        ITfCompartment* This,
        VARIANT *pvarValue);

    END_INTERFACE
} ITfCompartmentVtbl;
interface ITfCompartment {
    CONST_VTBL ITfCompartmentVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfCompartment_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfCompartment_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfCompartment_Release(This) (This)->lpVtbl->Release(This)
/*** ITfCompartment methods ***/
#define ITfCompartment_SetValue(This,tid,pvarValue) (This)->lpVtbl->SetValue(This,tid,pvarValue)
#define ITfCompartment_GetValue(This,pvarValue) (This)->lpVtbl->GetValue(This,pvarValue)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfCompartment_SetValue_Proxy(
    ITfCompartment* This,
    TfClientId tid,
    const VARIANT *pvarValue);
void __RPC_STUB ITfCompartment_SetValue_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCompartment_GetValue_Proxy(
    ITfCompartment* This,
    VARIANT *pvarValue);
void __RPC_STUB ITfCompartment_GetValue_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfCompartment_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfCompartmentMgr interface
 */
#ifndef __ITfCompartmentMgr_INTERFACE_DEFINED__
#define __ITfCompartmentMgr_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfCompartmentMgr, 0x7dcf57ac, 0x18ad, 0x438b, 0x82,0x4d, 0x97,0x9b,0xff,0xb7,0x4b,0x7c);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfCompartmentMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetCompartment(
        REFGUID rguid,
        ITfCompartment **ppcomp) = 0;

    virtual HRESULT STDMETHODCALLTYPE ClearCompartment(
        TfClientId tid,
        REFGUID rguid) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumCompartments(
        IEnumGUID **ppEnum) = 0;

};
#else
typedef struct ITfCompartmentMgrVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfCompartmentMgr* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfCompartmentMgr* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfCompartmentMgr* This);

    /*** ITfCompartmentMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *GetCompartment)(
        ITfCompartmentMgr* This,
        REFGUID rguid,
        ITfCompartment **ppcomp);

    HRESULT (STDMETHODCALLTYPE *ClearCompartment)(
        ITfCompartmentMgr* This,
        TfClientId tid,
        REFGUID rguid);

    HRESULT (STDMETHODCALLTYPE *EnumCompartments)(
        ITfCompartmentMgr* This,
        IEnumGUID **ppEnum);

    END_INTERFACE
} ITfCompartmentMgrVtbl;
interface ITfCompartmentMgr {
    CONST_VTBL ITfCompartmentMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfCompartmentMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfCompartmentMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfCompartmentMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfCompartmentMgr methods ***/
#define ITfCompartmentMgr_GetCompartment(This,rguid,ppcomp) (This)->lpVtbl->GetCompartment(This,rguid,ppcomp)
#define ITfCompartmentMgr_ClearCompartment(This,tid,rguid) (This)->lpVtbl->ClearCompartment(This,tid,rguid)
#define ITfCompartmentMgr_EnumCompartments(This,ppEnum) (This)->lpVtbl->EnumCompartments(This,ppEnum)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfCompartmentMgr_GetCompartment_Proxy(
    ITfCompartmentMgr* This,
    REFGUID rguid,
    ITfCompartment **ppcomp);
void __RPC_STUB ITfCompartmentMgr_GetCompartment_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCompartmentMgr_ClearCompartment_Proxy(
    ITfCompartmentMgr* This,
    TfClientId tid,
    REFGUID rguid);
void __RPC_STUB ITfCompartmentMgr_ClearCompartment_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfCompartmentMgr_EnumCompartments_Proxy(
    ITfCompartmentMgr* This,
    IEnumGUID **ppEnum);
void __RPC_STUB ITfCompartmentMgr_EnumCompartments_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfCompartmentMgr_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfCompartmentEventSink interface
 */
#ifndef __ITfCompartmentEventSink_INTERFACE_DEFINED__
#define __ITfCompartmentEventSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfCompartmentEventSink, 0x743abd5f, 0xf26d, 0x48df, 0x8c,0xc5, 0x23,0x84,0x92,0x41,0x9b,0x64);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfCompartmentEventSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnChange(
        REFGUID rguid) = 0;

};
#else
typedef struct ITfCompartmentEventSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfCompartmentEventSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfCompartmentEventSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfCompartmentEventSink* This);

    /*** ITfCompartmentEventSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnChange)(
        ITfCompartmentEventSink* This,
        REFGUID rguid);

    END_INTERFACE
} ITfCompartmentEventSinkVtbl;
interface ITfCompartmentEventSink {
    CONST_VTBL ITfCompartmentEventSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfCompartmentEventSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfCompartmentEventSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfCompartmentEventSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfCompartmentEventSink methods ***/
#define ITfCompartmentEventSink_OnChange(This,rguid) (This)->lpVtbl->OnChange(This,rguid)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfCompartmentEventSink_OnChange_Proxy(
    ITfCompartmentEventSink* This,
    REFGUID rguid);
void __RPC_STUB ITfCompartmentEventSink_OnChange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfCompartmentEventSink_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IEnumTfContexts interface
 */
#ifndef __IEnumTfContexts_INTERFACE_DEFINED__
#define __IEnumTfContexts_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumTfContexts, 0x8f1a7ea6, 0x1654, 0x4502, 0xa8,0x6e, 0xb2,0x90,0x23,0x44,0xd5,0x07);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IEnumTfContexts : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumTfContexts **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Next(
        ULONG ulCount,
        ITfContext **rgContext,
        ULONG *pcFetched) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#else
typedef struct IEnumTfContextsVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IEnumTfContexts* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IEnumTfContexts* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IEnumTfContexts* This);

    /*** IEnumTfContexts methods ***/
    HRESULT (STDMETHODCALLTYPE *Clone)(
        IEnumTfContexts* This,
        IEnumTfContexts **ppEnum);

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumTfContexts* This,
        ULONG ulCount,
        ITfContext **rgContext,
        ULONG *pcFetched);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IEnumTfContexts* This);

    HRESULT (STDMETHODCALLTYPE *Skip)(
        IEnumTfContexts* This,
        ULONG ulCount);

    END_INTERFACE
} IEnumTfContextsVtbl;
interface IEnumTfContexts {
    CONST_VTBL IEnumTfContextsVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IEnumTfContexts_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumTfContexts_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumTfContexts_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumTfContexts methods ***/
#define IEnumTfContexts_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumTfContexts_Next(This,ulCount,rgContext,pcFetched) (This)->lpVtbl->Next(This,ulCount,rgContext,pcFetched)
#define IEnumTfContexts_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumTfContexts_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumTfContexts_Clone_Proxy(
    IEnumTfContexts* This,
    IEnumTfContexts **ppEnum);
void __RPC_STUB IEnumTfContexts_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfContexts_Next_Proxy(
    IEnumTfContexts* This,
    ULONG ulCount,
    ITfContext **rgContext,
    ULONG *pcFetched);
void __RPC_STUB IEnumTfContexts_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfContexts_Reset_Proxy(
    IEnumTfContexts* This);
void __RPC_STUB IEnumTfContexts_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfContexts_Skip_Proxy(
    IEnumTfContexts* This,
    ULONG ulCount);
void __RPC_STUB IEnumTfContexts_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumTfContexts_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IEnumTfDocumentMgrs interface
 */
#ifndef __IEnumTfDocumentMgrs_INTERFACE_DEFINED__
#define __IEnumTfDocumentMgrs_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumTfDocumentMgrs, 0xaa80e808, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IEnumTfDocumentMgrs : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumTfDocumentMgrs **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Next(
        ULONG ulCount,
        ITfDocumentMgr **rgDocumentMgr,
        ULONG *pcFetched) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#else
typedef struct IEnumTfDocumentMgrsVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IEnumTfDocumentMgrs* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IEnumTfDocumentMgrs* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IEnumTfDocumentMgrs* This);

    /*** IEnumTfDocumentMgrs methods ***/
    HRESULT (STDMETHODCALLTYPE *Clone)(
        IEnumTfDocumentMgrs* This,
        IEnumTfDocumentMgrs **ppEnum);

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumTfDocumentMgrs* This,
        ULONG ulCount,
        ITfDocumentMgr **rgDocumentMgr,
        ULONG *pcFetched);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IEnumTfDocumentMgrs* This);

    HRESULT (STDMETHODCALLTYPE *Skip)(
        IEnumTfDocumentMgrs* This,
        ULONG ulCount);

    END_INTERFACE
} IEnumTfDocumentMgrsVtbl;
interface IEnumTfDocumentMgrs {
    CONST_VTBL IEnumTfDocumentMgrsVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IEnumTfDocumentMgrs_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumTfDocumentMgrs_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumTfDocumentMgrs_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumTfDocumentMgrs methods ***/
#define IEnumTfDocumentMgrs_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumTfDocumentMgrs_Next(This,ulCount,rgDocumentMgr,pcFetched) (This)->lpVtbl->Next(This,ulCount,rgDocumentMgr,pcFetched)
#define IEnumTfDocumentMgrs_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumTfDocumentMgrs_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumTfDocumentMgrs_Clone_Proxy(
    IEnumTfDocumentMgrs* This,
    IEnumTfDocumentMgrs **ppEnum);
void __RPC_STUB IEnumTfDocumentMgrs_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfDocumentMgrs_Next_Proxy(
    IEnumTfDocumentMgrs* This,
    ULONG ulCount,
    ITfDocumentMgr **rgDocumentMgr,
    ULONG *pcFetched);
void __RPC_STUB IEnumTfDocumentMgrs_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfDocumentMgrs_Reset_Proxy(
    IEnumTfDocumentMgrs* This);
void __RPC_STUB IEnumTfDocumentMgrs_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfDocumentMgrs_Skip_Proxy(
    IEnumTfDocumentMgrs* This,
    ULONG ulCount);
void __RPC_STUB IEnumTfDocumentMgrs_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumTfDocumentMgrs_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfSourceSingle interface
 */
#ifndef __ITfSourceSingle_INTERFACE_DEFINED__
#define __ITfSourceSingle_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfSourceSingle, 0x73131f9c, 0x56a9, 0x49dd, 0xb0,0xee, 0xd0,0x46,0x63,0x3f,0x75,0x28);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfSourceSingle : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE AdviseSingleSink(
        TfClientId tid,
        REFIID riid,
        IUnknown *punk) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnadviseSingleSink(
        TfClientId tid,
        REFIID riid) = 0;

};
#else
typedef struct ITfSourceSingleVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfSourceSingle* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfSourceSingle* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfSourceSingle* This);

    /*** ITfSourceSingle methods ***/
    HRESULT (STDMETHODCALLTYPE *AdviseSingleSink)(
        ITfSourceSingle* This,
        TfClientId tid,
        REFIID riid,
        IUnknown *punk);

    HRESULT (STDMETHODCALLTYPE *UnadviseSingleSink)(
        ITfSourceSingle* This,
        TfClientId tid,
        REFIID riid);

    END_INTERFACE
} ITfSourceSingleVtbl;
interface ITfSourceSingle {
    CONST_VTBL ITfSourceSingleVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfSourceSingle_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfSourceSingle_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfSourceSingle_Release(This) (This)->lpVtbl->Release(This)
/*** ITfSourceSingle methods ***/
#define ITfSourceSingle_AdviseSingleSink(This,tid,riid,punk) (This)->lpVtbl->AdviseSingleSink(This,tid,riid,punk)
#define ITfSourceSingle_UnadviseSingleSink(This,tid,riid) (This)->lpVtbl->UnadviseSingleSink(This,tid,riid)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfSourceSingle_AdviseSingleSink_Proxy(
    ITfSourceSingle* This,
    TfClientId tid,
    REFIID riid,
    IUnknown *punk);
void __RPC_STUB ITfSourceSingle_AdviseSingleSink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfSourceSingle_UnadviseSingleSink_Proxy(
    ITfSourceSingle* This,
    TfClientId tid,
    REFIID riid);
void __RPC_STUB ITfSourceSingle_UnadviseSingleSink_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfSourceSingle_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfThreadFocusSink interface
 */
#ifndef __ITfThreadFocusSink_INTERFACE_DEFINED__
#define __ITfThreadFocusSink_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfThreadFocusSink, 0xc0f1db0c, 0x3a20, 0x405c, 0xa3,0x03, 0x96,0xb6,0x01,0x0a,0x88,0x5f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface ITfThreadFocusSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnSetThreadFocus(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnKillThreadFocus(
        ) = 0;

};
#else
typedef struct ITfThreadFocusSinkVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITfThreadFocusSink* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITfThreadFocusSink* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITfThreadFocusSink* This);

    /*** ITfThreadFocusSink methods ***/
    HRESULT (STDMETHODCALLTYPE *OnSetThreadFocus)(
        ITfThreadFocusSink* This);

    HRESULT (STDMETHODCALLTYPE *OnKillThreadFocus)(
        ITfThreadFocusSink* This);

    END_INTERFACE
} ITfThreadFocusSinkVtbl;
interface ITfThreadFocusSink {
    CONST_VTBL ITfThreadFocusSinkVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define ITfThreadFocusSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfThreadFocusSink_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfThreadFocusSink_Release(This) (This)->lpVtbl->Release(This)
/*** ITfThreadFocusSink methods ***/
#define ITfThreadFocusSink_OnSetThreadFocus(This) (This)->lpVtbl->OnSetThreadFocus(This)
#define ITfThreadFocusSink_OnKillThreadFocus(This) (This)->lpVtbl->OnKillThreadFocus(This)
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfThreadFocusSink_OnSetThreadFocus_Proxy(
    ITfThreadFocusSink* This);
void __RPC_STUB ITfThreadFocusSink_OnSetThreadFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfThreadFocusSink_OnKillThreadFocus_Proxy(
    ITfThreadFocusSink* This);
void __RPC_STUB ITfThreadFocusSink_OnKillThreadFocus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfThreadFocusSink_INTERFACE_DEFINED__ */

/* Begin additional prototypes for all interfaces */

ULONG           __RPC_USER HWND_UserSize     (ULONG *, ULONG, HWND *);
unsigned char * __RPC_USER HWND_UserMarshal  (ULONG *, unsigned char *, HWND *);
unsigned char * __RPC_USER HWND_UserUnmarshal(ULONG *, unsigned char *, HWND *);
void            __RPC_USER HWND_UserFree     (ULONG *, HWND *);
ULONG           __RPC_USER BSTR_UserSize     (ULONG *, ULONG, BSTR *);
unsigned char * __RPC_USER BSTR_UserMarshal  (ULONG *, unsigned char *, BSTR *);
unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *);
void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);
ULONG           __RPC_USER VARIANT_UserSize     (ULONG *, ULONG, VARIANT *);
unsigned char * __RPC_USER VARIANT_UserMarshal  (ULONG *, unsigned char *, VARIANT *);
unsigned char * __RPC_USER VARIANT_UserUnmarshal(ULONG *, unsigned char *, VARIANT *);
void            __RPC_USER VARIANT_UserFree     (ULONG *, VARIANT *);

/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __WIDL_MSCTF_H */
