ReactOS 0.4.15-dev-8348-gc1b9bb5
imm32_undoc.h File Reference
#include <immdev.h>
#include <imetable.h>
Include dependency graph for imm32_undoc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagIMEINFOEX
 
struct  IMEDPI
 
struct  tagCLIENTIMC
 
struct  INPUTCONTEXTDX
 
struct  IME_SUBSTATE
 
struct  IME_STATE
 
struct  tagUNDETERMINESTRUCT
 

Macros

#define IME_MASK   (0xE0000000UL)
 
#define SUBST_MASK   (0xD0000000UL)
 
#define SPECIAL_MASK   (0xF0000000UL)
 
#define IS_IME_HKL(hKL)   ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)
 
#define IS_SPECIAL_HKL(hKL)   ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)
 
#define SPECIALIDFROMHKL(hKL)   ((WORD)(HIWORD(hKL) & 0x0FFF))
 
#define IS_IME_KLID(dwKLID)   ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK)
 
#define IS_SUBST_KLID(dwKLID)   ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK)
 
#define DEFINE_IME_ENTRY(type, name, params, extended)   typedef type (WINAPI *FN_##name) params;
 
#define DEFINE_IME_ENTRY(type, name, params, extended)   FN_##name name;
 
#define IMEDPI_FLAG_UNLOADED   0x1
 
#define IMEDPI_FLAG_LOCKED   0x2
 
#define CLIENTIMC_WIDE   0x1
 
#define CLIENTIMC_ACTIVE   0x2
 
#define CLIENTIMC_UNKNOWN4   0x20
 
#define CLIENTIMC_DESTROY   0x40
 
#define CLIENTIMC_DISABLEIME   0x80
 
#define CLIENTIMC_UNKNOWN2   0x100
 

Typedefs

typedef struct tagIMEINFOEX IMEINFOEX
 
typedef struct tagIMEINFOEXPIMEINFOEX
 
typedef struct tagIMEINFOEXNPIMEINFOEX
 
typedef struct tagIMEINFOEXLPIMEINFOEX
 
typedef enum IMEINFOEXCLASS IMEINFOEXCLASS
 
typedef struct IMEDPI IMEDPI
 
typedef struct IMEDPIPIMEDPI
 
typedef struct IMEDPINPIMEDPI
 
typedef struct IMEDPILPIMEDPI
 
typedef struct tagCLIENTIMC CLIENTIMC
 
typedef struct tagCLIENTIMCPCLIENTIMC
 
typedef struct tagCLIENTIMCNPCLIENTIMC
 
typedef struct tagCLIENTIMCLPCLIENTIMC
 
typedef struct INPUTCONTEXTDX INPUTCONTEXTDX
 
typedef struct INPUTCONTEXTDXPINPUTCONTEXTDX
 
typedef struct INPUTCONTEXTDXNPINPUTCONTEXTDX
 
typedef struct INPUTCONTEXTDXLPINPUTCONTEXTDX
 
typedef struct IME_SUBSTATE IME_SUBSTATE
 
typedef struct IME_SUBSTATEPIME_SUBSTATE
 
typedef struct IME_SUBSTATENPIME_SUBSTATE
 
typedef struct IME_STATE IME_STATE
 
typedef struct IME_STATEPIME_STATE
 
typedef struct IME_STATENPIME_STATE
 
typedef struct IME_STATELPIME_STATE
 
typedef struct tagUNDETERMINESTRUCT UNDETERMINESTRUCT
 
typedef struct tagUNDETERMINESTRUCTPUNDETERMINESTRUCT
 
typedef struct tagUNDETERMINESTRUCTLPUNDETERMINESTRUCT
 

Enumerations

enum  IMEINFOEXCLASS { ImeInfoExKeyboardLayout , ImeInfoExKeyboardLayoutTFS , ImeInfoExImeWindow , ImeInfoExImeFileName }
 

Functions

 C_ASSERT (offsetof(IMEDPI, pNext)==0x0)
 
 C_ASSERT (offsetof(IMEDPI, hInst)==0x4)
 
 C_ASSERT (offsetof(IMEDPI, hKL)==0x8)
 
 C_ASSERT (offsetof(IMEDPI, ImeInfo)==0xc)
 
 C_ASSERT (offsetof(IMEDPI, uCodePage)==0x28)
 
 C_ASSERT (offsetof(IMEDPI, szUIClass)==0x2c)
 
 C_ASSERT (offsetof(IMEDPI, cLockObj)==0x4c)
 
 C_ASSERT (offsetof(IMEDPI, dwFlags)==0x50)
 
 C_ASSERT (offsetof(IMEDPI, ImeInquire)==0x54)
 
 C_ASSERT (offsetof(IMEDPI, ImeConversionList)==0x58)
 
 C_ASSERT (offsetof(IMEDPI, ImeRegisterWord)==0x5c)
 
 C_ASSERT (offsetof(IMEDPI, ImeUnregisterWord)==0x60)
 
 C_ASSERT (offsetof(IMEDPI, ImeGetRegisterWordStyle)==0x64)
 
 C_ASSERT (offsetof(IMEDPI, ImeEnumRegisterWord)==0x68)
 
 C_ASSERT (offsetof(IMEDPI, ImeConfigure)==0x6c)
 
 C_ASSERT (offsetof(IMEDPI, ImeDestroy)==0x70)
 
 C_ASSERT (offsetof(IMEDPI, ImeEscape)==0x74)
 
 C_ASSERT (offsetof(IMEDPI, ImeProcessKey)==0x78)
 
 C_ASSERT (offsetof(IMEDPI, ImeSelect)==0x7c)
 
 C_ASSERT (offsetof(IMEDPI, ImeSetActiveContext)==0x80)
 
 C_ASSERT (offsetof(IMEDPI, ImeToAsciiEx)==0x84)
 
 C_ASSERT (offsetof(IMEDPI, NotifyIME)==0x88)
 
 C_ASSERT (offsetof(IMEDPI, ImeSetCompositionString)==0x8c)
 
 C_ASSERT (offsetof(IMEDPI, ImeGetImeMenuItems)==0x90)
 
 C_ASSERT (offsetof(IMEDPI, CtfImeInquireExW)==0x94)
 
 C_ASSERT (offsetof(IMEDPI, CtfImeSelectEx)==0x98)
 
 C_ASSERT (offsetof(IMEDPI, CtfImeEscapeEx)==0x9c)
 
 C_ASSERT (offsetof(IMEDPI, CtfImeGetGuidAtom)==0xa0)
 
 C_ASSERT (offsetof(IMEDPI, CtfImeIsGuidMapEnable)==0xa4)
 
 C_ASSERT (sizeof(IMEDPI)==0xa8)
 
PIMEDPI WINAPI ImmLockImeDpi (_In_ HKL hKL)
 
VOID WINAPI ImmUnlockImeDpi (_Inout_ PIMEDPI pImeDpi)
 
 C_ASSERT (offsetof(CLIENTIMC, hInputContext)==0x0)
 
 C_ASSERT (offsetof(CLIENTIMC, cLockObj)==0x4)
 
 C_ASSERT (offsetof(CLIENTIMC, dwFlags)==0x8)
 
 C_ASSERT (offsetof(CLIENTIMC, dwCompatFlags)==0xc)
 
 C_ASSERT (offsetof(CLIENTIMC, cs)==0x10)
 
 C_ASSERT (offsetof(CLIENTIMC, uCodePage)==0x28)
 
 C_ASSERT (offsetof(CLIENTIMC, hKL)==0x2c)
 
 C_ASSERT (sizeof(CLIENTIMC)==0x34)
 
PCLIENTIMC WINAPI ImmLockClientImc (_In_ HIMC hImc)
 
VOID WINAPI ImmUnlockClientImc (_Inout_ PCLIENTIMC pClientImc)
 
 C_ASSERT (sizeof(IME_SUBSTATE)==0xc)
 
 C_ASSERT (sizeof(IME_STATE)==0x18)
 
UINT WINAPI GetKeyboardLayoutCP (_In_ LANGID wLangId)
 
BOOL WINAPI ImmGetImeInfoEx (_Out_ PIMEINFOEX pImeInfoEx, _In_ IMEINFOEXCLASS SearchType, _In_ PVOID pvSearchKey)
 
BOOL WINAPI ImmLoadLayout (_In_ HKL hKL, _Inout_ PIMEINFOEX pImeInfoEx)
 
DWORD WINAPI ImmGetAppCompatFlags (_In_ HIMC hIMC)
 
BOOL WINAPI ImmSetActiveContext (_In_ HWND hwnd, _In_ HIMC hIMC, _In_ BOOL fFlag)
 
BOOL WINAPI ImmLoadIME (_In_ HKL hKL)
 
DWORD WINAPI ImmProcessKey (_In_ HWND, _In_ HKL, _In_ UINT, _In_ LPARAM, _In_ DWORD)
 
HRESULT WINAPI CtfAImmActivate (_Out_opt_ HINSTANCE *phinstCtfIme)
 
HRESULT WINAPI CtfAImmDeactivate (_In_ BOOL bDestroy)
 
BOOL WINAPI CtfAImmIsIME (_In_ HKL hKL)
 
BOOL WINAPI CtfImmIsCiceroStartedInThread (VOID)
 
VOID WINAPI CtfImmSetCiceroStartInThread (_In_ BOOL bStarted)
 
VOID WINAPI CtfImmSetAppCompatFlags (_In_ DWORD dwFlags)
 
DWORD WINAPI CtfImmHideToolbarWnd (VOID)
 
VOID WINAPI CtfImmRestoreToolbarWnd (_In_ LPVOID pUnused, _In_ DWORD dwShowFlags)
 
BOOL WINAPI CtfImmGenerateMessage (_In_ HIMC hIMC, _In_ BOOL bSend)
 
VOID WINAPI CtfImmCoUninitialize (VOID)
 
VOID WINAPI CtfImmEnterCoInitCountSkipMode (VOID)
 
BOOL WINAPI CtfImmLeaveCoInitCountSkipMode (VOID)
 
HRESULT WINAPI CtfImmLastEnabledWndDestroy (_In_ BOOL bCreate)
 
HRESULT WINAPI CtfImmTIMActivate (_In_ HKL hKL)
 
BOOL WINAPI CtfImmIsTextFrameServiceDisabled (VOID)
 
