19#define WIN32_NO_STATUS
50#define IMM_INIT_MAGIC 0x19650412
51#define IMM_INVALID_CANDFORM ULONG_MAX
52#define INVALID_HOTKEY_ID 0xFFFFFFFF
53#define MAX_CANDIDATEFORM 4
54#define MAX_IMM_FILENAME 80
56#define LANGID_CHINESE_SIMPLIFIED MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)
57#define LANGID_CHINESE_TRADITIONAL MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)
58#define LANGID_JAPANESE MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT)
60#define REGKEY_KEYBOARD_LAYOUTS L"System\\CurrentControlSet\\Control\\Keyboard Layouts"
62#define ROUNDUP4(n) (((n) + 3) & ~3)
84#define ValidateHwndNoErr(hwnd) ValidateHandleNoErr((hwnd), TYPE_WINDOW)
85#define ValidateHwnd(hwnd) ValidateHandle((hwnd), TYPE_WINDOW)
89#define ImmLocalFree(lpData) HeapFree(ghImmHeap, 0, (lpData))
104 #define UNEXPECTED() ASSERT(FALSE)
106 #define UNEXPECTED() 0
114#define FAILED_UNEXPECTEDLY(hr) (FAILED(hr))
115#define IS_NULL_UNEXPECTEDLY(p) (!(p))
116#define IS_ZERO_UNEXPECTEDLY(p) (!(p))
117#define IS_TRUE_UNEXPECTEDLY(x) (x)
118#define IS_FALSE_UNEXPECTEDLY(x) (!(x))
119#define IS_ERROR_UNEXPECTEDLY(x) (!(x))
121#define FAILED_UNEXPECTEDLY(hr) \
122 (FAILED(hr) ? (ros_dbg_log(__WINE_DBCL_ERR, __wine_dbch___default, \
123 __FILE__, __FUNCTION__, __LINE__, "FAILED(%s)\n", #hr), UNEXPECTED(), TRUE) \
125#define IS_NULL_UNEXPECTEDLY(p) \
126 (!(p) ? (ros_dbg_log(__WINE_DBCL_ERR, __wine_dbch___default, \
127 __FILE__, __FUNCTION__, __LINE__, "%s was NULL\n", #p), UNEXPECTED(), TRUE) \
129#define IS_ZERO_UNEXPECTEDLY(p) \
130 (!(p) ? (ros_dbg_log(__WINE_DBCL_ERR, __wine_dbch___default, \
131 __FILE__, __FUNCTION__, __LINE__, "%s was zero\n", #p), UNEXPECTED(), TRUE) \
133#define IS_TRUE_UNEXPECTEDLY(x) \
134 ((x) ? (ros_dbg_log(__WINE_DBCL_ERR, __wine_dbch___default, \
135 __FILE__, __FUNCTION__, __LINE__, "%s was non-zero\n", #x), UNEXPECTED(), TRUE) \
137#define IS_FALSE_UNEXPECTEDLY(x) \
138 ((!(x)) ? (ros_dbg_log(__WINE_DBCL_ERR, __wine_dbch___default, \
139 __FILE__, __FUNCTION__, __LINE__, "%s was FALSE\n", #x), UNEXPECTED(), TRUE) \
141#define IS_ERROR_UNEXPECTEDLY(x) \
142 ((x) != ERROR_SUCCESS ? (ros_dbg_log(__WINE_DBCL_ERR, __wine_dbch___default, \
143 __FILE__, __FUNCTION__, __LINE__, \
144 "%s was 0x%X\n", #x, (x)), TRUE) \
148#define IS_CROSS_THREAD_HIMC(hIMC) IS_TRUE_UNEXPECTEDLY(Imm32IsCrossThreadAccess(hIMC))
149#define IS_CROSS_PROCESS_HWND(hWnd) IS_TRUE_UNEXPECTEDLY(Imm32IsCrossProcessAccess(hWnd))
150#define ImeDpi_IsUnicode(pImeDpi) ((pImeDpi)->ImeInfo.fdwProperty & IME_PROP_UNICODE)
LPINPUTCONTEXT APIENTRY Imm32InternalLockIMC(HIMC hIMC, BOOL fSelect)
VOID APIENTRY LogFontAnsiToWide(const LOGFONTA *plfA, LPLOGFONTW plfW)
LPSTR APIENTRY Imm32AnsiFromWide(UINT uCodePage, LPCWSTR pszW)
BOOL APIENTRY Imm32WriteImeLayout(HKL hKL, LPCWSTR pchFilePart, LPCWSTR pszLayoutText)
struct REG_IME * PREG_IME
BOOL WINAPI Imm32IsImcAnsi(HIMC hIMC)
BOOL APIENTRY Imm32MakeIMENotify(HIMC hIMC, HWND hwnd, DWORD dwAction, DWORD_PTR dwIndex, DWORD_PTR dwValue, DWORD_PTR dwCommand, DWORD_PTR dwData)
PIME_SUBSTATE APIENTRY Imm32FetchImeSubState(PIME_STATE pState, HKL hKL)
LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes)
HRESULT CtfImeSetActiveContextAlways(_In_ HIMC hIMC, _In_ BOOL fActive, _In_ HWND hWnd, _In_ HKL hKL)
HRESULT APIENTRY Imm32StrToUInt(LPCWSTR pszText, LPDWORD pdwValue, ULONG nBase)
BOOL APIENTRY Imm32IsCrossThreadAccess(HIMC hIMC)
VOID APIENTRY LogFontWideToAnsi(const LOGFONTW *plfW, LPLOGFONTA plfA)
BOOL Imm32StoreBitmapToBytes(HBITMAP hbm, LPBYTE pbData, DWORD cbDataMax)
BOOL APIENTRY Imm32CopyImeFile(LPWSTR pszOldFile, LPCWSTR pszNewFile)
LPVOID FASTCALL ValidateHandleNoErr(HANDLE hObject, UINT uType)
DWORD APIENTRY CandidateListAnsiToWide(const CANDIDATELIST *pAnsiCL, LPCANDIDATELIST pWideCL, DWORD dwBufLen, UINT uCodePage)
RTL_CRITICAL_SECTION gcsImeDpi
UINT APIENTRY Imm32GetImeLayout(PREG_IME pLayouts, UINT cLayouts)
HRESULT CtfImeCreateThreadMgr(VOID)
HRESULT CtfImmCoInitialize(VOID)
HRESULT CtfImeDestroyThreadMgr(VOID)
BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC)
BOOL APIENTRY Imm32LoadImeVerInfo(PIMEINFOEX pImeInfoEx)
PIMEDPI APIENTRY Imm32FindOrLoadImeDpi(HKL hKL)
HRESULT CtfImmTIMCreateInputContext(_In_ HIMC hIMC)
PTHREADINFO FASTCALL Imm32CurrentPti(VOID)
LONG APIENTRY IchWideFromAnsi(LONG cchAnsi, LPCSTR pchAnsi, UINT uCodePage)
BOOL APIENTRY Imm32IsCrossProcessAccess(HWND hWnd)
HRESULT Imm32ActivateOrDeactivateTIM(_In_ BOOL bCreate)
DWORD APIENTRY Imm32ReconvertAnsiFromWide(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc, UINT uCodePage)
BOOL Imm32GetSystemLibraryPath(LPWSTR pszPath, DWORD cchPath, LPCWSTR pszFileName)
DWORD APIENTRY Imm32BuildHimcList(DWORD dwThreadId, HIMC **pphList)
LPVOID FASTCALL ValidateHandle(HANDLE hObject, UINT uType)
HRESULT CtfImmTIMDestroyInputContext(_In_ HIMC hIMC)
PIME_STATE APIENTRY Imm32FetchImeState(LPINPUTCONTEXTDX pIC, HKL hKL)
BOOL CtfImeProcessCicHotkey(_In_ HIMC hIMC, _In_ UINT vKey, _In_ LPARAM lParam)
BOOL APIENTRY Imm32SaveImeStateSentence(LPINPUTCONTEXTDX pIC, PIME_STATE pState, HKL hKL)
HRESULT APIENTRY Imm32UIntToStr(DWORD dwValue, ULONG nBase, LPWSTR pszBuff, USHORT cchBuff)
LRESULT CtfImmSetLangBand(_In_ HWND hWnd, _In_ BOOL fSet)
BOOL APIENTRY Imm32IsSystemJapaneseOrKorean(VOID)
DWORD g_aimm_compat_flags
HKL APIENTRY Imm32AssignNewLayout(UINT cKLs, const REG_IME *pLayouts, WORD wLangID)
DWORD APIENTRY CandidateListWideToAnsi(const CANDIDATELIST *pWideCL, LPCANDIDATELIST pAnsiCL, DWORD dwBufLen, UINT uCodePage)
HBITMAP Imm32LoadBitmapFromBytes(const BYTE *pb)
BOOL APIENTRY Imm32LoadImeStateSentence(LPINPUTCONTEXTDX pIC, PIME_STATE pState, HKL hKL)
INT APIENTRY Imm32ImeMenuWideToAnsi(const IMEMENUITEMINFOW *pItemW, LPIMEMENUITEMINFOA pItemA, UINT uCodePage)
INT APIENTRY Imm32ImeMenuAnsiToWide(const IMEMENUITEMINFOA *pItemA, LPIMEMENUITEMINFOW pItemW, UINT uCodePage, BOOL bBitmap)
LONG APIENTRY IchAnsiFromWide(LONG cchWide, LPCWSTR pchWide, UINT uCodePage)
BOOL APIENTRY Imm32ReleaseIME(HKL hKL)
LPWSTR APIENTRY Imm32WideFromAnsi(UINT uCodePage, LPCSTR pszA)
DWORD APIENTRY Imm32ReconvertWideFromAnsi(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc, UINT uCodePage)
static HANDLE ULONG_PTR dwData
_In_ int _In_ BOOL bCreate
WORD WORD PSZ PSZ pszFileName
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ DWORD _In_ DWORD dwBufLen
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData