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

#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif

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

#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef __msctf_h__
#define __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 __IEnumTfInputProcessorProfiles_FWD_DEFINED__
#define __IEnumTfInputProcessorProfiles_FWD_DEFINED__
typedef interface IEnumTfInputProcessorProfiles IEnumTfInputProcessorProfiles;
#endif

#ifndef __ITfInputProcessorProfileMgr_FWD_DEFINED__
#define __ITfInputProcessorProfileMgr_FWD_DEFINED__
typedef interface ITfInputProcessorProfileMgr ITfInputProcessorProfileMgr;
#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 __ITfPersistentPropertyLoaderACP_FWD_DEFINED__
#define __ITfPersistentPropertyLoaderACP_FWD_DEFINED__
typedef interface ITfPersistentPropertyLoaderACP ITfPersistentPropertyLoaderACP;
#endif

#ifndef __ITfContextOwnerServices_FWD_DEFINED__
#define __ITfContextOwnerServices_FWD_DEFINED__
typedef interface ITfContextOwnerServices ITfContextOwnerServices;
#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
#define TF_PROFILETYPE_INPUTPROCESSOR  0x0001
#define TF_PROFILETYPE_KEYBOARDLAYOUT  0x0002
#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

#if 0
typedef UINT_PTR HKL;
#endif
typedef struct TF_PERSISTENT_PROPERTY_HEADER_ACP {
    GUID guidType;
    LONG ichStart;
    LONG cch;
    ULONG cb;
    DWORD dwPrivate;
    CLSID clsidTIP;
} TF_PERSISTENT_PROPERTY_HEADER_ACP;
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)
MIDL_INTERFACE("aa80e801-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfThreadMgr, 0xaa80e801, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfThreadMgr_QueryInterface(ITfThreadMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfThreadMgr_AddRef(ITfThreadMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfThreadMgr_Release(ITfThreadMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfThreadMgr methods ***/
static FORCEINLINE HRESULT ITfThreadMgr_Activate(ITfThreadMgr* This,TfClientId *ptid) {
    return This->lpVtbl->Activate(This,ptid);
}
static FORCEINLINE HRESULT ITfThreadMgr_Deactivate(ITfThreadMgr* This) {
    return This->lpVtbl->Deactivate(This);
}
static FORCEINLINE HRESULT ITfThreadMgr_CreateDocumentMgr(ITfThreadMgr* This,ITfDocumentMgr **ppdim) {
    return This->lpVtbl->CreateDocumentMgr(This,ppdim);
}
static FORCEINLINE HRESULT ITfThreadMgr_EnumDocumentMgrs(ITfThreadMgr* This,IEnumTfDocumentMgrs **ppEnum) {
    return This->lpVtbl->EnumDocumentMgrs(This,ppEnum);
}
static FORCEINLINE HRESULT ITfThreadMgr_GetFocus(ITfThreadMgr* This,ITfDocumentMgr **ppdimFocus) {
    return This->lpVtbl->GetFocus(This,ppdimFocus);
}
static FORCEINLINE HRESULT ITfThreadMgr_SetFocus(ITfThreadMgr* This,ITfDocumentMgr *pdimFocus) {
    return This->lpVtbl->SetFocus(This,pdimFocus);
}
static FORCEINLINE HRESULT ITfThreadMgr_AssociateFocus(ITfThreadMgr* This,HWND hwnd,ITfDocumentMgr *pdimNew,ITfDocumentMgr **ppdimPrev) {
    return This->lpVtbl->AssociateFocus(This,hwnd,pdimNew,ppdimPrev);
}
static FORCEINLINE HRESULT ITfThreadMgr_IsThreadFocus(ITfThreadMgr* This,BOOL *pfThreadFocus) {
    return This->lpVtbl->IsThreadFocus(This,pfThreadFocus);
}
static FORCEINLINE HRESULT ITfThreadMgr_GetFunctionProvider(ITfThreadMgr* This,REFCLSID clsid,ITfFunctionProvider **ppFuncProv) {
    return This->lpVtbl->GetFunctionProvider(This,clsid,ppFuncProv);
}
static FORCEINLINE HRESULT ITfThreadMgr_EnumFunctionProviders(ITfThreadMgr* This,IEnumTfFunctionProviders **ppEnum) {
    return This->lpVtbl->EnumFunctionProviders(This,ppEnum);
}
static FORCEINLINE HRESULT ITfThreadMgr_GetGlobalCompartment(ITfThreadMgr* This,ITfCompartmentMgr **ppCompMgr) {
    return This->lpVtbl->GetGlobalCompartment(This,ppCompMgr);
}
#endif
#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)
MIDL_INTERFACE("d7540241-f9a1-4364-befc-dbcd2c4395b7")
ITfCompositionView : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetOwnerClsid(
        CLSID *pclsid) = 0;

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

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfCompositionView, 0xd7540241, 0xf9a1, 0x4364, 0xbe,0xfc, 0xdb,0xcd,0x2c,0x43,0x95,0xb7)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfCompositionView_QueryInterface(ITfCompositionView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfCompositionView_AddRef(ITfCompositionView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfCompositionView_Release(ITfCompositionView* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfCompositionView methods ***/
static FORCEINLINE HRESULT ITfCompositionView_GetOwnerClsid(ITfCompositionView* This,CLSID *pclsid) {
    return This->lpVtbl->GetOwnerClsid(This,pclsid);
}
static FORCEINLINE HRESULT ITfCompositionView_GetRange(ITfCompositionView* This,ITfRange **ppRange) {
    return This->lpVtbl->GetRange(This,ppRange);
}
#endif
#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)
MIDL_INTERFACE("aa80e7f4-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfDocumentMgr, 0xaa80e7f4, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfDocumentMgr_QueryInterface(ITfDocumentMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfDocumentMgr_AddRef(ITfDocumentMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfDocumentMgr_Release(ITfDocumentMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfDocumentMgr methods ***/
static FORCEINLINE HRESULT ITfDocumentMgr_CreateContext(ITfDocumentMgr* This,TfClientId tidOwner,DWORD dwFlags,IUnknown *punk,ITfContext **ppic,TfEditCookie *pecTextStore) {
    return This->lpVtbl->CreateContext(This,tidOwner,dwFlags,punk,ppic,pecTextStore);
}
static FORCEINLINE HRESULT ITfDocumentMgr_Push(ITfDocumentMgr* This,ITfContext *pic) {
    return This->lpVtbl->Push(This,pic);
}
static FORCEINLINE HRESULT ITfDocumentMgr_Pop(ITfDocumentMgr* This,DWORD dwFlags) {
    return This->lpVtbl->Pop(This,dwFlags);
}
static FORCEINLINE HRESULT ITfDocumentMgr_GetTop(ITfDocumentMgr* This,ITfContext **ppic) {
    return This->lpVtbl->GetTop(This,ppic);
}
static FORCEINLINE HRESULT ITfDocumentMgr_GetBase(ITfDocumentMgr* This,ITfContext **ppic) {
    return This->lpVtbl->GetBase(This,ppic);
}
static FORCEINLINE HRESULT ITfDocumentMgr_EnumContexts(ITfDocumentMgr* This,IEnumTfContexts **ppEnum) {
    return This->lpVtbl->EnumContexts(This,ppEnum);
}
#endif
#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)
MIDL_INTERFACE("aa80e7fd-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfContext, 0xaa80e7fd, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfContext_QueryInterface(ITfContext* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfContext_AddRef(ITfContext* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfContext_Release(ITfContext* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfContext methods ***/
static FORCEINLINE HRESULT ITfContext_RequestEditSession(ITfContext* This,TfClientId tid,ITfEditSession *pes,DWORD dwFlags,HRESULT *phrSession) {
    return This->lpVtbl->RequestEditSession(This,tid,pes,dwFlags,phrSession);
}
static FORCEINLINE HRESULT ITfContext_InWriteSession(ITfContext* This,TfClientId tid,BOOL *pfWriteSession) {
    return This->lpVtbl->InWriteSession(This,tid,pfWriteSession);
}
static FORCEINLINE HRESULT ITfContext_GetSelection(ITfContext* This,TfEditCookie ec,ULONG ulIndex,ULONG ulCount,TF_SELECTION *pSelection,ULONG *pcFetched) {
    return This->lpVtbl->GetSelection(This,ec,ulIndex,ulCount,pSelection,pcFetched);
}
static FORCEINLINE HRESULT ITfContext_SetSelection(ITfContext* This,TfEditCookie ec,ULONG ulCount,const TF_SELECTION *pSelection) {
    return This->lpVtbl->SetSelection(This,ec,ulCount,pSelection);
}
static FORCEINLINE HRESULT ITfContext_GetStart(ITfContext* This,TfEditCookie ec,ITfRange **ppStart) {
    return This->lpVtbl->GetStart(This,ec,ppStart);
}
static FORCEINLINE HRESULT ITfContext_GetEnd(ITfContext* This,TfEditCookie ec,ITfRange **ppEnd) {
    return This->lpVtbl->GetEnd(This,ec,ppEnd);
}
static FORCEINLINE HRESULT ITfContext_GetActiveView(ITfContext* This,ITfContextView **ppView) {
    return This->lpVtbl->GetActiveView(This,ppView);
}
static FORCEINLINE HRESULT ITfContext_EnumViews(ITfContext* This,IEnumTfContextViews **ppEnum) {
    return This->lpVtbl->EnumViews(This,ppEnum);
}
static FORCEINLINE HRESULT ITfContext_GetStatus(ITfContext* This,TF_STATUS *pdcs) {
    return This->lpVtbl->GetStatus(This,pdcs);
}
static FORCEINLINE HRESULT ITfContext_GetProperty(ITfContext* This,REFGUID guidProp,ITfProperty **ppProp) {
    return This->lpVtbl->GetProperty(This,guidProp,ppProp);
}
static FORCEINLINE HRESULT ITfContext_GetAppProperty(ITfContext* This,REFGUID guidProp,ITfReadOnlyProperty **ppProp) {
    return This->lpVtbl->GetAppProperty(This,guidProp,ppProp);
}
static FORCEINLINE HRESULT ITfContext_TrackProperties(ITfContext* This,const GUID **prgProp,ULONG cProp,const GUID **prgAppProp,ULONG cAppProp,ITfReadOnlyProperty **ppProperty) {
    return This->lpVtbl->TrackProperties(This,prgProp,cProp,prgAppProp,cAppProp,ppProperty);
}
static FORCEINLINE HRESULT ITfContext_EnumProperties(ITfContext* This,IEnumTfProperties **ppEnum) {
    return This->lpVtbl->EnumProperties(This,ppEnum);
}
static FORCEINLINE HRESULT ITfContext_GetDocumentMgr(ITfContext* This,ITfDocumentMgr **ppDm) {
    return This->lpVtbl->GetDocumentMgr(This,ppDm);
}
static FORCEINLINE HRESULT ITfContext_CreateRangeBackup(ITfContext* This,TfEditCookie ec,ITfRange *pRange,ITfRangeBackup **ppBackup) {
    return This->lpVtbl->CreateRangeBackup(This,ec,pRange,ppBackup);
}
#endif
#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)
MIDL_INTERFACE("4ea48a35-60ae-446f-8fd6-e6a8d82459f7")
ITfSource : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE AdviseSink(
        REFIID riid,
        IUnknown *punk,
        DWORD *pdwCookie) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnadviseSink(
        DWORD dwCookie) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfSource, 0x4ea48a35, 0x60ae, 0x446f, 0x8f,0xd6, 0xe6,0xa8,0xd8,0x24,0x59,0xf7)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfSource_QueryInterface(ITfSource* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfSource_AddRef(ITfSource* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfSource_Release(ITfSource* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfSource methods ***/
static FORCEINLINE HRESULT ITfSource_AdviseSink(ITfSource* This,REFIID riid,IUnknown *punk,DWORD *pdwCookie) {
    return This->lpVtbl->AdviseSink(This,riid,punk,pdwCookie);
}
static FORCEINLINE HRESULT ITfSource_UnadviseSink(ITfSource* This,DWORD dwCookie) {
    return This->lpVtbl->UnadviseSink(This,dwCookie);
}
#endif
#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)
MIDL_INTERFACE("1f02b6c5-7842-4ee6-8a0b-9a24183a95ca")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfInputProcessorProfiles, 0x1f02b6c5, 0x7842, 0x4ee6, 0x8a,0x0b, 0x9a,0x24,0x18,0x3a,0x95,0xca)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfInputProcessorProfiles_QueryInterface(ITfInputProcessorProfiles* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfInputProcessorProfiles_AddRef(ITfInputProcessorProfiles* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfInputProcessorProfiles_Release(ITfInputProcessorProfiles* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfInputProcessorProfiles methods ***/
static FORCEINLINE HRESULT ITfInputProcessorProfiles_Register(ITfInputProcessorProfiles* This,REFCLSID rclsid) {
    return This->lpVtbl->Register(This,rclsid);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_Unregister(ITfInputProcessorProfiles* This,REFCLSID rclsid) {
    return This->lpVtbl->Unregister(This,rclsid);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_AddLanguageProfile(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,const WCHAR *pchDesc,ULONG cchDesc,const WCHAR *pchIconFile,ULONG cchFile,ULONG uIconIndex) {
    return This->lpVtbl->AddLanguageProfile(This,rclsid,langid,guidProfile,pchDesc,cchDesc,pchIconFile,cchFile,uIconIndex);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_RemoveLanguageProfile(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile) {
    return This->lpVtbl->RemoveLanguageProfile(This,rclsid,langid,guidProfile);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_EnumInputProcessorInfo(ITfInputProcessorProfiles* This,IEnumGUID **ppEnum) {
    return This->lpVtbl->EnumInputProcessorInfo(This,ppEnum);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_GetDefaultLanguageProfile(ITfInputProcessorProfiles* This,LANGID langid,REFGUID catid,CLSID *pclsid,GUID *pguidProfile) {
    return This->lpVtbl->GetDefaultLanguageProfile(This,langid,catid,pclsid,pguidProfile);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_SetDefaultLanguageProfile(ITfInputProcessorProfiles* This,LANGID langid,REFCLSID rclsid,REFGUID guidProfiles) {
    return This->lpVtbl->SetDefaultLanguageProfile(This,langid,rclsid,guidProfiles);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_ActivateLanguageProfile(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfiles) {
    return This->lpVtbl->ActivateLanguageProfile(This,rclsid,langid,guidProfiles);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_GetActiveLanguageProfile(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID *plangid,GUID *pguidProfile) {
    return This->lpVtbl->GetActiveLanguageProfile(This,rclsid,plangid,pguidProfile);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_GetLanguageProfileDescription(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,BSTR *pbstrProfile) {
    return This->lpVtbl->GetLanguageProfileDescription(This,rclsid,langid,guidProfile,pbstrProfile);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_GetCurrentLanguage(ITfInputProcessorProfiles* This,LANGID *plangid) {
    return This->lpVtbl->GetCurrentLanguage(This,plangid);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_ChangeCurrentLanguage(ITfInputProcessorProfiles* This,LANGID langid) {
    return This->lpVtbl->ChangeCurrentLanguage(This,langid);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_GetLanguageList(ITfInputProcessorProfiles* This,LANGID **ppLangId,ULONG *pulCount) {
    return This->lpVtbl->GetLanguageList(This,ppLangId,pulCount);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_EnumLanguageProfiles(ITfInputProcessorProfiles* This,LANGID langid,IEnumTfLanguageProfiles **ppEnum) {
    return This->lpVtbl->EnumLanguageProfiles(This,langid,ppEnum);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_EnableLanguageProfile(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,BOOL fEnable) {
    return This->lpVtbl->EnableLanguageProfile(This,rclsid,langid,guidProfile,fEnable);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_IsEnabledLanguageProfile(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,BOOL *pfEnable) {
    return This->lpVtbl->IsEnabledLanguageProfile(This,rclsid,langid,guidProfile,pfEnable);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_EnableLanguageProfileByDefault(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,BOOL fEnable) {
    return This->lpVtbl->EnableLanguageProfileByDefault(This,rclsid,langid,guidProfile,fEnable);
}
static FORCEINLINE HRESULT ITfInputProcessorProfiles_SubstituteKeyboardLayout(ITfInputProcessorProfiles* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,HKL hKL) {
    return This->lpVtbl->SubstituteKeyboardLayout(This,rclsid,langid,guidProfile,hKL);
}
#endif
#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 struct TF_INPUTPROCESSORPROFILE {
    DWORD dwProfileType;
    LANGID langid;
    CLSID clsid;
    GUID guidProfile;
    GUID catid;
    HKL hklSubstitute;
    DWORD dwCaps;
    HKL hkl;
    DWORD dwFlags;
} TF_INPUTPROCESSORPROFILE;
/*****************************************************************************
 * IEnumTfInputProcessorProfiles interface
 */
#ifndef __IEnumTfInputProcessorProfiles_INTERFACE_DEFINED__
#define __IEnumTfInputProcessorProfiles_INTERFACE_DEFINED__

DEFINE_GUID(IID_IEnumTfInputProcessorProfiles, 0x71c6e74d, 0x0f28, 0x11d8, 0xa8,0x2a, 0x00,0x06,0x5b,0x84,0x43,0x5c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("71c6e74d-0f28-11d8-a82a-00065b84435c")
IEnumTfInputProcessorProfiles : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Clone(
        IEnumTfInputProcessorProfiles **ppEnum) = 0;

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

    virtual HRESULT STDMETHODCALLTYPE Reset(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Skip(
        ULONG ulCount) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumTfInputProcessorProfiles, 0x71c6e74d, 0x0f28, 0x11d8, 0xa8,0x2a, 0x00,0x06,0x5b,0x84,0x43,0x5c)
#endif
#else
typedef struct IEnumTfInputProcessorProfilesVtbl {
    BEGIN_INTERFACE

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

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

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

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

    HRESULT (STDMETHODCALLTYPE *Next)(
        IEnumTfInputProcessorProfiles* This,
        ULONG ulCount,
        TF_INPUTPROCESSORPROFILE *pProfile,
        ULONG *pcFetch);

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

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

    END_INTERFACE
} IEnumTfInputProcessorProfilesVtbl;
interface IEnumTfInputProcessorProfiles {
    CONST_VTBL IEnumTfInputProcessorProfilesVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IEnumTfInputProcessorProfiles_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumTfInputProcessorProfiles_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumTfInputProcessorProfiles_Release(This) (This)->lpVtbl->Release(This)
/*** IEnumTfInputProcessorProfiles methods ***/
#define IEnumTfInputProcessorProfiles_Clone(This,ppEnum) (This)->lpVtbl->Clone(This,ppEnum)
#define IEnumTfInputProcessorProfiles_Next(This,ulCount,pProfile,pcFetch) (This)->lpVtbl->Next(This,ulCount,pProfile,pcFetch)
#define IEnumTfInputProcessorProfiles_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumTfInputProcessorProfiles_Skip(This,ulCount) (This)->lpVtbl->Skip(This,ulCount)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumTfInputProcessorProfiles_QueryInterface(IEnumTfInputProcessorProfiles* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumTfInputProcessorProfiles_AddRef(IEnumTfInputProcessorProfiles* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumTfInputProcessorProfiles_Release(IEnumTfInputProcessorProfiles* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumTfInputProcessorProfiles methods ***/
static FORCEINLINE HRESULT IEnumTfInputProcessorProfiles_Clone(IEnumTfInputProcessorProfiles* This,IEnumTfInputProcessorProfiles **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumTfInputProcessorProfiles_Next(IEnumTfInputProcessorProfiles* This,ULONG ulCount,TF_INPUTPROCESSORPROFILE *pProfile,ULONG *pcFetch) {
    return This->lpVtbl->Next(This,ulCount,pProfile,pcFetch);
}
static FORCEINLINE HRESULT IEnumTfInputProcessorProfiles_Reset(IEnumTfInputProcessorProfiles* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumTfInputProcessorProfiles_Skip(IEnumTfInputProcessorProfiles* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE IEnumTfInputProcessorProfiles_Clone_Proxy(
    IEnumTfInputProcessorProfiles* This,
    IEnumTfInputProcessorProfiles **ppEnum);
void __RPC_STUB IEnumTfInputProcessorProfiles_Clone_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfInputProcessorProfiles_Next_Proxy(
    IEnumTfInputProcessorProfiles* This,
    ULONG ulCount,
    TF_INPUTPROCESSORPROFILE *pProfile,
    ULONG *pcFetch);
void __RPC_STUB IEnumTfInputProcessorProfiles_Next_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfInputProcessorProfiles_Reset_Proxy(
    IEnumTfInputProcessorProfiles* This);
void __RPC_STUB IEnumTfInputProcessorProfiles_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IEnumTfInputProcessorProfiles_Skip_Proxy(
    IEnumTfInputProcessorProfiles* This,
    ULONG ulCount);
void __RPC_STUB IEnumTfInputProcessorProfiles_Skip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IEnumTfInputProcessorProfiles_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfInputProcessorProfileMgr interface
 */
#ifndef __ITfInputProcessorProfileMgr_INTERFACE_DEFINED__
#define __ITfInputProcessorProfileMgr_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfInputProcessorProfileMgr, 0x71c6e74c, 0x0f28, 0x11d8, 0xa8,0x2a, 0x00,0x06,0x5b,0x84,0x43,0x5c);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("71c6e74c-0f28-11d8-a82a-00065b84435c")
ITfInputProcessorProfileMgr : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE ActivateProfile(
        DWORD dwProfileType,
        LANGID langid,
        REFCLSID clsid,
        REFGUID guidProfile,
        HKL hkl,
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE DeactivateProfile(
        DWORD dwProfileType,
        LANGID langid,
        REFCLSID clsid,
        REFGUID guidProfile,
        HKL hkl,
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetProfile(
        DWORD dwProfileType,
        LANGID langid,
        REFCLSID clsid,
        REFGUID guidProfile,
        HKL hkl,
        TF_INPUTPROCESSORPROFILE *pProfile) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumProfiles(
        LANGID langid,
        IEnumTfInputProcessorProfiles **ppEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReleaseInputProcessor(
        REFCLSID rclsid,
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE RegisterProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        const WCHAR *pchDesc,
        ULONG cchDesc,
        const WCHAR *pchIconFile,
        ULONG cchFile,
        ULONG uIconIndex,
        HKL hklsubstitute,
        DWORD dwPreferredLayout,
        BOOL bEnabledByDefault,
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnregisterProfile(
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetActiveProfile(
        REFGUID catid,
        TF_INPUTPROCESSORPROFILE *pProfile) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfInputProcessorProfileMgr, 0x71c6e74c, 0x0f28, 0x11d8, 0xa8,0x2a, 0x00,0x06,0x5b,0x84,0x43,0x5c)
#endif
#else
typedef struct ITfInputProcessorProfileMgrVtbl {
    BEGIN_INTERFACE

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

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

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

    /*** ITfInputProcessorProfileMgr methods ***/
    HRESULT (STDMETHODCALLTYPE *ActivateProfile)(
        ITfInputProcessorProfileMgr* This,
        DWORD dwProfileType,
        LANGID langid,
        REFCLSID clsid,
        REFGUID guidProfile,
        HKL hkl,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *DeactivateProfile)(
        ITfInputProcessorProfileMgr* This,
        DWORD dwProfileType,
        LANGID langid,
        REFCLSID clsid,
        REFGUID guidProfile,
        HKL hkl,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *GetProfile)(
        ITfInputProcessorProfileMgr* This,
        DWORD dwProfileType,
        LANGID langid,
        REFCLSID clsid,
        REFGUID guidProfile,
        HKL hkl,
        TF_INPUTPROCESSORPROFILE *pProfile);

    HRESULT (STDMETHODCALLTYPE *EnumProfiles)(
        ITfInputProcessorProfileMgr* This,
        LANGID langid,
        IEnumTfInputProcessorProfiles **ppEnum);

    HRESULT (STDMETHODCALLTYPE *ReleaseInputProcessor)(
        ITfInputProcessorProfileMgr* This,
        REFCLSID rclsid,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *RegisterProfile)(
        ITfInputProcessorProfileMgr* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        const WCHAR *pchDesc,
        ULONG cchDesc,
        const WCHAR *pchIconFile,
        ULONG cchFile,
        ULONG uIconIndex,
        HKL hklsubstitute,
        DWORD dwPreferredLayout,
        BOOL bEnabledByDefault,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *UnregisterProfile)(
        ITfInputProcessorProfileMgr* This,
        REFCLSID rclsid,
        LANGID langid,
        REFGUID guidProfile,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *GetActiveProfile)(
        ITfInputProcessorProfileMgr* This,
        REFGUID catid,
        TF_INPUTPROCESSORPROFILE *pProfile);

    END_INTERFACE
} ITfInputProcessorProfileMgrVtbl;
interface ITfInputProcessorProfileMgr {
    CONST_VTBL ITfInputProcessorProfileMgrVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITfInputProcessorProfileMgr_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfInputProcessorProfileMgr_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfInputProcessorProfileMgr_Release(This) (This)->lpVtbl->Release(This)
/*** ITfInputProcessorProfileMgr methods ***/
#define ITfInputProcessorProfileMgr_ActivateProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,dwFlags) (This)->lpVtbl->ActivateProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,dwFlags)
#define ITfInputProcessorProfileMgr_DeactivateProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,dwFlags) (This)->lpVtbl->DeactivateProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,dwFlags)
#define ITfInputProcessorProfileMgr_GetProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,pProfile) (This)->lpVtbl->GetProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,pProfile)
#define ITfInputProcessorProfileMgr_EnumProfiles(This,langid,ppEnum) (This)->lpVtbl->EnumProfiles(This,langid,ppEnum)
#define ITfInputProcessorProfileMgr_ReleaseInputProcessor(This,rclsid,dwFlags) (This)->lpVtbl->ReleaseInputProcessor(This,rclsid,dwFlags)
#define ITfInputProcessorProfileMgr_RegisterProfile(This,rclsid,langid,guidProfile,pchDesc,cchDesc,pchIconFile,cchFile,uIconIndex,hklsubstitute,dwPreferredLayout,bEnabledByDefault,dwFlags) (This)->lpVtbl->RegisterProfile(This,rclsid,langid,guidProfile,pchDesc,cchDesc,pchIconFile,cchFile,uIconIndex,hklsubstitute,dwPreferredLayout,bEnabledByDefault,dwFlags)
#define ITfInputProcessorProfileMgr_UnregisterProfile(This,rclsid,langid,guidProfile,dwFlags) (This)->lpVtbl->UnregisterProfile(This,rclsid,langid,guidProfile,dwFlags)
#define ITfInputProcessorProfileMgr_GetActiveProfile(This,catid,pProfile) (This)->lpVtbl->GetActiveProfile(This,catid,pProfile)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_QueryInterface(ITfInputProcessorProfileMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfInputProcessorProfileMgr_AddRef(ITfInputProcessorProfileMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfInputProcessorProfileMgr_Release(ITfInputProcessorProfileMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfInputProcessorProfileMgr methods ***/
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_ActivateProfile(ITfInputProcessorProfileMgr* This,DWORD dwProfileType,LANGID langid,REFCLSID clsid,REFGUID guidProfile,HKL hkl,DWORD dwFlags) {
    return This->lpVtbl->ActivateProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,dwFlags);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_DeactivateProfile(ITfInputProcessorProfileMgr* This,DWORD dwProfileType,LANGID langid,REFCLSID clsid,REFGUID guidProfile,HKL hkl,DWORD dwFlags) {
    return This->lpVtbl->DeactivateProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,dwFlags);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_GetProfile(ITfInputProcessorProfileMgr* This,DWORD dwProfileType,LANGID langid,REFCLSID clsid,REFGUID guidProfile,HKL hkl,TF_INPUTPROCESSORPROFILE *pProfile) {
    return This->lpVtbl->GetProfile(This,dwProfileType,langid,clsid,guidProfile,hkl,pProfile);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_EnumProfiles(ITfInputProcessorProfileMgr* This,LANGID langid,IEnumTfInputProcessorProfiles **ppEnum) {
    return This->lpVtbl->EnumProfiles(This,langid,ppEnum);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_ReleaseInputProcessor(ITfInputProcessorProfileMgr* This,REFCLSID rclsid,DWORD dwFlags) {
    return This->lpVtbl->ReleaseInputProcessor(This,rclsid,dwFlags);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_RegisterProfile(ITfInputProcessorProfileMgr* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,const WCHAR *pchDesc,ULONG cchDesc,const WCHAR *pchIconFile,ULONG cchFile,ULONG uIconIndex,HKL hklsubstitute,DWORD dwPreferredLayout,BOOL bEnabledByDefault,DWORD dwFlags) {
    return This->lpVtbl->RegisterProfile(This,rclsid,langid,guidProfile,pchDesc,cchDesc,pchIconFile,cchFile,uIconIndex,hklsubstitute,dwPreferredLayout,bEnabledByDefault,dwFlags);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_UnregisterProfile(ITfInputProcessorProfileMgr* This,REFCLSID rclsid,LANGID langid,REFGUID guidProfile,DWORD dwFlags) {
    return This->lpVtbl->UnregisterProfile(This,rclsid,langid,guidProfile,dwFlags);
}
static FORCEINLINE HRESULT ITfInputProcessorProfileMgr_GetActiveProfile(ITfInputProcessorProfileMgr* This,REFGUID catid,TF_INPUTPROCESSORPROFILE *pProfile) {
    return This->lpVtbl->GetActiveProfile(This,catid,pProfile);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_ActivateProfile_Proxy(
    ITfInputProcessorProfileMgr* This,
    DWORD dwProfileType,
    LANGID langid,
    REFCLSID clsid,
    REFGUID guidProfile,
    HKL hkl,
    DWORD dwFlags);
void __RPC_STUB ITfInputProcessorProfileMgr_ActivateProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_DeactivateProfile_Proxy(
    ITfInputProcessorProfileMgr* This,
    DWORD dwProfileType,
    LANGID langid,
    REFCLSID clsid,
    REFGUID guidProfile,
    HKL hkl,
    DWORD dwFlags);
void __RPC_STUB ITfInputProcessorProfileMgr_DeactivateProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_GetProfile_Proxy(
    ITfInputProcessorProfileMgr* This,
    DWORD dwProfileType,
    LANGID langid,
    REFCLSID clsid,
    REFGUID guidProfile,
    HKL hkl,
    TF_INPUTPROCESSORPROFILE *pProfile);
void __RPC_STUB ITfInputProcessorProfileMgr_GetProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_EnumProfiles_Proxy(
    ITfInputProcessorProfileMgr* This,
    LANGID langid,
    IEnumTfInputProcessorProfiles **ppEnum);
void __RPC_STUB ITfInputProcessorProfileMgr_EnumProfiles_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_ReleaseInputProcessor_Proxy(
    ITfInputProcessorProfileMgr* This,
    REFCLSID rclsid,
    DWORD dwFlags);
void __RPC_STUB ITfInputProcessorProfileMgr_ReleaseInputProcessor_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_RegisterProfile_Proxy(
    ITfInputProcessorProfileMgr* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    const WCHAR *pchDesc,
    ULONG cchDesc,
    const WCHAR *pchIconFile,
    ULONG cchFile,
    ULONG uIconIndex,
    HKL hklsubstitute,
    DWORD dwPreferredLayout,
    BOOL bEnabledByDefault,
    DWORD dwFlags);
void __RPC_STUB ITfInputProcessorProfileMgr_RegisterProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_UnregisterProfile_Proxy(
    ITfInputProcessorProfileMgr* This,
    REFCLSID rclsid,
    LANGID langid,
    REFGUID guidProfile,
    DWORD dwFlags);
void __RPC_STUB ITfInputProcessorProfileMgr_UnregisterProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfInputProcessorProfileMgr_GetActiveProfile_Proxy(
    ITfInputProcessorProfileMgr* This,
    REFGUID catid,
    TF_INPUTPROCESSORPROFILE *pProfile);
void __RPC_STUB ITfInputProcessorProfileMgr_GetActiveProfile_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfInputProcessorProfileMgr_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;
    __C89_NAMELESS union {
        int nIndex;
        COLORREF cr;
    } __C89_NAMELESSUNIONNAME;
} 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)
MIDL_INTERFACE("70528852-2f26-4aea-8c96-215150578932")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfDisplayAttributeInfo, 0x70528852, 0x2f26, 0x4aea, 0x8c,0x96, 0x21,0x51,0x50,0x57,0x89,0x32)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfDisplayAttributeInfo_QueryInterface(ITfDisplayAttributeInfo* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfDisplayAttributeInfo_AddRef(ITfDisplayAttributeInfo* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfDisplayAttributeInfo_Release(ITfDisplayAttributeInfo* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfDisplayAttributeInfo methods ***/
static FORCEINLINE HRESULT ITfDisplayAttributeInfo_GetGUID(ITfDisplayAttributeInfo* This,GUID *pguid) {
    return This->lpVtbl->GetGUID(This,pguid);
}
static FORCEINLINE HRESULT ITfDisplayAttributeInfo_GetDescription(ITfDisplayAttributeInfo* This,BSTR *pbstrDesc) {
    return This->lpVtbl->GetDescription(This,pbstrDesc);
}
static FORCEINLINE HRESULT ITfDisplayAttributeInfo_GetAttributeInfo(ITfDisplayAttributeInfo* This,TF_DISPLAYATTRIBUTE *pda) {
    return This->lpVtbl->GetAttributeInfo(This,pda);
}
static FORCEINLINE HRESULT ITfDisplayAttributeInfo_SetAttributeInfo(ITfDisplayAttributeInfo* This,const TF_DISPLAYATTRIBUTE *pda) {
    return This->lpVtbl->SetAttributeInfo(This,pda);
}
static FORCEINLINE HRESULT ITfDisplayAttributeInfo_Reset(ITfDisplayAttributeInfo* This) {
    return This->lpVtbl->Reset(This);
}
#endif
#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)
MIDL_INTERFACE("7cef04d7-cb75-4e80-a7ab-5f5bc7d332de")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumTfDisplayAttributeInfo, 0x7cef04d7, 0xcb75, 0x4e80, 0xa7,0xab, 0x5f,0x5b,0xc7,0xd3,0x32,0xde)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumTfDisplayAttributeInfo_QueryInterface(IEnumTfDisplayAttributeInfo* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumTfDisplayAttributeInfo_AddRef(IEnumTfDisplayAttributeInfo* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumTfDisplayAttributeInfo_Release(IEnumTfDisplayAttributeInfo* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumTfDisplayAttributeInfo methods ***/
static FORCEINLINE HRESULT IEnumTfDisplayAttributeInfo_Clone(IEnumTfDisplayAttributeInfo* This,IEnumTfDisplayAttributeInfo **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumTfDisplayAttributeInfo_Next(IEnumTfDisplayAttributeInfo* This,ULONG ulCount,ITfDisplayAttributeInfo **rgInfo,ULONG *pcFetched) {
    return This->lpVtbl->Next(This,ulCount,rgInfo,pcFetched);
}
static FORCEINLINE HRESULT IEnumTfDisplayAttributeInfo_Reset(IEnumTfDisplayAttributeInfo* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumTfDisplayAttributeInfo_Skip(IEnumTfDisplayAttributeInfo* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#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)
MIDL_INTERFACE("8ded7393-5db1-475c-9e71-a39111b0ff67")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfDisplayAttributeMgr, 0x8ded7393, 0x5db1, 0x475c, 0x9e,0x71, 0xa3,0x91,0x11,0xb0,0xff,0x67)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfDisplayAttributeMgr_QueryInterface(ITfDisplayAttributeMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfDisplayAttributeMgr_AddRef(ITfDisplayAttributeMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfDisplayAttributeMgr_Release(ITfDisplayAttributeMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfDisplayAttributeMgr methods ***/
static FORCEINLINE HRESULT ITfDisplayAttributeMgr_OnUpdateInfo(ITfDisplayAttributeMgr* This) {
    return This->lpVtbl->OnUpdateInfo(This);
}
static FORCEINLINE HRESULT ITfDisplayAttributeMgr_EnumDisplayAttributeInfo(ITfDisplayAttributeMgr* This,IEnumTfDisplayAttributeInfo **ppEnum) {
    return This->lpVtbl->EnumDisplayAttributeInfo(This,ppEnum);
}
static FORCEINLINE HRESULT ITfDisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttributeMgr* This,REFGUID guid,ITfDisplayAttributeInfo **ppInfo,CLSID *pclsidOwner) {
    return This->lpVtbl->GetDisplayAttributeInfo(This,guid,ppInfo,pclsidOwner);
}
#endif
#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)
MIDL_INTERFACE("c3acefb5-f69d-4905-938f-fcadcf4be830")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfCategoryMgr, 0xc3acefb5, 0xf69d, 0x4905, 0x93,0x8f, 0xfc,0xad,0xcf,0x4b,0xe8,0x30)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfCategoryMgr_QueryInterface(ITfCategoryMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfCategoryMgr_AddRef(ITfCategoryMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfCategoryMgr_Release(ITfCategoryMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfCategoryMgr methods ***/
static FORCEINLINE HRESULT ITfCategoryMgr_RegisterCategory(ITfCategoryMgr* This,REFCLSID rclsid,REFGUID rcatid,REFGUID rguid) {
    return This->lpVtbl->RegisterCategory(This,rclsid,rcatid,rguid);
}
static FORCEINLINE HRESULT ITfCategoryMgr_UnregisterCategory(ITfCategoryMgr* This,REFCLSID rclsid,REFGUID rcatid,REFGUID rguid) {
    return This->lpVtbl->UnregisterCategory(This,rclsid,rcatid,rguid);
}
static FORCEINLINE HRESULT ITfCategoryMgr_EnumCategoriesInItem(ITfCategoryMgr* This,REFGUID rguid,IEnumGUID **ppEnum) {
    return This->lpVtbl->EnumCategoriesInItem(This,rguid,ppEnum);
}
static FORCEINLINE HRESULT ITfCategoryMgr_EnumItemsInCategory(ITfCategoryMgr* This,REFGUID rcatid,IEnumGUID **ppEnum) {
    return This->lpVtbl->EnumItemsInCategory(This,rcatid,ppEnum);
}
static FORCEINLINE HRESULT ITfCategoryMgr_FindClosestCategory(ITfCategoryMgr* This,REFGUID rguid,GUID *pcatid,const GUID **ppcatidList,ULONG ulCount) {
    return This->lpVtbl->FindClosestCategory(This,rguid,pcatid,ppcatidList,ulCount);
}
static FORCEINLINE HRESULT ITfCategoryMgr_RegisterGUIDDescription(ITfCategoryMgr* This,REFCLSID rclsid,REFGUID rguid,const WCHAR *pchDesc,ULONG cch) {
    return This->lpVtbl->RegisterGUIDDescription(This,rclsid,rguid,pchDesc,cch);
}
static FORCEINLINE HRESULT ITfCategoryMgr_UnregisterGUIDDescription(ITfCategoryMgr* This,REFCLSID rclsid,REFGUID rguid) {
    return This->lpVtbl->UnregisterGUIDDescription(This,rclsid,rguid);
}
static FORCEINLINE HRESULT ITfCategoryMgr_GetGUIDDescription(ITfCategoryMgr* This,REFGUID rguid,BSTR *pbstrDesc) {
    return This->lpVtbl->GetGUIDDescription(This,rguid,pbstrDesc);
}
static FORCEINLINE HRESULT ITfCategoryMgr_RegisterGUIDDWORD(ITfCategoryMgr* This,REFCLSID rclsid,REFGUID rguid,DWORD dw) {
    return This->lpVtbl->RegisterGUIDDWORD(This,rclsid,rguid,dw);
}
static FORCEINLINE HRESULT ITfCategoryMgr_UnregisterGUIDDWORD(ITfCategoryMgr* This,REFCLSID rclsid,REFGUID rguid) {
    return This->lpVtbl->UnregisterGUIDDWORD(This,rclsid,rguid);
}
static FORCEINLINE HRESULT ITfCategoryMgr_GetGUIDDWORD(ITfCategoryMgr* This,REFGUID rguid,DWORD *pdw) {
    return This->lpVtbl->GetGUIDDWORD(This,rguid,pdw);
}
static FORCEINLINE HRESULT ITfCategoryMgr_RegisterGUID(ITfCategoryMgr* This,REFGUID rguid,TfGuidAtom *pguidatom) {
    return This->lpVtbl->RegisterGUID(This,rguid,pguidatom);
}
static FORCEINLINE HRESULT ITfCategoryMgr_GetGUID(ITfCategoryMgr* This,TfGuidAtom guidatom,GUID *pguid) {
    return This->lpVtbl->GetGUID(This,guidatom,pguid);
}
static FORCEINLINE HRESULT ITfCategoryMgr_IsEqualTfGuidAtom(ITfCategoryMgr* This,TfGuidAtom guidatom,REFGUID rguid,BOOL *pfEqual) {
    return This->lpVtbl->IsEqualTfGuidAtom(This,guidatom,rguid,pfEqual);
}
#endif
#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)
MIDL_INTERFACE("8127d409-ccd3-4683-967a-b43d5b482bf7")
ITfTextEditSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnEndEdit(
        ITfContext *pic,
        TfEditCookie ecReadOnly,
        ITfEditRecord *pEditRecord) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfTextEditSink, 0x8127d409, 0xccd3, 0x4683, 0x96,0x7a, 0xb4,0x3d,0x5b,0x48,0x2b,0xf7)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfTextEditSink_QueryInterface(ITfTextEditSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfTextEditSink_AddRef(ITfTextEditSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfTextEditSink_Release(ITfTextEditSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfTextEditSink methods ***/
static FORCEINLINE HRESULT ITfTextEditSink_OnEndEdit(ITfTextEditSink* This,ITfContext *pic,TfEditCookie ecReadOnly,ITfEditRecord *pEditRecord) {
    return This->lpVtbl->OnEndEdit(This,pic,ecReadOnly,pEditRecord);
}
#endif
#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)
MIDL_INTERFACE("5f20aa40-b57a-4f34-96ab-3576f377cc79")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfContextOwnerCompositionSink, 0x5f20aa40, 0xb57a, 0x4f34, 0x96,0xab, 0x35,0x76,0xf3,0x77,0xcc,0x79)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfContextOwnerCompositionSink_QueryInterface(ITfContextOwnerCompositionSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfContextOwnerCompositionSink_AddRef(ITfContextOwnerCompositionSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfContextOwnerCompositionSink_Release(ITfContextOwnerCompositionSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfContextOwnerCompositionSink methods ***/
static FORCEINLINE HRESULT ITfContextOwnerCompositionSink_OnStartComposition(ITfContextOwnerCompositionSink* This,ITfCompositionView *pComposition,BOOL *pfOk) {
    return This->lpVtbl->OnStartComposition(This,pComposition,pfOk);
}
static FORCEINLINE HRESULT ITfContextOwnerCompositionSink_OnUpdateComposition(ITfContextOwnerCompositionSink* This,ITfCompositionView *pComposition,ITfRange *pRangeNew) {
    return This->lpVtbl->OnUpdateComposition(This,pComposition,pRangeNew);
}
static FORCEINLINE HRESULT ITfContextOwnerCompositionSink_OnEndComposition(ITfContextOwnerCompositionSink* This,ITfCompositionView *pComposition) {
    return This->lpVtbl->OnEndComposition(This,pComposition);
}
#endif
#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)
MIDL_INTERFACE("3d61bf11-ac5f-42c8-a4cb-931bcc28c744")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumTfLanguageProfiles, 0x3d61bf11, 0xac5f, 0x42c8, 0xa4,0xcb, 0x93,0x1b,0xcc,0x28,0xc7,0x44)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumTfLanguageProfiles_QueryInterface(IEnumTfLanguageProfiles* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumTfLanguageProfiles_AddRef(IEnumTfLanguageProfiles* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumTfLanguageProfiles_Release(IEnumTfLanguageProfiles* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumTfLanguageProfiles methods ***/
static FORCEINLINE HRESULT IEnumTfLanguageProfiles_Clone(IEnumTfLanguageProfiles* This,IEnumTfLanguageProfiles **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumTfLanguageProfiles_Next(IEnumTfLanguageProfiles* This,ULONG ulCount,TF_LANGUAGEPROFILE *pProfile,ULONG *pcFetch) {
    return This->lpVtbl->Next(This,ulCount,pProfile,pcFetch);
}
static FORCEINLINE HRESULT IEnumTfLanguageProfiles_Reset(IEnumTfLanguageProfiles* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumTfLanguageProfiles_Skip(IEnumTfLanguageProfiles* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#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)
MIDL_INTERFACE("aa80e7f7-2021-11d2-93e0-0060b067b86e")
ITfTextInputProcessor : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Activate(
        ITfThreadMgr *ptim,
        TfClientId tid) = 0;

    virtual HRESULT STDMETHODCALLTYPE Deactivate(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfTextInputProcessor, 0xaa80e7f7, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfTextInputProcessor_QueryInterface(ITfTextInputProcessor* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfTextInputProcessor_AddRef(ITfTextInputProcessor* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfTextInputProcessor_Release(ITfTextInputProcessor* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfTextInputProcessor methods ***/
static FORCEINLINE HRESULT ITfTextInputProcessor_Activate(ITfTextInputProcessor* This,ITfThreadMgr *ptim,TfClientId tid) {
    return This->lpVtbl->Activate(This,ptim,tid);
}
static FORCEINLINE HRESULT ITfTextInputProcessor_Deactivate(ITfTextInputProcessor* This) {
    return This->lpVtbl->Deactivate(This);
}
#endif
#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)
MIDL_INTERFACE("aa80e80e-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfThreadMgrEventSink, 0xaa80e80e, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfThreadMgrEventSink_QueryInterface(ITfThreadMgrEventSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfThreadMgrEventSink_AddRef(ITfThreadMgrEventSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfThreadMgrEventSink_Release(ITfThreadMgrEventSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfThreadMgrEventSink methods ***/
static FORCEINLINE HRESULT ITfThreadMgrEventSink_OnInitDocumentMgr(ITfThreadMgrEventSink* This,ITfDocumentMgr *pdim) {
    return This->lpVtbl->OnInitDocumentMgr(This,pdim);
}
static FORCEINLINE HRESULT ITfThreadMgrEventSink_OnUninitDocumentMgr(ITfThreadMgrEventSink* This,ITfDocumentMgr *pdim) {
    return This->lpVtbl->OnUninitDocumentMgr(This,pdim);
}
static FORCEINLINE HRESULT ITfThreadMgrEventSink_OnSetFocus(ITfThreadMgrEventSink* This,ITfDocumentMgr *pdimFocus,ITfDocumentMgr *pdimPrevFocus) {
    return This->lpVtbl->OnSetFocus(This,pdimFocus,pdimPrevFocus);
}
static FORCEINLINE HRESULT ITfThreadMgrEventSink_OnPushContext(ITfThreadMgrEventSink* This,ITfContext *pic) {
    return This->lpVtbl->OnPushContext(This,pic);
}
static FORCEINLINE HRESULT ITfThreadMgrEventSink_OnPopContext(ITfThreadMgrEventSink* This,ITfContext *pic) {
    return This->lpVtbl->OnPopContext(This,pic);
}
#endif
#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)
MIDL_INTERFACE("aa80e7f0-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfKeystrokeMgr, 0xaa80e7f0, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfKeystrokeMgr_QueryInterface(ITfKeystrokeMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfKeystrokeMgr_AddRef(ITfKeystrokeMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfKeystrokeMgr_Release(ITfKeystrokeMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfKeystrokeMgr methods ***/
static FORCEINLINE HRESULT ITfKeystrokeMgr_AdviseKeyEventSink(ITfKeystrokeMgr* This,TfClientId tid,ITfKeyEventSink *pSink,BOOL fForeground) {
    return This->lpVtbl->AdviseKeyEventSink(This,tid,pSink,fForeground);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_UnadviseKeyEventSink(ITfKeystrokeMgr* This,TfClientId tid) {
    return This->lpVtbl->UnadviseKeyEventSink(This,tid);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_GetForeground(ITfKeystrokeMgr* This,CLSID *pclsid) {
    return This->lpVtbl->GetForeground(This,pclsid);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_TestKeyDown(ITfKeystrokeMgr* This,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->TestKeyDown(This,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_TestKeyUp(ITfKeystrokeMgr* This,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->TestKeyUp(This,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_KeyDown(ITfKeystrokeMgr* This,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->KeyDown(This,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_KeyUp(ITfKeystrokeMgr* This,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->KeyUp(This,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_GetPreservedKey(ITfKeystrokeMgr* This,ITfContext *pic,const TF_PRESERVEDKEY *pprekey,GUID *pguid) {
    return This->lpVtbl->GetPreservedKey(This,pic,pprekey,pguid);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_IsPreservedKey(ITfKeystrokeMgr* This,REFGUID rguid,const TF_PRESERVEDKEY *pprekey,BOOL *pfRegistered) {
    return This->lpVtbl->IsPreservedKey(This,rguid,pprekey,pfRegistered);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_PreserveKey(ITfKeystrokeMgr* This,TfClientId tid,REFGUID rguid,const TF_PRESERVEDKEY *prekey,const WCHAR *pchDesc,ULONG cchDesc) {
    return This->lpVtbl->PreserveKey(This,tid,rguid,prekey,pchDesc,cchDesc);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_UnpreserveKey(ITfKeystrokeMgr* This,REFGUID rguid,const TF_PRESERVEDKEY *pprekey) {
    return This->lpVtbl->UnpreserveKey(This,rguid,pprekey);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_SetPreservedKeyDescription(ITfKeystrokeMgr* This,REFGUID rguid,const WCHAR *pchDesc,ULONG cchDesc) {
    return This->lpVtbl->SetPreservedKeyDescription(This,rguid,pchDesc,cchDesc);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_GetPreservedKeyDescription(ITfKeystrokeMgr* This,REFGUID rguid,BSTR *pbstrDesc) {
    return This->lpVtbl->GetPreservedKeyDescription(This,rguid,pbstrDesc);
}
static FORCEINLINE HRESULT ITfKeystrokeMgr_SimulatePreservedKey(ITfKeystrokeMgr* This,ITfContext *pic,REFGUID rguid,BOOL *pfEaten) {
    return This->lpVtbl->SimulatePreservedKey(This,pic,rguid,pfEaten);
}
#endif
#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)
MIDL_INTERFACE("aa80e7f5-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfKeyEventSink, 0xaa80e7f5, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfKeyEventSink_QueryInterface(ITfKeyEventSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfKeyEventSink_AddRef(ITfKeyEventSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfKeyEventSink_Release(ITfKeyEventSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfKeyEventSink methods ***/
static FORCEINLINE HRESULT ITfKeyEventSink_OnSetFocus(ITfKeyEventSink* This,BOOL fForeground) {
    return This->lpVtbl->OnSetFocus(This,fForeground);
}
static FORCEINLINE HRESULT ITfKeyEventSink_OnTestKeyDown(ITfKeyEventSink* This,ITfContext *pic,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->OnTestKeyDown(This,pic,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeyEventSink_OnTestKeyUp(ITfKeyEventSink* This,ITfContext *pic,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->OnTestKeyUp(This,pic,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeyEventSink_OnKeyDown(ITfKeyEventSink* This,ITfContext *pic,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->OnKeyDown(This,pic,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeyEventSink_OnKeyUp(ITfKeyEventSink* This,ITfContext *pic,WPARAM wParam,LPARAM lParam,BOOL *pfEaten) {
    return This->lpVtbl->OnKeyUp(This,pic,wParam,lParam,pfEaten);
}
static FORCEINLINE HRESULT ITfKeyEventSink_OnPreservedKey(ITfKeyEventSink* This,ITfContext *pic,REFGUID rguid,BOOL *pfEaten) {
    return This->lpVtbl->OnPreservedKey(This,pic,rguid,pfEaten);
}
#endif
#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)
MIDL_INTERFACE("8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfMessagePump, 0x8f1b8ad8, 0x0b6b, 0x4874, 0x90,0xc5, 0xbd,0x76,0x01,0x1e,0x8f,0x7c)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfMessagePump_QueryInterface(ITfMessagePump* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfMessagePump_AddRef(ITfMessagePump* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfMessagePump_Release(ITfMessagePump* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfMessagePump methods ***/
static FORCEINLINE HRESULT ITfMessagePump_PeekMessageA(ITfMessagePump* This,LPMSG pMsg,HWND hwnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg,BOOL *pfResult) {
    return This->lpVtbl->PeekMessageA(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg,pfResult);
}
static FORCEINLINE HRESULT ITfMessagePump_GetMessageA(ITfMessagePump* This,LPMSG pMsg,HWND hwnd,UINT wMsgFilterMin,UINT wMsgFilterMax,BOOL *pfResult) {
    return This->lpVtbl->GetMessageA(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,pfResult);
}
static FORCEINLINE HRESULT ITfMessagePump_PeekMessageW(ITfMessagePump* This,LPMSG pMsg,HWND hwnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg,BOOL *pfResult) {
    return This->lpVtbl->PeekMessageW(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg,pfResult);
}
static FORCEINLINE HRESULT ITfMessagePump_GetMessageW(ITfMessagePump* This,LPMSG pMsg,HWND hwnd,UINT wMsgFilterMin,UINT wMsgFilterMax,BOOL *pfResult) {
    return This->lpVtbl->GetMessageW(This,pMsg,hwnd,wMsgFilterMin,wMsgFilterMax,pfResult);
}
#endif
#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)
MIDL_INTERFACE("d60a7b49-1b9f-4be2-b702-47e9dc05dec3")
ITfClientId : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetClientId(
        REFCLSID rclsid,
        TfClientId *ptid) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfClientId, 0xd60a7b49, 0x1b9f, 0x4be2, 0xb7,0x02, 0x47,0xe9,0xdc,0x05,0xde,0xc3)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfClientId_QueryInterface(ITfClientId* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfClientId_AddRef(ITfClientId* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfClientId_Release(ITfClientId* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfClientId methods ***/
static FORCEINLINE HRESULT ITfClientId_GetClientId(ITfClientId* This,REFCLSID rclsid,TfClientId *ptid) {
    return This->lpVtbl->GetClientId(This,rclsid,ptid);
}
#endif
#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)
MIDL_INTERFACE("43c9fe15-f494-4c17-9de2-b8a4ac350aa8")
ITfLanguageProfileNotifySink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnLanguageChange(
        LANGID langid,
        BOOL *pfAccept) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnLanguageChanged(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfLanguageProfileNotifySink, 0x43c9fe15, 0xf494, 0x4c17, 0x9d,0xe2, 0xb8,0xa4,0xac,0x35,0x0a,0xa8)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfLanguageProfileNotifySink_QueryInterface(ITfLanguageProfileNotifySink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfLanguageProfileNotifySink_AddRef(ITfLanguageProfileNotifySink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfLanguageProfileNotifySink_Release(ITfLanguageProfileNotifySink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfLanguageProfileNotifySink methods ***/
static FORCEINLINE HRESULT ITfLanguageProfileNotifySink_OnLanguageChange(ITfLanguageProfileNotifySink* This,LANGID langid,BOOL *pfAccept) {
    return This->lpVtbl->OnLanguageChange(This,langid,pfAccept);
}
static FORCEINLINE HRESULT ITfLanguageProfileNotifySink_OnLanguageChanged(ITfLanguageProfileNotifySink* This) {
    return This->lpVtbl->OnLanguageChanged(This);
}
#endif
#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)
MIDL_INTERFACE("aa80e803-2021-11d2-93e0-0060b067b86e")
ITfEditSession : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE DoEditSession(
        TfEditCookie ec) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfEditSession, 0xaa80e803, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfEditSession_QueryInterface(ITfEditSession* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfEditSession_AddRef(ITfEditSession* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfEditSession_Release(ITfEditSession* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfEditSession methods ***/
static FORCEINLINE HRESULT ITfEditSession_DoEditSession(ITfEditSession* This,TfEditCookie ec) {
    return This->lpVtbl->DoEditSession(This,ec);
}
#endif
#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)
MIDL_INTERFACE("aa80e7ff-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfRange, 0xaa80e7ff, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfRange_QueryInterface(ITfRange* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfRange_AddRef(ITfRange* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfRange_Release(ITfRange* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfRange methods ***/
static FORCEINLINE HRESULT ITfRange_GetText(ITfRange* This,TfEditCookie ec,DWORD dwFlags,WCHAR *pchText,ULONG cchMax,ULONG *pcch) {
    return This->lpVtbl->GetText(This,ec,dwFlags,pchText,cchMax,pcch);
}
static FORCEINLINE HRESULT ITfRange_SetText(ITfRange* This,TfEditCookie ec,DWORD dwFlags,const WCHAR *pchText,LONG cch) {
    return This->lpVtbl->SetText(This,ec,dwFlags,pchText,cch);
}
static FORCEINLINE HRESULT ITfRange_GetFormattedText(ITfRange* This,TfEditCookie ec,IDataObject **ppDataObject) {
    return This->lpVtbl->GetFormattedText(This,ec,ppDataObject);
}
static FORCEINLINE HRESULT ITfRange_GetEmbedded(ITfRange* This,TfEditCookie ec,REFGUID rguidService,REFIID riid,IUnknown **ppunk) {
    return This->lpVtbl->GetEmbedded(This,ec,rguidService,riid,ppunk);
}
static FORCEINLINE HRESULT ITfRange_InsertEmbedded(ITfRange* This,TfEditCookie ec,DWORD dwFlags,IDataObject *pDataObject) {
    return This->lpVtbl->InsertEmbedded(This,ec,dwFlags,pDataObject);
}
static FORCEINLINE HRESULT ITfRange_ShiftStart(ITfRange* This,TfEditCookie ec,LONG cchReq,LONG *pcch,const TF_HALTCOND *pHalt) {
    return This->lpVtbl->ShiftStart(This,ec,cchReq,pcch,pHalt);
}
static FORCEINLINE HRESULT ITfRange_ShiftEnd(ITfRange* This,TfEditCookie ec,LONG cchReq,LONG *pcch,const TF_HALTCOND *pHalt) {
    return This->lpVtbl->ShiftEnd(This,ec,cchReq,pcch,pHalt);
}
static FORCEINLINE HRESULT ITfRange_ShiftStartToRange(ITfRange* This,TfEditCookie ec,ITfRange *pRange,TfAnchor aPos) {
    return This->lpVtbl->ShiftStartToRange(This,ec,pRange,aPos);
}
static FORCEINLINE HRESULT ITfRange_ShiftEndToRange(ITfRange* This,TfEditCookie ec,ITfRange *pRange,TfAnchor aPos) {
    return This->lpVtbl->ShiftEndToRange(This,ec,pRange,aPos);
}
static FORCEINLINE HRESULT ITfRange_ShiftStartRegion(ITfRange* This,TfEditCookie ec,TfShiftDir dir,BOOL *pfNoRegion) {
    return This->lpVtbl->ShiftStartRegion(This,ec,dir,pfNoRegion);
}
static FORCEINLINE HRESULT ITfRange_ShiftEndRegion(ITfRange* This,TfEditCookie ec,TfShiftDir dir,BOOL *pfNoRegion) {
    return This->lpVtbl->ShiftEndRegion(This,ec,dir,pfNoRegion);
}
static FORCEINLINE HRESULT ITfRange_IsEmpty(ITfRange* This,TfEditCookie ec,BOOL *pfEmpty) {
    return This->lpVtbl->IsEmpty(This,ec,pfEmpty);
}
static FORCEINLINE HRESULT ITfRange_Collapse(ITfRange* This,TfEditCookie ec,TfAnchor aPos) {
    return This->lpVtbl->Collapse(This,ec,aPos);
}
static FORCEINLINE HRESULT ITfRange_IsEqualStart(ITfRange* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,BOOL *pfEqual) {
    return This->lpVtbl->IsEqualStart(This,ec,pWith,aPos,pfEqual);
}
static FORCEINLINE HRESULT ITfRange_IsEqualEnd(ITfRange* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,BOOL *pfEqual) {
    return This->lpVtbl->IsEqualEnd(This,ec,pWith,aPos,pfEqual);
}
static FORCEINLINE HRESULT ITfRange_CompareStart(ITfRange* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,LONG *plResult) {
    return This->lpVtbl->CompareStart(This,ec,pWith,aPos,plResult);
}
static FORCEINLINE HRESULT ITfRange_CompareEnd(ITfRange* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,LONG *plResult) {
    return This->lpVtbl->CompareEnd(This,ec,pWith,aPos,plResult);
}
static FORCEINLINE HRESULT ITfRange_AdjustForInsert(ITfRange* This,TfEditCookie ec,ULONG cchInsert,BOOL *pfInsertOk) {
    return This->lpVtbl->AdjustForInsert(This,ec,cchInsert,pfInsertOk);
}
static FORCEINLINE HRESULT ITfRange_GetGravity(ITfRange* This,TfGravity *pgStart,TfGravity *pgEnd) {
    return This->lpVtbl->GetGravity(This,pgStart,pgEnd);
}
static FORCEINLINE HRESULT ITfRange_SetGravity(ITfRange* This,TfEditCookie ec,TfGravity gStart,TfGravity gEnd) {
    return This->lpVtbl->SetGravity(This,ec,gStart,gEnd);
}
static FORCEINLINE HRESULT ITfRange_Clone(ITfRange* This,ITfRange **ppClone) {
    return This->lpVtbl->Clone(This,ppClone);
}
static FORCEINLINE HRESULT ITfRange_GetContext(ITfRange* This,ITfContext **ppContext) {
    return This->lpVtbl->GetContext(This,ppContext);
}
#endif
#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)
MIDL_INTERFACE("057a6296-029b-4154-b79a-0d461d4ea94c")
ITfRangeACP : public ITfRange
{
    virtual HRESULT STDMETHODCALLTYPE GetExtent(
        LONG *pacpAnchor,
        LONG *pcch) = 0;

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

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfRangeACP, 0x057a6296, 0x029b, 0x4154, 0xb7,0x9a, 0x0d,0x46,0x1d,0x4e,0xa9,0x4c)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfRangeACP_QueryInterface(ITfRangeACP* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfRangeACP_AddRef(ITfRangeACP* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfRangeACP_Release(ITfRangeACP* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfRange methods ***/
static FORCEINLINE HRESULT ITfRangeACP_GetText(ITfRangeACP* This,TfEditCookie ec,DWORD dwFlags,WCHAR *pchText,ULONG cchMax,ULONG *pcch) {
    return This->lpVtbl->GetText(This,ec,dwFlags,pchText,cchMax,pcch);
}
static FORCEINLINE HRESULT ITfRangeACP_SetText(ITfRangeACP* This,TfEditCookie ec,DWORD dwFlags,const WCHAR *pchText,LONG cch) {
    return This->lpVtbl->SetText(This,ec,dwFlags,pchText,cch);
}
static FORCEINLINE HRESULT ITfRangeACP_GetFormattedText(ITfRangeACP* This,TfEditCookie ec,IDataObject **ppDataObject) {
    return This->lpVtbl->GetFormattedText(This,ec,ppDataObject);
}
static FORCEINLINE HRESULT ITfRangeACP_GetEmbedded(ITfRangeACP* This,TfEditCookie ec,REFGUID rguidService,REFIID riid,IUnknown **ppunk) {
    return This->lpVtbl->GetEmbedded(This,ec,rguidService,riid,ppunk);
}
static FORCEINLINE HRESULT ITfRangeACP_InsertEmbedded(ITfRangeACP* This,TfEditCookie ec,DWORD dwFlags,IDataObject *pDataObject) {
    return This->lpVtbl->InsertEmbedded(This,ec,dwFlags,pDataObject);
}
static FORCEINLINE HRESULT ITfRangeACP_ShiftStart(ITfRangeACP* This,TfEditCookie ec,LONG cchReq,LONG *pcch,const TF_HALTCOND *pHalt) {
    return This->lpVtbl->ShiftStart(This,ec,cchReq,pcch,pHalt);
}
static FORCEINLINE HRESULT ITfRangeACP_ShiftEnd(ITfRangeACP* This,TfEditCookie ec,LONG cchReq,LONG *pcch,const TF_HALTCOND *pHalt) {
    return This->lpVtbl->ShiftEnd(This,ec,cchReq,pcch,pHalt);
}
static FORCEINLINE HRESULT ITfRangeACP_ShiftStartToRange(ITfRangeACP* This,TfEditCookie ec,ITfRange *pRange,TfAnchor aPos) {
    return This->lpVtbl->ShiftStartToRange(This,ec,pRange,aPos);
}
static FORCEINLINE HRESULT ITfRangeACP_ShiftEndToRange(ITfRangeACP* This,TfEditCookie ec,ITfRange *pRange,TfAnchor aPos) {
    return This->lpVtbl->ShiftEndToRange(This,ec,pRange,aPos);
}
static FORCEINLINE HRESULT ITfRangeACP_ShiftStartRegion(ITfRangeACP* This,TfEditCookie ec,TfShiftDir dir,BOOL *pfNoRegion) {
    return This->lpVtbl->ShiftStartRegion(This,ec,dir,pfNoRegion);
}
static FORCEINLINE HRESULT ITfRangeACP_ShiftEndRegion(ITfRangeACP* This,TfEditCookie ec,TfShiftDir dir,BOOL *pfNoRegion) {
    return This->lpVtbl->ShiftEndRegion(This,ec,dir,pfNoRegion);
}
static FORCEINLINE HRESULT ITfRangeACP_IsEmpty(ITfRangeACP* This,TfEditCookie ec,BOOL *pfEmpty) {
    return This->lpVtbl->IsEmpty(This,ec,pfEmpty);
}
static FORCEINLINE HRESULT ITfRangeACP_Collapse(ITfRangeACP* This,TfEditCookie ec,TfAnchor aPos) {
    return This->lpVtbl->Collapse(This,ec,aPos);
}
static FORCEINLINE HRESULT ITfRangeACP_IsEqualStart(ITfRangeACP* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,BOOL *pfEqual) {
    return This->lpVtbl->IsEqualStart(This,ec,pWith,aPos,pfEqual);
}
static FORCEINLINE HRESULT ITfRangeACP_IsEqualEnd(ITfRangeACP* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,BOOL *pfEqual) {
    return This->lpVtbl->IsEqualEnd(This,ec,pWith,aPos,pfEqual);
}
static FORCEINLINE HRESULT ITfRangeACP_CompareStart(ITfRangeACP* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,LONG *plResult) {
    return This->lpVtbl->CompareStart(This,ec,pWith,aPos,plResult);
}
static FORCEINLINE HRESULT ITfRangeACP_CompareEnd(ITfRangeACP* This,TfEditCookie ec,ITfRange *pWith,TfAnchor aPos,LONG *plResult) {
    return This->lpVtbl->CompareEnd(This,ec,pWith,aPos,plResult);
}
static FORCEINLINE HRESULT ITfRangeACP_AdjustForInsert(ITfRangeACP* This,TfEditCookie ec,ULONG cchInsert,BOOL *pfInsertOk) {
    return This->lpVtbl->AdjustForInsert(This,ec,cchInsert,pfInsertOk);
}
static FORCEINLINE HRESULT ITfRangeACP_GetGravity(ITfRangeACP* This,TfGravity *pgStart,TfGravity *pgEnd) {
    return This->lpVtbl->GetGravity(This,pgStart,pgEnd);
}
static FORCEINLINE HRESULT ITfRangeACP_SetGravity(ITfRangeACP* This,TfEditCookie ec,TfGravity gStart,TfGravity gEnd) {
    return This->lpVtbl->SetGravity(This,ec,gStart,gEnd);
}
static FORCEINLINE HRESULT ITfRangeACP_Clone(ITfRangeACP* This,ITfRange **ppClone) {
    return This->lpVtbl->Clone(This,ppClone);
}
static FORCEINLINE HRESULT ITfRangeACP_GetContext(ITfRangeACP* This,ITfContext **ppContext) {
    return This->lpVtbl->GetContext(This,ppContext);
}
/*** ITfRangeACP methods ***/
static FORCEINLINE HRESULT ITfRangeACP_GetExtent(ITfRangeACP* This,LONG *pacpAnchor,LONG *pcch) {
    return This->lpVtbl->GetExtent(This,pacpAnchor,pcch);
}
static FORCEINLINE HRESULT ITfRangeACP_SetExtent(ITfRangeACP* This,LONG acpAnchor,LONG cch) {
    return This->lpVtbl->SetExtent(This,acpAnchor,cch);
}
#endif
#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)
MIDL_INTERFACE("55ce16ba-3014-41c1-9ceb-fade1446ac6c")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfInsertAtSelection, 0x55ce16ba, 0x3014, 0x41c1, 0x9c,0xeb, 0xfa,0xde,0x14,0x46,0xac,0x6c)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfInsertAtSelection_QueryInterface(ITfInsertAtSelection* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfInsertAtSelection_AddRef(ITfInsertAtSelection* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfInsertAtSelection_Release(ITfInsertAtSelection* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfInsertAtSelection methods ***/
static FORCEINLINE HRESULT ITfInsertAtSelection_InsertTextAtSelection(ITfInsertAtSelection* This,TfEditCookie ec,DWORD dwFlags,const WCHAR *pchText,LONG cch,ITfRange **ppRange) {
    return This->lpVtbl->InsertTextAtSelection(This,ec,dwFlags,pchText,cch,ppRange);
}
static FORCEINLINE HRESULT ITfInsertAtSelection_InsertEmbeddedAtSelection(ITfInsertAtSelection* This,TfEditCookie ec,DWORD dwFlags,IDataObject *pDataObject,ITfRange **ppRange) {
    return This->lpVtbl->InsertEmbeddedAtSelection(This,ec,dwFlags,pDataObject,ppRange);
}
#endif
#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)
MIDL_INTERFACE("6834b120-88cb-11d2-bf45-00105a2799b5")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfPropertyStore, 0x6834b120, 0x88cb, 0x11d2, 0xbf,0x45, 0x00,0x10,0x5a,0x27,0x99,0xb5)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfPropertyStore_QueryInterface(ITfPropertyStore* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfPropertyStore_AddRef(ITfPropertyStore* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfPropertyStore_Release(ITfPropertyStore* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfPropertyStore methods ***/
static FORCEINLINE HRESULT ITfPropertyStore_GetType(ITfPropertyStore* This,GUID *pguid) {
    return This->lpVtbl->GetType(This,pguid);
}
static FORCEINLINE HRESULT ITfPropertyStore_GetDataType(ITfPropertyStore* This,DWORD *pdwReserved) {
    return This->lpVtbl->GetDataType(This,pdwReserved);
}
static FORCEINLINE HRESULT ITfPropertyStore_GetData(ITfPropertyStore* This,VARIANT *pvarValue) {
    return This->lpVtbl->GetData(This,pvarValue);
}
static FORCEINLINE HRESULT ITfPropertyStore_OnTextUpdated(ITfPropertyStore* This,DWORD dwFlags,ITfRange *pRangeNew,BOOL *pfAccept) {
    return This->lpVtbl->OnTextUpdated(This,dwFlags,pRangeNew,pfAccept);
}
static FORCEINLINE HRESULT ITfPropertyStore_Shrink(ITfPropertyStore* This,ITfRange *pRangeNew,BOOL *pfFree) {
    return This->lpVtbl->Shrink(This,pRangeNew,pfFree);
}
static FORCEINLINE HRESULT ITfPropertyStore_Divide(ITfPropertyStore* This,ITfRange *pRangeThis,ITfRange *pRangeNew,ITfPropertyStore **ppPropStore) {
    return This->lpVtbl->Divide(This,pRangeThis,pRangeNew,ppPropStore);
}
static FORCEINLINE HRESULT ITfPropertyStore_Clone(ITfPropertyStore* This,ITfPropertyStore **pPropStore) {
    return This->lpVtbl->Clone(This,pPropStore);
}
static FORCEINLINE HRESULT ITfPropertyStore_GetPropertyRangeCreator(ITfPropertyStore* This,CLSID *pclsid) {
    return This->lpVtbl->GetPropertyRangeCreator(This,pclsid);
}
static FORCEINLINE HRESULT ITfPropertyStore_Serialize(ITfPropertyStore* This,IStream *pStream,ULONG *pcb) {
    return This->lpVtbl->Serialize(This,pStream,pcb);
}
#endif
#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)
MIDL_INTERFACE("f99d3f40-8e32-11d2-bf46-00105a2799b5")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumTfRanges, 0xf99d3f40, 0x8e32, 0x11d2, 0xbf,0x46, 0x00,0x10,0x5a,0x27,0x99,0xb5)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumTfRanges_QueryInterface(IEnumTfRanges* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumTfRanges_AddRef(IEnumTfRanges* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumTfRanges_Release(IEnumTfRanges* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumTfRanges methods ***/
static FORCEINLINE HRESULT IEnumTfRanges_Clone(IEnumTfRanges* This,IEnumTfRanges **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumTfRanges_Next(IEnumTfRanges* This,ULONG ulCount,ITfRange **ppRange,ULONG *pcFetched) {
    return This->lpVtbl->Next(This,ulCount,ppRange,pcFetched);
}
static FORCEINLINE HRESULT IEnumTfRanges_Reset(IEnumTfRanges* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumTfRanges_Skip(IEnumTfRanges* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#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)
MIDL_INTERFACE("5efd22ba-7838-46cb-88e2-cadb14124f8f")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumITfCompositionView, 0x5efd22ba, 0x7838, 0x46cb, 0x88,0xe2, 0xca,0xdb,0x14,0x12,0x4f,0x8f)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumITfCompositionView_QueryInterface(IEnumITfCompositionView* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumITfCompositionView_AddRef(IEnumITfCompositionView* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumITfCompositionView_Release(IEnumITfCompositionView* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumITfCompositionView methods ***/
static FORCEINLINE HRESULT IEnumITfCompositionView_Clone(IEnumITfCompositionView* This,IEnumITfCompositionView **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumITfCompositionView_Next(IEnumITfCompositionView* This,ULONG ulCount,ITfCompositionView **rgCompositionView,ULONG *pcFetched) {
    return This->lpVtbl->Next(This,ulCount,rgCompositionView,pcFetched);
}
static FORCEINLINE HRESULT IEnumITfCompositionView_Reset(IEnumITfCompositionView* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumITfCompositionView_Skip(IEnumITfCompositionView* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#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)
MIDL_INTERFACE("20168d64-5a8f-4a5a-b7bd-cfa29f4d0fd9")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfComposition, 0x20168d64, 0x5a8f, 0x4a5a, 0xb7,0xbd, 0xcf,0xa2,0x9f,0x4d,0x0f,0xd9)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfComposition_QueryInterface(ITfComposition* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfComposition_AddRef(ITfComposition* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfComposition_Release(ITfComposition* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfComposition methods ***/
static FORCEINLINE HRESULT ITfComposition_GetRange(ITfComposition* This,ITfRange **ppRange) {
    return This->lpVtbl->GetRange(This,ppRange);
}
static FORCEINLINE HRESULT ITfComposition_ShiftStart(ITfComposition* This,TfEditCookie ecWrite,ITfRange *pNewStart) {
    return This->lpVtbl->ShiftStart(This,ecWrite,pNewStart);
}
static FORCEINLINE HRESULT ITfComposition_ShiftEnd(ITfComposition* This,TfEditCookie ecWrite,ITfRange *pNewEnd) {
    return This->lpVtbl->ShiftEnd(This,ecWrite,pNewEnd);
}
static FORCEINLINE HRESULT ITfComposition_EndComposition(ITfComposition* This,TfEditCookie ecWrite) {
    return This->lpVtbl->EndComposition(This,ecWrite);
}
#endif
#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)
MIDL_INTERFACE("a781718c-579a-4b15-a280-32b8577acc5e")
ITfCompositionSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnCompositionTerminated(
        TfEditCookie ecWrite,
        ITfComposition *pComposition) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfCompositionSink, 0xa781718c, 0x579a, 0x4b15, 0xa2,0x80, 0x32,0xb8,0x57,0x7a,0xcc,0x5e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfCompositionSink_QueryInterface(ITfCompositionSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfCompositionSink_AddRef(ITfCompositionSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfCompositionSink_Release(ITfCompositionSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfCompositionSink methods ***/
static FORCEINLINE HRESULT ITfCompositionSink_OnCompositionTerminated(ITfCompositionSink* This,TfEditCookie ecWrite,ITfComposition *pComposition) {
    return This->lpVtbl->OnCompositionTerminated(This,ecWrite,pComposition);
}
#endif
#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)
MIDL_INTERFACE("d40c8aae-ac92-4fc7-9a11-0ee0e23aa39b")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfContextComposition, 0xd40c8aae, 0xac92, 0x4fc7, 0x9a,0x11, 0x0e,0xe0,0xe2,0x3a,0xa3,0x9b)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfContextComposition_QueryInterface(ITfContextComposition* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfContextComposition_AddRef(ITfContextComposition* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfContextComposition_Release(ITfContextComposition* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfContextComposition methods ***/
static FORCEINLINE HRESULT ITfContextComposition_StartComposition(ITfContextComposition* This,TfEditCookie ecWrite,ITfRange *pCompositionRange,ITfCompositionSink *pSink,ITfComposition **ppComposition) {
    return This->lpVtbl->StartComposition(This,ecWrite,pCompositionRange,pSink,ppComposition);
}
static FORCEINLINE HRESULT ITfContextComposition_EnumCompositions(ITfContextComposition* This,IEnumITfCompositionView **ppEnum) {
    return This->lpVtbl->EnumCompositions(This,ppEnum);
}
static FORCEINLINE HRESULT ITfContextComposition_FindComposition(ITfContextComposition* This,TfEditCookie ecRead,ITfRange *pTestRange,IEnumITfCompositionView **ppEnum) {
    return This->lpVtbl->FindComposition(This,ecRead,pTestRange,ppEnum);
}
static FORCEINLINE HRESULT ITfContextComposition_TakeOwnership(ITfContextComposition* This,TfEditCookie ecWrite,ITfCompositionView *pComposition,ITfCompositionSink *pSink,ITfComposition **ppComposition) {
    return This->lpVtbl->TakeOwnership(This,ecWrite,pComposition,pSink,ppComposition);
}
#endif
#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)
MIDL_INTERFACE("86462810-593b-4916-9764-19c08e9ce110")
ITfContextOwnerCompositionServices : public ITfContextComposition
{
    virtual HRESULT STDMETHODCALLTYPE TerminateComposition(
        ITfCompositionView *pComposition) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfContextOwnerCompositionServices, 0x86462810, 0x593b, 0x4916, 0x97,0x64, 0x19,0xc0,0x8e,0x9c,0xe1,0x10)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfContextOwnerCompositionServices_QueryInterface(ITfContextOwnerCompositionServices* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfContextOwnerCompositionServices_AddRef(ITfContextOwnerCompositionServices* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfContextOwnerCompositionServices_Release(ITfContextOwnerCompositionServices* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfContextComposition methods ***/
static FORCEINLINE HRESULT ITfContextOwnerCompositionServices_StartComposition(ITfContextOwnerCompositionServices* This,TfEditCookie ecWrite,ITfRange *pCompositionRange,ITfCompositionSink *pSink,ITfComposition **ppComposition) {
    return This->lpVtbl->StartComposition(This,ecWrite,pCompositionRange,pSink,ppComposition);
}
static FORCEINLINE HRESULT ITfContextOwnerCompositionServices_EnumCompositions(ITfContextOwnerCompositionServices* This,IEnumITfCompositionView **ppEnum) {
    return This->lpVtbl->EnumCompositions(This,ppEnum);
}
static FORCEINLINE HRESULT ITfContextOwnerCompositionServices_FindComposition(ITfContextOwnerCompositionServices* This,TfEditCookie ecRead,ITfRange *pTestRange,IEnumITfCompositionView **ppEnum) {
    return This->lpVtbl->FindComposition(This,ecRead,pTestRange,ppEnum);
}
static FORCEINLINE HRESULT ITfContextOwnerCompositionServices_TakeOwnership(ITfContextOwnerCompositionServices* This,TfEditCookie ecWrite,ITfCompositionView *pComposition,ITfCompositionSink *pSink,ITfComposition **ppComposition) {
    return This->lpVtbl->TakeOwnership(This,ecWrite,pComposition,pSink,ppComposition);
}
/*** ITfContextOwnerCompositionServices methods ***/
static FORCEINLINE HRESULT ITfContextOwnerCompositionServices_TerminateComposition(ITfContextOwnerCompositionServices* This,ITfCompositionView *pComposition) {
    return This->lpVtbl->TerminateComposition(This,pComposition);
}
#endif
#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__ */

/*****************************************************************************
 * ITfPersistentPropertyLoaderACP interface
 */
#ifndef __ITfPersistentPropertyLoaderACP_INTERFACE_DEFINED__
#define __ITfPersistentPropertyLoaderACP_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfPersistentPropertyLoaderACP, 0x4ef89150, 0x0807, 0x11d3, 0x8d,0xf0, 0x00,0x10,0x5a,0x27,0x99,0xb5);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4ef89150-0807-11d3-8df0-00105a2799b5")
ITfPersistentPropertyLoaderACP : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE LoadProperty(
        const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
        IStream **ppStream) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfPersistentPropertyLoaderACP, 0x4ef89150, 0x0807, 0x11d3, 0x8d,0xf0, 0x00,0x10,0x5a,0x27,0x99,0xb5)
#endif
#else
typedef struct ITfPersistentPropertyLoaderACPVtbl {
    BEGIN_INTERFACE

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

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

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

    /*** ITfPersistentPropertyLoaderACP methods ***/
    HRESULT (STDMETHODCALLTYPE *LoadProperty)(
        ITfPersistentPropertyLoaderACP* This,
        const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
        IStream **ppStream);

    END_INTERFACE
} ITfPersistentPropertyLoaderACPVtbl;
interface ITfPersistentPropertyLoaderACP {
    CONST_VTBL ITfPersistentPropertyLoaderACPVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITfPersistentPropertyLoaderACP_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfPersistentPropertyLoaderACP_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfPersistentPropertyLoaderACP_Release(This) (This)->lpVtbl->Release(This)
/*** ITfPersistentPropertyLoaderACP methods ***/
#define ITfPersistentPropertyLoaderACP_LoadProperty(This,pHdr,ppStream) (This)->lpVtbl->LoadProperty(This,pHdr,ppStream)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfPersistentPropertyLoaderACP_QueryInterface(ITfPersistentPropertyLoaderACP* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfPersistentPropertyLoaderACP_AddRef(ITfPersistentPropertyLoaderACP* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfPersistentPropertyLoaderACP_Release(ITfPersistentPropertyLoaderACP* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfPersistentPropertyLoaderACP methods ***/
static FORCEINLINE HRESULT ITfPersistentPropertyLoaderACP_LoadProperty(ITfPersistentPropertyLoaderACP* This,const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,IStream **ppStream) {
    return This->lpVtbl->LoadProperty(This,pHdr,ppStream);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfPersistentPropertyLoaderACP_LoadProperty_Proxy(
    ITfPersistentPropertyLoaderACP* This,
    const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
    IStream **ppStream);
void __RPC_STUB ITfPersistentPropertyLoaderACP_LoadProperty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfPersistentPropertyLoaderACP_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITfContextOwnerServices interface
 */
#ifndef __ITfContextOwnerServices_INTERFACE_DEFINED__
#define __ITfContextOwnerServices_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITfContextOwnerServices, 0xb23eb630, 0x3e1c, 0x11d3, 0xa7,0x45, 0x00,0x50,0x04,0x0a,0xb4,0x07);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("b23eb630-3e1c-11d3-a745-0050040ab407")
ITfContextOwnerServices : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnLayoutChange(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnStatusChange(
        DWORD dwFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnAttributeChange(
        REFGUID rguidAttribute) = 0;

    virtual HRESULT STDMETHODCALLTYPE Serialize(
        ITfProperty *pProp,
        ITfRange *pRange,
        TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
        IStream *pStream) = 0;

    virtual HRESULT STDMETHODCALLTYPE Unserialize(
        ITfProperty *pProp,
        const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
        IStream *pStream,
        ITfPersistentPropertyLoaderACP *pLoader) = 0;

    virtual HRESULT STDMETHODCALLTYPE ForceLoadProperty(
        ITfProperty *pProp) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateRange(
        LONG acpStart,
        LONG acpEnd,
        ITfRangeACP **ppRange) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfContextOwnerServices, 0xb23eb630, 0x3e1c, 0x11d3, 0xa7,0x45, 0x00,0x50,0x04,0x0a,0xb4,0x07)
#endif
#else
typedef struct ITfContextOwnerServicesVtbl {
    BEGIN_INTERFACE

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

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

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

    /*** ITfContextOwnerServices methods ***/
    HRESULT (STDMETHODCALLTYPE *OnLayoutChange)(
        ITfContextOwnerServices* This);

    HRESULT (STDMETHODCALLTYPE *OnStatusChange)(
        ITfContextOwnerServices* This,
        DWORD dwFlags);

    HRESULT (STDMETHODCALLTYPE *OnAttributeChange)(
        ITfContextOwnerServices* This,
        REFGUID rguidAttribute);

    HRESULT (STDMETHODCALLTYPE *Serialize)(
        ITfContextOwnerServices* This,
        ITfProperty *pProp,
        ITfRange *pRange,
        TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
        IStream *pStream);

    HRESULT (STDMETHODCALLTYPE *Unserialize)(
        ITfContextOwnerServices* This,
        ITfProperty *pProp,
        const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
        IStream *pStream,
        ITfPersistentPropertyLoaderACP *pLoader);

    HRESULT (STDMETHODCALLTYPE *ForceLoadProperty)(
        ITfContextOwnerServices* This,
        ITfProperty *pProp);

    HRESULT (STDMETHODCALLTYPE *CreateRange)(
        ITfContextOwnerServices* This,
        LONG acpStart,
        LONG acpEnd,
        ITfRangeACP **ppRange);

    END_INTERFACE
} ITfContextOwnerServicesVtbl;
interface ITfContextOwnerServices {
    CONST_VTBL ITfContextOwnerServicesVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITfContextOwnerServices_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITfContextOwnerServices_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITfContextOwnerServices_Release(This) (This)->lpVtbl->Release(This)
/*** ITfContextOwnerServices methods ***/
#define ITfContextOwnerServices_OnLayoutChange(This) (This)->lpVtbl->OnLayoutChange(This)
#define ITfContextOwnerServices_OnStatusChange(This,dwFlags) (This)->lpVtbl->OnStatusChange(This,dwFlags)
#define ITfContextOwnerServices_OnAttributeChange(This,rguidAttribute) (This)->lpVtbl->OnAttributeChange(This,rguidAttribute)
#define ITfContextOwnerServices_Serialize(This,pProp,pRange,pHdr,pStream) (This)->lpVtbl->Serialize(This,pProp,pRange,pHdr,pStream)
#define ITfContextOwnerServices_Unserialize(This,pProp,pHdr,pStream,pLoader) (This)->lpVtbl->Unserialize(This,pProp,pHdr,pStream,pLoader)
#define ITfContextOwnerServices_ForceLoadProperty(This,pProp) (This)->lpVtbl->ForceLoadProperty(This,pProp)
#define ITfContextOwnerServices_CreateRange(This,acpStart,acpEnd,ppRange) (This)->lpVtbl->CreateRange(This,acpStart,acpEnd,ppRange)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfContextOwnerServices_QueryInterface(ITfContextOwnerServices* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfContextOwnerServices_AddRef(ITfContextOwnerServices* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfContextOwnerServices_Release(ITfContextOwnerServices* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfContextOwnerServices methods ***/
static FORCEINLINE HRESULT ITfContextOwnerServices_OnLayoutChange(ITfContextOwnerServices* This) {
    return This->lpVtbl->OnLayoutChange(This);
}
static FORCEINLINE HRESULT ITfContextOwnerServices_OnStatusChange(ITfContextOwnerServices* This,DWORD dwFlags) {
    return This->lpVtbl->OnStatusChange(This,dwFlags);
}
static FORCEINLINE HRESULT ITfContextOwnerServices_OnAttributeChange(ITfContextOwnerServices* This,REFGUID rguidAttribute) {
    return This->lpVtbl->OnAttributeChange(This,rguidAttribute);
}
static FORCEINLINE HRESULT ITfContextOwnerServices_Serialize(ITfContextOwnerServices* This,ITfProperty *pProp,ITfRange *pRange,TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,IStream *pStream) {
    return This->lpVtbl->Serialize(This,pProp,pRange,pHdr,pStream);
}
static FORCEINLINE HRESULT ITfContextOwnerServices_Unserialize(ITfContextOwnerServices* This,ITfProperty *pProp,const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,IStream *pStream,ITfPersistentPropertyLoaderACP *pLoader) {
    return This->lpVtbl->Unserialize(This,pProp,pHdr,pStream,pLoader);
}
static FORCEINLINE HRESULT ITfContextOwnerServices_ForceLoadProperty(ITfContextOwnerServices* This,ITfProperty *pProp) {
    return This->lpVtbl->ForceLoadProperty(This,pProp);
}
static FORCEINLINE HRESULT ITfContextOwnerServices_CreateRange(ITfContextOwnerServices* This,LONG acpStart,LONG acpEnd,ITfRangeACP **ppRange) {
    return This->lpVtbl->CreateRange(This,acpStart,acpEnd,ppRange);
}
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_OnLayoutChange_Proxy(
    ITfContextOwnerServices* This);
void __RPC_STUB ITfContextOwnerServices_OnLayoutChange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_OnStatusChange_Proxy(
    ITfContextOwnerServices* This,
    DWORD dwFlags);
void __RPC_STUB ITfContextOwnerServices_OnStatusChange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_OnAttributeChange_Proxy(
    ITfContextOwnerServices* This,
    REFGUID rguidAttribute);
void __RPC_STUB ITfContextOwnerServices_OnAttributeChange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_Serialize_Proxy(
    ITfContextOwnerServices* This,
    ITfProperty *pProp,
    ITfRange *pRange,
    TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
    IStream *pStream);
void __RPC_STUB ITfContextOwnerServices_Serialize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_Unserialize_Proxy(
    ITfContextOwnerServices* This,
    ITfProperty *pProp,
    const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
    IStream *pStream,
    ITfPersistentPropertyLoaderACP *pLoader);
void __RPC_STUB ITfContextOwnerServices_Unserialize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_ForceLoadProperty_Proxy(
    ITfContextOwnerServices* This,
    ITfProperty *pProp);
void __RPC_STUB ITfContextOwnerServices_ForceLoadProperty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE ITfContextOwnerServices_CreateRange_Proxy(
    ITfContextOwnerServices* This,
    LONG acpStart,
    LONG acpEnd,
    ITfRangeACP **ppRange);
void __RPC_STUB ITfContextOwnerServices_CreateRange_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __ITfContextOwnerServices_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)
MIDL_INTERFACE("17d49a3d-f8b8-4b2f-b254-52319dd64c53")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfReadOnlyProperty, 0x17d49a3d, 0xf8b8, 0x4b2f, 0xb2,0x54, 0x52,0x31,0x9d,0xd6,0x4c,0x53)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfReadOnlyProperty_QueryInterface(ITfReadOnlyProperty* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfReadOnlyProperty_AddRef(ITfReadOnlyProperty* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfReadOnlyProperty_Release(ITfReadOnlyProperty* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfReadOnlyProperty methods ***/
static FORCEINLINE HRESULT ITfReadOnlyProperty_GetType(ITfReadOnlyProperty* This,GUID *pguid) {
    return This->lpVtbl->GetType(This,pguid);
}
static FORCEINLINE HRESULT ITfReadOnlyProperty_EnumRanges(ITfReadOnlyProperty* This,TfEditCookie ec,IEnumTfRanges **ppEnum,ITfRange *pTargetRange) {
    return This->lpVtbl->EnumRanges(This,ec,ppEnum,pTargetRange);
}
static FORCEINLINE HRESULT ITfReadOnlyProperty_GetValue(ITfReadOnlyProperty* This,TfEditCookie ec,ITfRange *pRange,VARIANT *pvarValue) {
    return This->lpVtbl->GetValue(This,ec,pRange,pvarValue);
}
static FORCEINLINE HRESULT ITfReadOnlyProperty_GetContext(ITfReadOnlyProperty* This,ITfContext **ppContext) {
    return This->lpVtbl->GetContext(This,ppContext);
}
#endif
#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)
MIDL_INTERFACE("e2449660-9542-11d2-bf46-00105a2799b5")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfProperty, 0xe2449660, 0x9542, 0x11d2, 0xbf,0x46, 0x00,0x10,0x5a,0x27,0x99,0xb5)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfProperty_QueryInterface(ITfProperty* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfProperty_AddRef(ITfProperty* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfProperty_Release(ITfProperty* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfReadOnlyProperty methods ***/
static FORCEINLINE HRESULT ITfProperty_GetType(ITfProperty* This,GUID *pguid) {
    return This->lpVtbl->GetType(This,pguid);
}
static FORCEINLINE HRESULT ITfProperty_EnumRanges(ITfProperty* This,TfEditCookie ec,IEnumTfRanges **ppEnum,ITfRange *pTargetRange) {
    return This->lpVtbl->EnumRanges(This,ec,ppEnum,pTargetRange);
}
static FORCEINLINE HRESULT ITfProperty_GetValue(ITfProperty* This,TfEditCookie ec,ITfRange *pRange,VARIANT *pvarValue) {
    return This->lpVtbl->GetValue(This,ec,pRange,pvarValue);
}
static FORCEINLINE HRESULT ITfProperty_GetContext(ITfProperty* This,ITfContext **ppContext) {
    return This->lpVtbl->GetContext(This,ppContext);
}
/*** ITfProperty methods ***/
static FORCEINLINE HRESULT ITfProperty_FindRange(ITfProperty* This,TfEditCookie ec,ITfRange *pRange,ITfRange **ppRange,TfAnchor aPos) {
    return This->lpVtbl->FindRange(This,ec,pRange,ppRange,aPos);
}
static FORCEINLINE HRESULT ITfProperty_SetValueStore(ITfProperty* This,TfEditCookie ec,ITfRange *pRange,ITfPropertyStore *pPropStore) {
    return This->lpVtbl->SetValueStore(This,ec,pRange,pPropStore);
}
static FORCEINLINE HRESULT ITfProperty_SetValue(ITfProperty* This,TfEditCookie ec,ITfRange *pRange,const VARIANT *pvarValue) {
    return This->lpVtbl->SetValue(This,ec,pRange,pvarValue);
}
static FORCEINLINE HRESULT ITfProperty_Clear(ITfProperty* This,TfEditCookie ec,ITfRange *pRange) {
    return This->lpVtbl->Clear(This,ec,pRange);
}
#endif
#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)
MIDL_INTERFACE("bb08f7a9-607a-4384-8623-056892b64371")
ITfCompartment : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE SetValue(
        TfClientId tid,
        const VARIANT *pvarValue) = 0;

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

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfCompartment, 0xbb08f7a9, 0x607a, 0x4384, 0x86,0x23, 0x05,0x68,0x92,0xb6,0x43,0x71)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfCompartment_QueryInterface(ITfCompartment* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfCompartment_AddRef(ITfCompartment* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfCompartment_Release(ITfCompartment* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfCompartment methods ***/
static FORCEINLINE HRESULT ITfCompartment_SetValue(ITfCompartment* This,TfClientId tid,const VARIANT *pvarValue) {
    return This->lpVtbl->SetValue(This,tid,pvarValue);
}
static FORCEINLINE HRESULT ITfCompartment_GetValue(ITfCompartment* This,VARIANT *pvarValue) {
    return This->lpVtbl->GetValue(This,pvarValue);
}
#endif
#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)
MIDL_INTERFACE("7dcf57ac-18ad-438b-824d-979bffb74b7c")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfCompartmentMgr, 0x7dcf57ac, 0x18ad, 0x438b, 0x82,0x4d, 0x97,0x9b,0xff,0xb7,0x4b,0x7c)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfCompartmentMgr_QueryInterface(ITfCompartmentMgr* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfCompartmentMgr_AddRef(ITfCompartmentMgr* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfCompartmentMgr_Release(ITfCompartmentMgr* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfCompartmentMgr methods ***/
static FORCEINLINE HRESULT ITfCompartmentMgr_GetCompartment(ITfCompartmentMgr* This,REFGUID rguid,ITfCompartment **ppcomp) {
    return This->lpVtbl->GetCompartment(This,rguid,ppcomp);
}
static FORCEINLINE HRESULT ITfCompartmentMgr_ClearCompartment(ITfCompartmentMgr* This,TfClientId tid,REFGUID rguid) {
    return This->lpVtbl->ClearCompartment(This,tid,rguid);
}
static FORCEINLINE HRESULT ITfCompartmentMgr_EnumCompartments(ITfCompartmentMgr* This,IEnumGUID **ppEnum) {
    return This->lpVtbl->EnumCompartments(This,ppEnum);
}
#endif
#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)
MIDL_INTERFACE("743abd5f-f26d-48df-8cc5-238492419b64")
ITfCompartmentEventSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnChange(
        REFGUID rguid) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfCompartmentEventSink, 0x743abd5f, 0xf26d, 0x48df, 0x8c,0xc5, 0x23,0x84,0x92,0x41,0x9b,0x64)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfCompartmentEventSink_QueryInterface(ITfCompartmentEventSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfCompartmentEventSink_AddRef(ITfCompartmentEventSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfCompartmentEventSink_Release(ITfCompartmentEventSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfCompartmentEventSink methods ***/
static FORCEINLINE HRESULT ITfCompartmentEventSink_OnChange(ITfCompartmentEventSink* This,REFGUID rguid) {
    return This->lpVtbl->OnChange(This,rguid);
}
#endif
#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)
MIDL_INTERFACE("8f1a7ea6-1654-4502-a86e-b2902344d507")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumTfContexts, 0x8f1a7ea6, 0x1654, 0x4502, 0xa8,0x6e, 0xb2,0x90,0x23,0x44,0xd5,0x07)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumTfContexts_QueryInterface(IEnumTfContexts* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumTfContexts_AddRef(IEnumTfContexts* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumTfContexts_Release(IEnumTfContexts* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumTfContexts methods ***/
static FORCEINLINE HRESULT IEnumTfContexts_Clone(IEnumTfContexts* This,IEnumTfContexts **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumTfContexts_Next(IEnumTfContexts* This,ULONG ulCount,ITfContext **rgContext,ULONG *pcFetched) {
    return This->lpVtbl->Next(This,ulCount,rgContext,pcFetched);
}
static FORCEINLINE HRESULT IEnumTfContexts_Reset(IEnumTfContexts* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumTfContexts_Skip(IEnumTfContexts* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#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)
MIDL_INTERFACE("aa80e808-2021-11d2-93e0-0060b067b86e")
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;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IEnumTfDocumentMgrs, 0xaa80e808, 0x2021, 0x11d2, 0x93,0xe0, 0x00,0x60,0xb0,0x67,0xb8,0x6e)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT IEnumTfDocumentMgrs_QueryInterface(IEnumTfDocumentMgrs* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG IEnumTfDocumentMgrs_AddRef(IEnumTfDocumentMgrs* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG IEnumTfDocumentMgrs_Release(IEnumTfDocumentMgrs* This) {
    return This->lpVtbl->Release(This);
}
/*** IEnumTfDocumentMgrs methods ***/
static FORCEINLINE HRESULT IEnumTfDocumentMgrs_Clone(IEnumTfDocumentMgrs* This,IEnumTfDocumentMgrs **ppEnum) {
    return This->lpVtbl->Clone(This,ppEnum);
}
static FORCEINLINE HRESULT IEnumTfDocumentMgrs_Next(IEnumTfDocumentMgrs* This,ULONG ulCount,ITfDocumentMgr **rgDocumentMgr,ULONG *pcFetched) {
    return This->lpVtbl->Next(This,ulCount,rgDocumentMgr,pcFetched);
}
static FORCEINLINE HRESULT IEnumTfDocumentMgrs_Reset(IEnumTfDocumentMgrs* This) {
    return This->lpVtbl->Reset(This);
}
static FORCEINLINE HRESULT IEnumTfDocumentMgrs_Skip(IEnumTfDocumentMgrs* This,ULONG ulCount) {
    return This->lpVtbl->Skip(This,ulCount);
}
#endif
#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)
MIDL_INTERFACE("73131f9c-56a9-49dd-b0ee-d046633f7528")
ITfSourceSingle : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE AdviseSingleSink(
        TfClientId tid,
        REFIID riid,
        IUnknown *punk) = 0;

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

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfSourceSingle, 0x73131f9c, 0x56a9, 0x49dd, 0xb0,0xee, 0xd0,0x46,0x63,0x3f,0x75,0x28)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfSourceSingle_QueryInterface(ITfSourceSingle* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfSourceSingle_AddRef(ITfSourceSingle* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfSourceSingle_Release(ITfSourceSingle* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfSourceSingle methods ***/
static FORCEINLINE HRESULT ITfSourceSingle_AdviseSingleSink(ITfSourceSingle* This,TfClientId tid,REFIID riid,IUnknown *punk) {
    return This->lpVtbl->AdviseSingleSink(This,tid,riid,punk);
}
static FORCEINLINE HRESULT ITfSourceSingle_UnadviseSingleSink(ITfSourceSingle* This,TfClientId tid,REFIID riid) {
    return This->lpVtbl->UnadviseSingleSink(This,tid,riid);
}
#endif
#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)
MIDL_INTERFACE("c0f1db0c-3a20-405c-a303-96b6010a885f")
ITfThreadFocusSink : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE OnSetThreadFocus(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE OnKillThreadFocus(
        ) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITfThreadFocusSink, 0xc0f1db0c, 0x3a20, 0x405c, 0xa3,0x03, 0x96,0xb6,0x01,0x0a,0x88,0x5f)
#endif
#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
#ifndef WIDL_C_INLINE_WRAPPERS
/*** 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)
#else
/*** IUnknown methods ***/
static FORCEINLINE HRESULT ITfThreadFocusSink_QueryInterface(ITfThreadFocusSink* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static FORCEINLINE ULONG ITfThreadFocusSink_AddRef(ITfThreadFocusSink* This) {
    return This->lpVtbl->AddRef(This);
}
static FORCEINLINE ULONG ITfThreadFocusSink_Release(ITfThreadFocusSink* This) {
    return This->lpVtbl->Release(This);
}
/*** ITfThreadFocusSink methods ***/
static FORCEINLINE HRESULT ITfThreadFocusSink_OnSetThreadFocus(ITfThreadFocusSink* This) {
    return This->lpVtbl->OnSetThreadFocus(This);
}
static FORCEINLINE HRESULT ITfThreadFocusSink_OnKillThreadFocus(ITfThreadFocusSink* This) {
    return This->lpVtbl->OnKillThreadFocus(This);
}
#endif
#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 /* __msctf_h__ */