LRESULT WINAPI CtfImmDispatchDefImeMessage (_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
 

Macro Definition Documentation

◆ CLIENTIMC_ACTIVE

#define CLIENTIMC_ACTIVE   0x2

Definition at line 139 of file imm32_undoc.h.

◆ CLIENTIMC_DESTROY

#define CLIENTIMC_DESTROY   0x40

Definition at line 141 of file imm32_undoc.h.

◆ CLIENTIMC_DISABLEIME

#define CLIENTIMC_DISABLEIME   0x80

Definition at line 142 of file imm32_undoc.h.

◆ CLIENTIMC_UNKNOWN2

#define CLIENTIMC_UNKNOWN2   0x100

Definition at line 143 of file imm32_undoc.h.

◆ CLIENTIMC_UNKNOWN4

#define CLIENTIMC_UNKNOWN4   0x20

Definition at line 140 of file imm32_undoc.h.

◆ CLIENTIMC_WIDE

#define CLIENTIMC_WIDE   0x1

Definition at line 138 of file imm32_undoc.h.

◆ DEFINE_IME_ENTRY [1/2]

#define DEFINE_IME_ENTRY (   type,
  name,
  params,
  extended 
)    typedef type (WINAPI *FN_##name) params;

Definition at line 68 of file imm32_undoc.h.

◆ DEFINE_IME_ENTRY [2/2]

#define DEFINE_IME_ENTRY (   type,
  name,
  params,
  extended 
)    FN_##name name;

Definition at line 68 of file imm32_undoc.h.

◆ IME_MASK

#define IME_MASK   (0xE0000000UL)

Definition at line 16 of file imm32_undoc.h.

◆ IMEDPI_FLAG_LOCKED

#define IMEDPI_FLAG_LOCKED   0x2

Definition at line 108 of file imm32_undoc.h.

◆ IMEDPI_FLAG_UNLOADED

#define IMEDPI_FLAG_UNLOADED   0x1

Definition at line 107 of file imm32_undoc.h.

◆ IS_IME_HKL

#define IS_IME_HKL (   hKL)    ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)

Definition at line 20 of file imm32_undoc.h.

◆ IS_IME_KLID

#define IS_IME_KLID (   dwKLID)    ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK)

Definition at line 24 of file imm32_undoc.h.

◆ IS_SPECIAL_HKL

#define IS_SPECIAL_HKL (   hKL)    ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)

Definition at line 21 of file imm32_undoc.h.

◆ IS_SUBST_KLID

#define IS_SUBST_KLID (   dwKLID)    ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK)

Definition at line 25 of file imm32_undoc.h.

◆ SPECIAL_MASK

#define SPECIAL_MASK   (0xF0000000UL)

Definition at line 18 of file imm32_undoc.h.

◆ SPECIALIDFROMHKL

#define SPECIALIDFROMHKL (   hKL)    ((WORD)(HIWORD(hKL) & 0x0FFF))

Definition at line 22 of file imm32_undoc.h.

◆ SUBST_MASK

#define SUBST_MASK   (0xD0000000UL)

Definition at line 17 of file imm32_undoc.h.

Typedef Documentation

◆ CLIENTIMC

◆ IME_STATE

◆ IME_SUBSTATE

◆ IMEDPI

typedef struct IMEDPI IMEDPI

◆ IMEINFOEX

◆ IMEINFOEXCLASS

◆ INPUTCONTEXTDX

◆ LPCLIENTIMC

◆ LPIME_STATE

◆ LPIMEDPI

◆ LPIMEINFOEX

◆ LPINPUTCONTEXTDX

◆ LPUNDETERMINESTRUCT

◆ NPCLIENTIMC

◆ NPIME_STATE

◆ NPIME_SUBSTATE

◆ NPIMEDPI

◆ NPIMEINFOEX

◆ NPINPUTCONTEXTDX

◆ PCLIENTIMC

◆ PIME_STATE

◆ PIME_SUBSTATE

◆ PIMEDPI

typedef struct IMEDPI * PIMEDPI

◆ PIMEINFOEX

◆ PINPUTCONTEXTDX

◆ PUNDETERMINESTRUCT

◆ UNDETERMINESTRUCT

Enumeration Type Documentation

◆ IMEINFOEXCLASS

Enumerator
ImeInfoExKeyboardLayout 
ImeInfoExKeyboardLayoutTFS 
ImeInfoExImeWindow 
ImeInfoExImeFileName 

Definition at line 46 of file imm32_undoc.h.

47{
IMEINFOEXCLASS
Definition: imm32_undoc.h:47
@ ImeInfoExImeFileName
Definition: imm32_undoc.h:51
@ ImeInfoExKeyboardLayoutTFS
Definition: imm32_undoc.h:49
@ ImeInfoExKeyboardLayout
Definition: imm32_undoc.h:48
@ ImeInfoExImeWindow
Definition: imm32_undoc.h:50

Function Documentation

◆ C_ASSERT() [1/40]

C_ASSERT ( offsetof(CLIENTIMC, cLockObj)  = =0x4)

◆ C_ASSERT() [2/40]

C_ASSERT ( offsetof(CLIENTIMC, cs = =0x10)

◆ C_ASSERT() [3/40]

C_ASSERT ( offsetof(CLIENTIMC, dwCompatFlags)  = =0xc)

◆ C_ASSERT() [4/40]

C_ASSERT ( offsetof(CLIENTIMC, dwFlags = =0x8)

◆ C_ASSERT() [5/40]

C_ASSERT ( offsetof(CLIENTIMC, hInputContext)  = =0x0)

◆ C_ASSERT() [6/40]

C_ASSERT ( offsetof(CLIENTIMC, hKL)  = =0x2c)

◆ C_ASSERT() [7/40]

C_ASSERT ( offsetof(CLIENTIMC, uCodePage)  = =0x28)

◆ C_ASSERT() [8/40]

C_ASSERT ( offsetof(IMEDPI, cLockObj)  = =0x4c)

◆ C_ASSERT() [9/40]

C_ASSERT ( offsetof(IMEDPI, CtfImeEscapeEx = =0x9c)

◆ C_ASSERT() [10/40]

C_ASSERT ( offsetof(IMEDPI, CtfImeGetGuidAtom = =0xa0)

◆ C_ASSERT() [11/40]

C_ASSERT ( offsetof(IMEDPI, CtfImeInquireExW = =0x94)

◆ C_ASSERT() [12/40]

C_ASSERT ( offsetof(IMEDPI, CtfImeIsGuidMapEnable = =0xa4)

◆ C_ASSERT() [13/40]

C_ASSERT ( offsetof(IMEDPI, CtfImeSelectEx = =0x98)

◆ C_ASSERT() [14/40]

C_ASSERT ( offsetof(IMEDPI, dwFlags = =0x50)

◆ C_ASSERT() [15/40]

C_ASSERT ( offsetof(IMEDPI, hInst = =0x4)

◆ C_ASSERT() [16/40]

C_ASSERT ( offsetof(IMEDPI, hKL)  = =0x8)

◆ C_ASSERT() [17/40]

C_ASSERT ( offsetof(IMEDPI, ImeConfigure = =0x6c)

◆ C_ASSERT() [18/40]

C_ASSERT ( offsetof(IMEDPI, ImeConversionList = =0x58)

◆ C_ASSERT() [19/40]

C_ASSERT ( offsetof(IMEDPI, ImeDestroy = =0x70)

◆ C_ASSERT() [20/40]

C_ASSERT ( offsetof(IMEDPI, ImeEnumRegisterWord = =0x68)

◆ C_ASSERT() [21/40]

C_ASSERT ( offsetof(IMEDPI, ImeEscape = =0x74)

◆ C_ASSERT() [22/40]

C_ASSERT ( offsetof(IMEDPI, ImeGetImeMenuItems = =0x90)

◆ C_ASSERT() [23/40]

C_ASSERT ( offsetof(IMEDPI, ImeGetRegisterWordStyle = =0x64)

◆ C_ASSERT() [24/40]

C_ASSERT ( offsetof(IMEDPI, ImeInfo)  = =0xc)

◆ C_ASSERT() [25/40]

C_ASSERT ( offsetof(IMEDPI, ImeInquire = =0x54)

◆ C_ASSERT() [26/40]

C_ASSERT ( offsetof(IMEDPI, ImeProcessKey = =0x78)

◆ C_ASSERT() [27/40]

C_ASSERT ( offsetof(IMEDPI, ImeRegisterWord = =0x5c)

◆ C_ASSERT() [28/40]

C_ASSERT ( offsetof(IMEDPI, ImeSelect = =0x7c)

◆ C_ASSERT() [29/40]

C_ASSERT ( offsetof(IMEDPI, ImeSetActiveContext = =0x80)

◆ C_ASSERT() [30/40]

C_ASSERT ( offsetof(IMEDPI, ImeSetCompositionString = =0x8c)

◆ C_ASSERT() [31/40]

C_ASSERT ( offsetof(IMEDPI, ImeToAsciiEx = =0x84)

◆ C_ASSERT() [32/40]

C_ASSERT ( offsetof(IMEDPI, ImeUnregisterWord = =0x60)

◆ C_ASSERT() [33/40]

C_ASSERT ( offsetof(IMEDPI, NotifyIME = =0x88)

◆ C_ASSERT() [34/40]

C_ASSERT ( offsetof(IMEDPI, pNext)  = =0x0)

◆ C_ASSERT() [35/40]

C_ASSERT ( offsetof(IMEDPI, szUIClass)  = =0x2c)

◆ C_ASSERT() [36/40]

C_ASSERT ( offsetof(IMEDPI, uCodePage)  = =0x28)

◆ C_ASSERT() [37/40]

C_ASSERT ( sizeof(CLIENTIMC = =0x34)

◆ C_ASSERT() [38/40]

C_ASSERT ( sizeof(IME_STATE = =0x18)

◆ C_ASSERT() [39/40]

C_ASSERT ( sizeof(IME_SUBSTATE = =0xc)

◆ C_ASSERT() [40/40]

C_ASSERT ( sizeof(IMEDPI = =0xa8)

◆ CtfAImmActivate()

HRESULT WINAPI CtfAImmActivate ( _Out_opt_ HINSTANCE phinstCtfIme)

Definition at line 1009 of file ctf.c.

1011{
1012 HRESULT hr;
1013 HINSTANCE hinstCtfIme;
1014
1015 TRACE("(%p)\n", phinstCtfIme);
1016
1017 /* Load a CTF IME file if necessary */
1018 hinstCtfIme = Imm32LoadCtfIme();
1019
1020 /* Create a thread manager of the CTF IME */
1022 if (hr == S_OK)
1023 {
1024 /* Update CI_... flags of the thread client info */
1025 GetWin32ClientInfo()->CI_flags |= CI_AIMMACTIVATED; /* Activate AIMM */
1026 GetWin32ClientInfo()->CI_flags &= ~CI_TSFDISABLED; /* Enable TSF */
1027
1028 /* Create the CTF input contexts */
1030 }
1031
1032 if (phinstCtfIme)
1033 *phinstCtfIme = hinstCtfIme;
1034
1035 return hr;
1036}
HRESULT CtfImeCreateThreadMgr(VOID)
Definition: ctf.c:723
HINSTANCE Imm32LoadCtfIme(VOID)
Definition: ctf.c:647
static BOOL CALLBACK Imm32EnumCreateCtfICProc(_In_ HIMC hIMC, _In_ LPARAM lParam)
Definition: ctf.c:863
BOOL WINAPI ImmEnumInputContext(DWORD dwThreadId, IMCENUMPROC lpfn, LPARAM lParam)
Definition: imm.c:1096
#define CI_AIMMACTIVATED
Definition: ntuser.h:311
#define GetWin32ClientInfo()
Definition: ntuser.h:352
#define S_OK
Definition: intsafe.h:52
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4

◆ CtfAImmDeactivate()

HRESULT WINAPI CtfAImmDeactivate ( _In_ BOOL  bDestroy)

Definition at line 1044 of file ctf.c.

1046{
1047 HRESULT hr;
1048
1049 if (!bDestroy)
1050 return E_FAIL;
1051
1053 if (hr == S_OK)
1054 {
1055 GetWin32ClientInfo()->CI_flags &= ~CI_AIMMACTIVATED; /* Deactivate AIMM */
1056 GetWin32ClientInfo()->CI_flags |= CI_TSFDISABLED; /* Disable TSF */
1057 }
1058
1059 return hr;
1060}
HRESULT CtfImeDestroyThreadMgr(VOID)
Definition: ctf.c:751
#define E_FAIL
Definition: ddrawi.h:102
#define CI_TSFDISABLED
Definition: ntuser.h:310

◆ CtfAImmIsIME()

BOOL WINAPI CtfAImmIsIME ( _In_ HKL  hKL)

Definition at line 767 of file ctf.c.

768{
769 TRACE("(%p)\n", hKL);
770 if (!Imm32LoadCtfIme())
771 return ImmIsIME(hKL);
772 return CTF_IME_FN(CtfImeIsIME)(hKL);
773}
#define CTF_IME_FN(func_name)
Definition: ctf.c:225
BOOL WINAPI ImmIsIME(HKL hKL)
Definition: ime.c:880
EXTERN_C BOOL WINAPI CtfImeIsIME(_In_ HKL hKL)
Definition: msctfime.cpp:874

◆ CtfImmCoUninitialize()

VOID WINAPI CtfImmCoUninitialize ( VOID  )

Definition at line 614 of file ctf.c.

615{
617
618 if (!(GetWin32ClientInfo()->CI_flags & CI_CTFCOINIT))
619 return; /* Not CoInitialize'd */
620
621 pData = Imm32GetTLS();
622 if (pData)
623 {
624 pData->bUninitializing = TRUE;
625 Imm32CoUninitialize(); /* Do CoUninitialize */
626 pData->bUninitializing = FALSE;
627
628 GetWin32ClientInfo()->CI_flags &= ~CI_CTFCOINIT;
629 }
630
632 if (!pData || !pData->pSpy)
633 return; /* There were no spy */
634
635 /* Our work is done. We don't need spies like you anymore. */
637 ISPY_Release(pData->pSpy);
638 pData->pSpy = NULL;
639 pData->uliCookie.QuadPart = 0;
640}
VOID Imm32CoUninitialize(VOID)
Definition: ctf.c:138
static IMMTLSDATA * Imm32AllocateTLS(VOID)
Definition: ctf.c:296
static IMMTLSDATA * Imm32GetTLS(VOID)
Definition: ctf.c:321
HRESULT Imm32CoRevokeInitializeSpy(ULARGE_INTEGER cookie)
Definition: ctf.c:154
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CI_CTFCOINIT
Definition: ntuser.h:307
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830

Referenced by ImmDisableTextFrameService(), and ISPY_PreInitialize().

◆ CtfImmDispatchDefImeMessage()

LRESULT WINAPI CtfImmDispatchDefImeMessage ( _In_ HWND  hWnd,
_In_ UINT  uMsg,
_In_ WPARAM  wParam,
_In_ LPARAM  lParam 
)

Definition at line 1416 of file ctf.c.

1421{
1422 TRACE("(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam);
1423
1425 return 0;
1426
1428}
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static BOOL Imm32InsideLoaderLock(VOID)
Definition: ctf.c:16
NTSYSAPI BOOLEAN WINAPI RtlDllShutdownInProgress(void)
Definition: ldrapi.c:1557
EXTERN_C LRESULT WINAPI CtfImeDispatchDefImeMessage(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: msctfime.cpp:837

Referenced by ImeWndProc_common().

◆ CtfImmEnterCoInitCountSkipMode()

VOID WINAPI CtfImmEnterCoInitCountSkipMode ( VOID  )

Definition at line 381 of file ctf.c.

382{
384
385 TRACE("()\n");
386
387 pData = Imm32GetTLS();
388 if (pData)
389 ++(pData->bDoCount);
390}

◆ CtfImmGenerateMessage()

BOOL WINAPI CtfImmGenerateMessage ( _In_ HIMC  hIMC,
_In_ BOOL  bSend 
)

Definition at line 1272 of file ctf.c.

1275{
1276 DWORD_PTR dwImeThreadId, dwCurrentThreadId;
1277 PCLIENTIMC pClientImc;
1278 BOOL bUnicode;
1279 LPINPUTCONTEXT pIC;
1280 DWORD iMsg, dwNumMsgBuf;
1281 LPTRANSMSG pOldTransMsg, pNewTransMsg;
1282 SIZE_T cbTransMsg;
1283
1284 TRACE("(%p, %d)\n", hIMC, bSend);
1285
1286 dwImeThreadId = NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID);
1287 dwCurrentThreadId = GetCurrentThreadId();
1288 if (dwImeThreadId != dwCurrentThreadId)
1289 {
1290 ERR("%p vs %p\n", dwImeThreadId, dwCurrentThreadId);
1291 return FALSE;
1292 }
1293
1294 pClientImc = ImmLockClientImc(hIMC);
1295 if (IS_NULL_UNEXPECTEDLY(pClientImc))
1296 return FALSE;
1297
1298 bUnicode = !!(pClientImc->dwFlags & CLIENTIMC_WIDE);
1299 ImmUnlockClientImc(pClientImc);
1300
1301 pIC = (LPINPUTCONTEXT)ImmLockIMC(hIMC);
1302 if (IS_NULL_UNEXPECTEDLY(pIC))
1303 return FALSE;
1304
1305 dwNumMsgBuf = pIC->dwNumMsgBuf;
1306 pOldTransMsg = (LPTRANSMSG)ImmLockIMCC(pIC->hMsgBuf);
1307 if (IS_NULL_UNEXPECTEDLY(pOldTransMsg))
1308 {
1309 pIC->dwNumMsgBuf = 0;
1310 ImmUnlockIMC(hIMC);
1311 return TRUE;
1312 }
1313
1314 cbTransMsg = sizeof(TRANSMSG) * dwNumMsgBuf;
1315 pNewTransMsg = (PTRANSMSG)ImmLocalAlloc(0, cbTransMsg);
1316 if (IS_NULL_UNEXPECTEDLY(pNewTransMsg))
1317 {
1318 ImmUnlockIMCC(pIC->hMsgBuf);
1319 pIC->dwNumMsgBuf = 0;
1320 ImmUnlockIMC(hIMC);
1321 return TRUE;
1322 }
1323
1324 RtlCopyMemory(pNewTransMsg, pOldTransMsg, cbTransMsg);
1325
1326 for (iMsg = 0; iMsg < dwNumMsgBuf; ++iMsg)
1327 {
1328 HWND hWnd = pIC->hWnd;
1329 UINT uMsg = pNewTransMsg[iMsg].message;
1330 WPARAM wParam = pNewTransMsg[iMsg].wParam;
1331 LPARAM lParam = pNewTransMsg[iMsg].lParam;
1332 if (bSend)
1333 {
1334 if (bUnicode)
1335 SendMessageW(hWnd, uMsg, wParam, lParam);
1336 else
1337 SendMessageA(hWnd, uMsg, wParam, lParam);
1338 }
1339 else
1340 {
1341 if (bUnicode)
1342 PostMessageW(hWnd, uMsg, wParam, lParam);
1343 else
1344 PostMessageA(hWnd, uMsg, wParam, lParam);
1345 }
1346 }
1347
1348 ImmLocalFree(pNewTransMsg);
1349 ImmUnlockIMCC(pIC->hMsgBuf);
1350 pIC->dwNumMsgBuf = 0; /* Processed */
1351 ImmUnlockIMC(hIMC);
1352
1353 return TRUE;
1354}
#define ERR(fmt,...)
Definition: precomp.h:57
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1066
VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
Definition: imm.c:983
PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
Definition: imm.c:937
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1057
LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:415
#define ImmLocalFree(lpData)
Definition: precomp.h:89
#define IS_NULL_UNEXPECTEDLY(p)
Definition: precomp.h:125
BOOL WINAPI ImmUnlockIMCC(HIMCC imcc)
Definition: utils.c:1208
LPVOID WINAPI ImmLockIMCC(HIMCC imcc)
Definition: utils.c:1198
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _tagTRANSMSG * LPTRANSMSG
struct _tagTRANSMSG TRANSMSG
#define CLIENTIMC_WIDE
Definition: imm32_undoc.h:138
struct _tagINPUTCONTEXT * LPINPUTCONTEXT
struct _tagTRANSMSG * PTRANSMSG
DWORD_PTR NTAPI NtUserQueryInputContext(HIMC hIMC, DWORD dwType)
Definition: ime.c:1791
unsigned int UINT
Definition: ndis.h:50
HIMCC hMsgBuf
Definition: immdev.h:146
DWORD dwNumMsgBuf
Definition: immdev.h:145
LPARAM lParam
Definition: imm32.c:68
WPARAM wParam
Definition: imm32.c:67
UINT message
Definition: imm32.c:66
uint32_t DWORD_PTR
Definition: typedefs.h:65
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
@ QIC_INPUTTHREADID
Definition: undocuser.h:393
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ CtfImmHideToolbarWnd()

DWORD WINAPI CtfImmHideToolbarWnd ( VOID  )

Definition at line 1362 of file ctf.c.

1363{
1364 ITfLangBarMgr *pBarMgr;
1365 DWORD dwShowFlags = 0;
1366 BOOL bShown;
1367
1368 TRACE("()\n");
1369
1370 if (FAILED(Imm32TF_CreateLangBarMgr(&pBarMgr)))
1371 return dwShowFlags;
1372
1373 if (SUCCEEDED(pBarMgr->lpVtbl->GetShowFloatingStatus(pBarMgr, &dwShowFlags)))
1374 {
1375 bShown = !(dwShowFlags & 0x800);
1376 dwShowFlags &= 0xF;
1377 if (bShown)
1378 pBarMgr->lpVtbl->ShowFloating(pBarMgr, 8);
1379 }
1380
1381 pBarMgr->lpVtbl->Release(pBarMgr);
1382 return dwShowFlags;
1383}
HRESULT Imm32TF_CreateLangBarMgr(_Inout_ ITfLangBarMgr **ppBarMgr)
Definition: ctf.c:179
HRESULT GetShowFloatingStatus([out] DWORD *pdwFlags)
HRESULT ShowFloating([in] DWORD dwFlags)
ULONG Release()
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51

Referenced by ImeWnd_OnImeControl().

◆ CtfImmIsCiceroStartedInThread()

BOOL WINAPI CtfImmIsCiceroStartedInThread ( VOID  )

Definition at line 781 of file ctf.c.

782{
783 TRACE("()\n");
784 return !!(GetWin32ClientInfo()->CI_flags & CI_CICERO_STARTED);
785}
#define CI_CICERO_STARTED
Definition: ntuser.h:309

Referenced by CtfImeProcessCicHotkey(), and ImmProcessKey().

◆ CtfImmIsTextFrameServiceDisabled()

BOOL WINAPI CtfImmIsTextFrameServiceDisabled ( VOID  )

Definition at line 1079 of file ctf.c.

1080{
1081 return !!(GetWin32ClientInfo()->CI_flags & CI_TSFDISABLED);
1082}

Referenced by Imm32SelectInputContext(), and ImmGetImeInfoEx().

◆ CtfImmLastEnabledWndDestroy()

HRESULT WINAPI CtfImmLastEnabledWndDestroy ( _In_ BOOL  bCreate)

Definition at line 996 of file ctf.c.

998{
999 TRACE("(%d)\n", bCreate);
1001}
HRESULT Imm32ActivateOrDeactivateTIM(_In_ BOOL bCreate)
Definition: ctf.c:895
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1519

◆ CtfImmLeaveCoInitCountSkipMode()

BOOL WINAPI CtfImmLeaveCoInitCountSkipMode ( VOID  )

Definition at line 395 of file ctf.c.

396{
398
399 TRACE("()\n");
400
401 pData = Imm32GetTLS();
402 if (!pData || !pData->bDoCount)
403 return FALSE;
404
405 --(pData->bDoCount);
406 return TRUE;
407}

◆ CtfImmRestoreToolbarWnd()

VOID WINAPI CtfImmRestoreToolbarWnd ( _In_ LPVOID  pUnused,
_In_ DWORD  dwShowFlags 
)

Definition at line 1391 of file ctf.c.

1394{
1395 HRESULT hr;
1396 ITfLangBarMgr *pBarMgr;
1397
1398 UNREFERENCED_PARAMETER(pUnused);
1399
1400 TRACE("(%p, 0x%X)\n", pUnused, dwShowFlags);
1401
1402 hr = Imm32TF_CreateLangBarMgr(&pBarMgr);
1404 return;
1405
1406 if (dwShowFlags)
1407 pBarMgr->lpVtbl->ShowFloating(pBarMgr, dwShowFlags);
1408
1409 pBarMgr->lpVtbl->Release(pBarMgr);
1410}
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

Referenced by ImeWnd_OnImeControl().

◆ CtfImmSetAppCompatFlags()

VOID WINAPI CtfImmSetAppCompatFlags ( _In_ DWORD  dwFlags)

Definition at line 805 of file ctf.c.

806{
807 TRACE("(0x%08X)\n", dwFlags);
808 if (!(dwFlags & 0xF0FFFFFF))
810}
DWORD g_aimm_compat_flags
Definition: ctf.c:204
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ CtfImmSetCiceroStartInThread()

VOID WINAPI CtfImmSetCiceroStartInThread ( _In_ BOOL  bStarted)

Definition at line 790 of file ctf.c.

791{
792 TRACE("(%d)\n", bStarted);
793 if (bStarted)
795 else
796 GetWin32ClientInfo()->CI_flags &= ~CI_CICERO_STARTED;
797}

◆ CtfImmTIMActivate()

HRESULT WINAPI CtfImmTIMActivate ( _In_ HKL  hKL)

Definition at line 1123 of file ctf.c.

1124{
1125 HRESULT hr = S_OK;
1126
1127 TRACE("(%p)\n", hKL);
1128
1130 {
1131 TRACE("g_disable_CUAS_flag\n");
1132 GetWin32ClientInfo()->CI_flags |= CI_TSFDISABLED;
1133 return FALSE;
1134 }
1135
1136 if (GetWin32ClientInfo()->CI_flags & CI_TSFDISABLED)
1137 {
1138 TRACE("CI_TSFDISABLED\n");
1139 return FALSE;
1140 }
1141
1143 {
1144 TRACE("TIM is disabled in registry\n");
1145 GetWin32ClientInfo()->CI_flags |= CI_TSFDISABLED;
1146 return FALSE;
1147 }
1148
1150 {
1151 TRACE("TIM is disabled due to LOGON or MSOBE\n");
1152 return FALSE;
1153 }
1154
1156 {
1157 TRACE("CUAS is disabled in registry\n");
1158 GetWin32ClientInfo()->CI_flags |= CI_TSFDISABLED;
1159 return FALSE;
1160 }
1161
1162 if (NtCurrentTeb()->ProcessEnvironmentBlock->AppCompatFlags.LowPart & 0x100)
1163 {
1164 TRACE("CUAS is disabled by AppCompatFlags\n");
1165 GetWin32ClientInfo()->CI_flags |= CI_TSFDISABLED;
1166 return FALSE;
1167 }
1168
1170 {
1171 TRACE("TIM is disabled by Loader\n");
1172 return FALSE;
1173 }
1174
1175 if (!IS_CICERO_MODE() || IS_16BIT_MODE())
1176 {
1177 TRACE("TIM is disabled because CICERO mode is unset\n");
1178 return FALSE;
1179 }
1180
1181 if (IS_IME_HKL(hKL))
1182 hKL = (HKL)UlongToHandle(MAKELONG(LOWORD(hKL), LOWORD(hKL)));
1183
1184 if (!ImmLoadIME(hKL))
1186
1188
1189 if ((GetWin32ClientInfo()->CI_flags & CI_CTFCOINIT) &&
1190 !(GetWin32ClientInfo()->CI_flags & CI_CTFTIM))
1191 {
1193 if (SUCCEEDED(hr))
1194 GetWin32ClientInfo()->CI_flags |= CI_CTFTIM;
1195 }
1196
1197 return hr;
1198}
#define UlongToHandle(ul)
Definition: basetsd.h:97
static BOOL Imm32IsRunningInMsoobe(VOID)
Definition: ctf.c:45
HRESULT CtfImmCoInitialize(VOID)
Definition: ctf.c:574
VOID Imm32TF_InvalidAssemblyListCacheIfExist(VOID)
Definition: ctf.c:189
static BOOL Imm32IsTIMDisabledInRegistry(VOID)
Definition: ctf.c:877
static BOOL Imm32IsCUASEnabledInRegistry(VOID)
Definition: ctf.c:61
BOOL g_disable_CUAS_flag
Definition: ctf.c:207
static BOOL Imm32IsInteractiveUserLogon(VOID)
Definition: ctf.c:23
BOOLEAN NTAPI RtlIsThreadWithinLoaderCallout(VOID)
Definition: libsupp.c:347
BOOL WINAPI ImmLoadIME(HKL hKL)
Definition: ime.c:1055
#define IS_IME_HKL(hKL)
Definition: imm32_undoc.h:20
#define CI_CTFTIM
Definition: ntuser.h:308
#define IS_16BIT_MODE()
Definition: ntuser.h:1211
#define IS_CICERO_MODE()
Definition: ntuser.h:1210
#define NtCurrentTeb
UINT_PTR HKL
Definition: msctf.idl:143
#define LOWORD(l)
Definition: pedump.c:82
#define MAKELONG(a, b)
Definition: typedefs.h:249

Referenced by CtfLoadThreadLayout(), and Imm32InternalLockIMC().

◆ GetKeyboardLayoutCP()

UINT WINAPI GetKeyboardLayoutCP ( _In_ LANGID  wLangId)

Definition at line 1250 of file imm.c.

1251{
1252 WCHAR szText[8];
1253 static LANGID s_wKeyboardLangIdCache = 0;
1254 static UINT s_uKeyboardLayoutCPCache = 0;
1255
1256 TRACE("(%u)\n", wLangId);
1257
1258 if (wLangId == s_wKeyboardLangIdCache)
1259 return s_uKeyboardLayoutCPCache;
1260
1261 if (!GetLocaleInfoW(wLangId, LOCALE_IDEFAULTANSICODEPAGE, szText, _countof(szText)))
1262 return 0;
1263
1264 s_wKeyboardLangIdCache = wLangId;
1265 szText[_countof(szText) - 1] = UNICODE_NULL; /* Avoid buffer overrun */
1266 s_uKeyboardLayoutCPCache = wcstol(szText, NULL, 10);
1267 return s_uKeyboardLayoutCPCache;
1268}
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1665
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
USHORT LANGID
Definition: mui.h:9
#define UNICODE_NULL
#define _countof(array)
Definition: sndvol32.h:70
#define LOCALE_IDEFAULTANSICODEPAGE
Definition: winnls.h:38
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ ImmGetAppCompatFlags()

DWORD WINAPI ImmGetAppCompatFlags ( _In_ HIMC  hIMC)

◆ ImmGetImeInfoEx()

BOOL WINAPI ImmGetImeInfoEx ( _Out_ PIMEINFOEX  pImeInfoEx,
_In_ IMEINFOEXCLASS  SearchType,
_In_ PVOID  pvSearchKey 
)

◆ ImmLoadIME()

BOOL WINAPI ImmLoadIME ( _In_ HKL  hKL)

◆ ImmLoadLayout()

BOOL WINAPI ImmLoadLayout ( _In_ HKL  hKL,
_Inout_ PIMEINFOEX  pImeInfoEx 
)

◆ ImmLockClientImc()

PCLIENTIMC WINAPI ImmLockClientImc ( _In_ HIMC  hImc)

◆ ImmLockImeDpi()

PIMEDPI WINAPI ImmLockImeDpi ( _In_ HKL  hKL)

◆ ImmProcessKey()

DWORD WINAPI ImmProcessKey ( _In_  HWND,
_In_  HKL,
_In_  UINT,
_In_  LPARAM,
_In_  DWORD 
)

◆ ImmSetActiveContext()

BOOL WINAPI ImmSetActiveContext ( _In_ HWND  hwnd,
_In_ HIMC  hIMC,
_In_ BOOL  fFlag 
)

◆ ImmUnlockClientImc()

VOID WINAPI ImmUnlockClientImc ( _Inout_ PCLIENTIMC  pClientImc)

◆ ImmUnlockImeDpi()

VOID WINAPI ImmUnlockImeDpi ( _Inout_ PIMEDPI  pImeDpi)