test: fareast.c File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# fareast.c File Reference

`#include "precomp.h"`

Go to the source code of this file.

## Defines

#define | COMMON_RETURN_ZERO return 0;
#define | IMMMODULENAME L"IMM32.DLL"
#define | PATHDLM L'\\'
#define | IMMMODULENAMELEN ((sizeof PATHDLM + sizeof IMMMODULENAME) / sizeof(WCHAR))
#define | REGISTER(name, cast)

## Functions

VOID | fakeImm_v1 (PVOID dummy)
DWORD | fakeImm_d1 (DWORD dummy)
VOID | fakeImm_v2 (PVOID dummy1, PVOID dummy2)
DWORD | fakeImm_d2 (DWORD dummy1, DWORD dummy2)
DWORD | fakeImm_d3 (DWORD dummy1, DWORD dummy2, DWORD dummy3)
DWORD | fakeImm_bwuwl (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
VOID WINAPI | fakeImm_wv1 (PVOID dummy)
DWORD WINAPI | fakeImm_wd1 (PVOID dummy)
DWORD WINAPI | fakeImm_wd2 (PVOID dummy1, PVOID dummy2)
BOOL WINAPI | fakeImm_bd2 (PVOID dummy1, PVOID dummy2)
DWORD WINAPI | fakeImm_wd3 (PVOID dummy1, PVOID dummy2, PVOID dummy3)
DWORD WINAPI | fakeImm_wd4 (PVOID dummy1, PVOID dummy2, PVOID dummy3, PVOID dummy4)
DWORD WINAPI | fakeImm_wd5 (PVOID dummy1, PVOID dummy2, PVOID dummy3, PVOID dummy4, PVOID dummy5)
DWORD WINAPI | fakeImm_wd6 (PVOID dummy1, PVOID dummy2, PVOID dummy3, PVOID dummy4, PVOID dummy5, PVOID dummy6)
VOID | GetImmFileName (PWSTR wszImmFile)
VOID | _InitializeImmEntryTable (VOID)
VOID | InitializeImmEntryTable (VOID)
BOOL | User32InitializeImmEntryTable (DWORD magic)
UINT WINAPI | WINNLSGetIMEHotkey (HWND hwndIme)
BOOL WINAPI | WINNLSEnableIME (HWND hwnd, BOOL bFlag)
BOOL WINAPI | WINNLSGetEnableStatus (HWND hwnd)
LRESULT WINAPI | SendIMEMessageExW (HWND hwnd, LPARAM lParam)
LRESULT WINAPI | SendIMEMessageExA (HWND hwnd, LPARAM lParam)
BOOL WINAPI | IMPGetIMEW (HWND hwnd, LPIMEPROW lpImeProW)
BOOL WINAPI | IMPGetIMEA (HWND hwnd, LPIMEPROA lpImeProA)
BOOL WINAPI | IMPQueryIMEW (LPIMEPROW lpImeProW)
BOOL WINAPI | IMPQueryIMEA (LPIMEPROA lpImeProA)
BOOL WINAPI | IMPSetIMEW (HWND hwnd, LPIMEPROW lpImeProW)
BOOL WINAPI | IMPSetIMEA (HWND hwnd, LPIMEPROA lpImeProA)

## Variables

ImmApiEntries | gImmApiEntries
HMODULE | ghImm32
BOOL | bImmInitializing = FALSE

## Define Documentation

#define COMMON_RETURN_ZERO return 0;

| Definition at line 15 of file fareast.c. Referenced by fakeImm_wd1(), fakeImm_wd2(), fakeImm_wd3(), fakeImm_wd4(), fakeImm_wd5(), and fakeImm_wd6().

#define IMMMODULENAME L"IMM32.DLL"

| Definition at line 209 of file fareast.c. Referenced by GetImmFileName().

#define IMMMODULENAMELEN ((sizeof PATHDLM + sizeof IMMMODULENAME) / sizeof(WCHAR))

| Definition at line 211 of file fareast.c. Referenced by GetImmFileName().

#define PATHDLM L'\\'

| Definition at line 210 of file fareast.c. Referenced by GetImmFileName().

#define REGISTER | ( | name,
|  | cast |  | ) |

Value:

    gImmApiEntries.name = (cast)GetProcAddress(hImm, #name); \
        if (gImmApiEntries.name == NULL) { \
            RIPMSG1(RIP_WARNING, "gImmApiEntries.%s got to be NULL", #name); \
            gImmApiEntries.name = (PVOID)fakeImm_v1; \
            return; \
        } else

Definition at line 225 of file fareast.c.

Referenced by _InitializeImmEntryTable().

## Function Documentation

VOID _InitializeImmEntryTable | ( | VOID |  | ) |

Definition at line 238 of file fareast.c.

References BOOL, DWORD, fakeImm_wd2(), GetImmFileName(), ghImm32, gImmApiEntries, IMEINFOEXCLASS, ImmActivateLayout(), ImmAssociateContext(), ImmConfigureIMEW(), ImmEnumInputContext(), ImmEscapeA(), ImmEscapeW(), ImmFreeLayout(), ImmGetCompositionFontA(), ImmGetCompositionFontW(), ImmGetCompositionStringA(), ImmGetCompositionStringW(), ImmGetCompositionWindow(), ImmGetContext(), ImmGetConversionStatus(), ImmGetDefaultIMEWnd(), ImmGetImeInfoEx(), ImmGetOpenStatus(), ImmGetProperty(), ImmIMPGetIMEA(), ImmIMPGetIMEW(), ImmIMPQueryIMEA(), ImmIMPQueryIMEW(), ImmIMPSetIMEA(), ImmIMPSetIMEW(), ImmIsIME(), ImmLoadIME(), ImmLoadLayout(), ImmLockIMC(), ImmLockImeDpi(), ImmNotifyIME(), ImmProcessKey(), ImmPutImeMenuItemsIntoMappedFile(), ImmRegisterClient(), ImmReleaseContext(), ImmSendIMEMessageExA(), ImmSendIMEMessageExW(), ImmSetActiveContext(), ImmSetCandidateWindow(), ImmSetCompositionFontA(), ImmSetCompositionFontW(), ImmSetCompositionStringA(), ImmSetCompositionStringW(), ImmSetCompositionWindow(), ImmSetConversionStatus(), ImmSetOpenStatus(), ImmSetStatusWindowPos(), ImmSystemHandler(), ImmTranslateMessage(), ImmUnlockIMC(), ImmUnlockImeDpi(), ImmWINNLSEnableIME(), ImmWINNLSGetEnableStatus(), LPVOID, MAX_PATH, NULL, PIMEINFOEX, REGISTER, UINT, and VOID().

Referenced by InitializeImmEntryTable(), and User32InitializeImmEntryTable().

    00239 {
    00240     HMODULE hImm = ghImm32;
    00241     WCHAR wszImmFile[MAX_PATH];
    00242
    00243     if (((PVOID)gImmApiEntries.ImmWINNLSEnableIME) != ((PVOID)fakeImm_wd2)) {
    00244         // already initialized.
    00245         return;
    00246     }
    00247
    00248     GetImmFileName(wszImmFile);
    00249
    00250     if (hImm == NULL) {
    00251         // check if IMM DLL is already attached to the process
    00252         hImm = GetModuleHandleW(wszImmFile);
    00253     }
    00254
    00255     if (hImm == NULL) {
    00256         hImm = ghImm32 = LoadLibraryW(wszImmFile);
    00257         if (hImm == NULL) {
    00258             RIPMSG1(RIP_WARNING, "_InitializeImmEntryTable: failed to load Imm32.Dll: err=%d\n", GetLastError());
    00259             return;
    00260         }
    00261
    00262         // at this point, Init routine of IMM32 has been called, thus User32InitializeImmEntry.. called.
    00263         // all what we have to do is just return here.
    00264         return;
    00265     }
    00266
    00267     if (hImm == NULL) {
    00268         RIPMSG0(RIP_WARNING, "Failed to attach IMM32.DLL.\n");
    00269         return;
    00270     }
    00271
    00272     // get the addresses of the procedures
    00273     REGISTER(ImmWINNLSEnableIME, BOOL (WINAPI*)(HWND, BOOL));
    00274     REGISTER(ImmWINNLSGetEnableStatus, BOOL (*)(HWND));
    00275     REGISTER(ImmSendIMEMessageExW, LRESULT (*)(HWND, LPARAM));
    00276     REGISTER(ImmSendIMEMessageExA, LRESULT (*)(HWND, LPARAM));
    00277     REGISTER(ImmIMPGetIMEW, BOOL(*)(HWND, LPIMEPROW));
    00278     REGISTER(ImmIMPGetIMEA, BOOL(*)(HWND, LPIMEPROA))
    00279     REGISTER(ImmIMPQueryIMEW, BOOL(*)(LPIMEPROW))
    00280     REGISTER(ImmIMPQueryIMEA, BOOL(*)(LPIMEPROA));
    00281     REGISTER(ImmIMPSetIMEW, BOOL(*)(HWND, LPIMEPROW));
    00282     REGISTER(ImmIMPSetIMEA, BOOL(*)(HWND, LPIMEPROA));
    00283
    00284     REGISTER(ImmAssociateContext, HIMC (WINAPI*)(HWND, HIMC));
    00285     REGISTER(ImmEscapeA, LRESULT(WINAPI*)(HKL, HIMC, UINT, LPVOID));
    00286     REGISTER(ImmEscapeW, LRESULT(WINAPI*)(HKL, HIMC, UINT, LPVOID));
    00287     REGISTER(ImmGetCompositionStringA, LONG (WINAPI*)(HIMC, DWORD, LPVOID, DWORD));
    00288     REGISTER(ImmGetCompositionStringW, LONG (WINAPI*)(HIMC, DWORD, LPVOID, DWORD));
    00289     REGISTER(ImmGetCompositionWindow, BOOL (WINAPI*)(HIMC, LPCOMPOSITIONFORM));
    00290     REGISTER(ImmGetContext, HIMC (WINAPI*)(HWND));
    00291     REGISTER(ImmGetDefaultIMEWnd, HWND (WINAPI*)(HWND));
    00292     REGISTER(ImmIsIME, BOOL (WINAPI*)(HKL));
    00293     REGISTER(ImmReleaseContext, BOOL (WINAPI*)(HWND, HIMC));
    00294     REGISTER(ImmRegisterClient, BOOL(*)(PSHAREDINFO, HINSTANCE));
    00295
    00296     REGISTER(ImmGetCompositionFontW, BOOL (WINAPI*)(HIMC, LPLOGFONTW));
    00297     REGISTER(ImmGetCompositionFontA, BOOL (WINAPI*)(HIMC, LPLOGFONTA));
    00298     REGISTER(ImmSetCompositionFontW, BOOL (WINAPI*)(HIMC, LPLOGFONTW));
    00299     REGISTER(ImmSetCompositionFontA, BOOL (WINAPI*)(HIMC, LPLOGFONTA));
    00300
    00301     REGISTER(ImmSetCompositionWindow, BOOL(WINAPI*)(HIMC, LPCOMPOSITIONFORM));
    00302     REGISTER(ImmNotifyIME, BOOL (WINAPI*)(HIMC, DWORD, DWORD, DWORD));
    00303     REGISTER(ImmLockIMC, PINPUTCONTEXT(WINAPI*)(HIMC));
    00304     REGISTER(ImmUnlockIMC, BOOL (WINAPI*)(HIMC));
    00305     REGISTER(ImmLoadIME, BOOL (WINAPI*)(HKL));
    00306     REGISTER(ImmSetOpenStatus, BOOL (WINAPI*)(HIMC, BOOL));
    00307     REGISTER(ImmFreeLayout, BOOL (WINAPI*)(DWORD));
    00308     REGISTER(ImmActivateLayout, BOOL (WINAPI*)(HKL));
    00309     REGISTER(ImmSetCandidateWindow, BOOL (WINAPI*)(HIMC, LPCANDIDATEFORM));
    00310     REGISTER(ImmConfigureIMEW, BOOL (WINAPI*)(HKL, HWND, DWORD, LPVOID));
    00311     REGISTER(ImmGetConversionStatus, BOOL (WINAPI*)(HIMC, LPDWORD, LPDWORD));
    00312     REGISTER(ImmSetConversionStatus, BOOL (WINAPI*)(HIMC, DWORD, DWORD));
    00313     REGISTER(ImmSetStatusWindowPos, BOOL (WINAPI*)(HIMC, LPPOINT));
    00314     REGISTER(ImmGetImeInfoEx, BOOL (WINAPI*)(PIMEINFOEX, IMEINFOEXCLASS, PVOID));
    00315     REGISTER(ImmLockImeDpi, PIMEDPI (WINAPI*)(HKL));
    00316     REGISTER(ImmUnlockImeDpi, VOID (WINAPI*)(PIMEDPI));
    00317     REGISTER(ImmGetOpenStatus, BOOL (WINAPI*)(HIMC));
    00318     REGISTER(ImmSetActiveContext, BOOL (*)(HWND, HIMC, BOOL));
    00319     REGISTER(ImmTranslateMessage, BOOL (*)(HWND, UINT, WPARAM, LPARAM));
    00320     REGISTER(ImmLoadLayout, BOOL (*)(HKL, PIMEINFOEX));
    00321     REGISTER(ImmProcessKey, DWORD (*)(HWND, HKL, UINT, LPARAM, DWORD));
    00322     REGISTER(ImmPutImeMenuItemsIntoMappedFile, LRESULT(*)(HIMC));
    00323     REGISTER(ImmGetProperty, DWORD (WINAPI*)(HKL, DWORD));
    00324     REGISTER(ImmSetCompositionStringA,
    00325              BOOL (WINAPI*)(HIMC hImc, DWORD dwIndex, LPCVOID lpComp,
    00326                    DWORD dwCompLen, LPCVOID lpRead, DWORD dwReadLen))
    00327     REGISTER(ImmSetCompositionStringW,
    00328              BOOL (WINAPI*)(HIMC hImc, DWORD dwIndex, LPCVOID lpComp,
    00329                    DWORD dwCompLen, LPCVOID lpRead, DWORD dwReadLen));
    00330     REGISTER(ImmEnumInputContext,
    00331              BOOL (WINAPI*)(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam));
    00332     REGISTER(ImmSystemHandler,
    00333             LRESULT (WINAPI*)(HIMC, WPARAM, LPARAM));
    00334 }

BOOL WINAPI fakeImm_bd2 | ( | PVOID | dummy1,
|  | PVOID | dummy2
| ) |

Definition at line 85 of file fareast.c.

References BOOL, dummy2(), and TRUE.

    00086 {
    00087     UNREFERENCED_PARAMETER(dummy1);
    00088     UNREFERENCED_PARAMETER(dummy2);
    00089     return TRUE;
    00090 }

DWORD fakeImm_bwuwl | ( | HWND | hwnd,
|  | UINT | msg,
|  | WPARAM | wParam,
|  | LPARAM | lParam
| ) |

Definition at line 54 of file fareast.c.

References DWORD, and msg.

    00055 {
    00056     UNREFERENCED_PARAMETER(hwnd);
    00057     UNREFERENCED_PARAMETER(msg);
    00058     UNREFERENCED_PARAMETER(wParam);
    00059     UNREFERENCED_PARAMETER(lParam);
    00060     return 0;
    00061 }

DWORD fakeImm_d1 | ( | DWORD | dummy | ) |

Definition at line 27 of file fareast.c.

References dummy(), and DWORD.

    00028 {
    00029     UNREFERENCED_PARAMETER(dummy);
    00030     return 0;
    00031 }

DWORD fakeImm_d2 | ( | DWORD | dummy1,
|  | DWORD | dummy2
| ) |

Definition at line 39 of file fareast.c.

References dummy2(), and DWORD.

    00040 {
    00041     UNREFERENCED_PARAMETER(dummy1);
    00042     UNREFERENCED_PARAMETER(dummy2);
    00043     return 0;
    00044 }

DWORD fakeImm_d3 | ( | DWORD | dummy1,
|  | DWORD | dummy2,
|  | DWORD | dummy3
| ) |

Definition at line 46 of file fareast.c.

References dummy2(), and DWORD.

    00047 {
    00048     UNREFERENCED_PARAMETER(dummy1);
    00049     UNREFERENCED_PARAMETER(dummy2);
    00050     UNREFERENCED_PARAMETER(dummy3);
    00051     return 0;
    00052 }

VOID fakeImm_v1 | ( | PVOID | dummy | ) |

Definition at line 22 of file fareast.c.

References dummy(), and VOID().

    00023 {
    00024     UNREFERENCED_PARAMETER(dummy);
    00025 }

VOID fakeImm_v2 | ( | PVOID | dummy1,
|  | PVOID | dummy2
| ) |

Definition at line 33 of file fareast.c.

References dummy2(), and VOID().

    00034 {
    00035     UNREFERENCED_PARAMETER(dummy1);
    00036     UNREFERENCED_PARAMETER(dummy2);
    00037 }

DWORD WINAPI fakeImm_wd1 | ( | PVOID | dummy | ) |

Definition at line 69 of file fareast.c.

References COMMON_RETURN_ZERO, dummy(), and DWORD.

    00070 {
    00071     UNREFERENCED_PARAMETER(dummy);
    00072     COMMON_RETURN_ZERO;
    00073 }

DWORD WINAPI fakeImm_wd2 | ( | PVOID | dummy1,
|  | PVOID | dummy2
| ) |

Definition at line 75 of file fareast.c.

References COMMON_RETURN_ZERO, dummy2(), and DWORD.

Referenced by _InitializeImmEntryTable(), and User32InitializeImmEntryTable().

    00076 {
    00077     UNREFERENCED_PARAMETER(dummy1);
    00078     UNREFERENCED_PARAMETER(dummy2);
    00079     COMMON_RETURN_ZERO;
    00080 }

DWORD WINAPI fakeImm_wd3 | ( | PVOID | dummy1,
|  | PVOID | dummy2,
|  | PVOID | dummy3
| ) |

Definition at line 92 of file fareast.c.

References COMMON_RETURN_ZERO, dummy2(), and DWORD.

    00093 {
    00094     UNREFERENCED_PARAMETER(dummy1);
    00095     UNREFERENCED_PARAMETER(dummy2);
    00096     UNREFERENCED_PARAMETER(dummy3);
    00097
    00098     COMMON_RETURN_ZERO;
    00099 }

DWORD WINAPI fakeImm_wd4 | ( | PVOID | dummy1,
|  | PVOID | dummy2,
|  | PVOID | dummy3,
|  | PVOID | dummy4
| ) |

Definition at line 101 of file fareast.c.

References COMMON_RETURN_ZERO, dummy2(), and DWORD.

    00102 {
    00103     UNREFERENCED_PARAMETER(dummy1);
    00104     UNREFERENCED_PARAMETER(dummy2);
    00105     UNREFERENCED_PARAMETER(dummy3);
    00106     UNREFERENCED_PARAMETER(dummy4);
    00107
    00108     COMMON_RETURN_ZERO;
    00109 }

DWORD WINAPI fakeImm_wd5 | ( | PVOID | dummy1,
|  | PVOID | dummy2,
|  | PVOID | dummy3,
|  | PVOID | dummy4,
|  | PVOID | dummy5
| ) |

Definition at line 111 of file fareast.c.

References COMMON_RETURN_ZERO, dummy2(), and DWORD.

    00112 {
    00113     UNREFERENCED_PARAMETER(dummy1);
    00114     UNREFERENCED_PARAMETER(dummy2);
    00115     UNREFERENCED_PARAMETER(dummy3);
    00116     UNREFERENCED_PARAMETER(dummy4);
    00117     UNREFERENCED_PARAMETER(dummy5);
    00118
    00119     COMMON_RETURN_ZERO;
    00120 }

DWORD WINAPI fakeImm_wd6 | ( | PVOID | dummy1,
|  | PVOID | dummy2,
|  | PVOID | dummy3,
|  | PVOID | dummy4,
|  | PVOID | dummy5,
|  | PVOID | dummy6
| ) |

Definition at line 122 of file fareast.c.

References COMMON_RETURN_ZERO, dummy2(), and DWORD.

    00123 {
    00124     UNREFERENCED_PARAMETER(dummy1);
    00125     UNREFERENCED_PARAMETER(dummy2);
    00126     UNREFERENCED_PARAMETER(dummy3);
    00127     UNREFERENCED_PARAMETER(dummy4);
    00128     UNREFERENCED_PARAMETER(dummy5);
    00129     UNREFERENCED_PARAMETER(dummy6);
    00130
    00131     COMMON_RETURN_ZERO;
    00132 }

VOID WINAPI fakeImm_wv1 | ( | PVOID | dummy | ) |

Definition at line 64 of file fareast.c.

References dummy(), and VOID().

    00065 {
    00066     UNREFERENCED_PARAMETER(dummy);
    00067 }

VOID GetImmFileName | ( | PWSTR | wszImmFile | ) |

Definition at line 213 of file fareast.c.

References IMMMODULENAME, IMMMODULENAMELEN, MAX_PATH, PATHDLM, UINT, and VOID().

Referenced by _InitializeImmEntryTable(), User32InitializeImmEntryTable(), and UserClientDllInitialize().

    00214 {
    00215     UINT i = GetSystemDirectoryW(wszImmFile, MAX_PATH);
    00216     if (i > 0 && i < MAX_PATH - IMMMODULENAMELEN) {
    00217         wszImmFile += i;
    00218         if (wszImmFile[-1] != PATHDLM) {
    00219             *wszImmFile++ = PATHDLM;
    00220         }
    00221     }
    00222     wcscpy(wszImmFile, IMMMODULENAME);
    00223 }

BOOL WINAPI IMPGetIMEA | ( | HWND | hwnd,
|  | LPIMEPROA | lpImeProA
| ) |

Definition at line 408 of file fareast.c.

References BOOL, and gImmApiEntries.

    00409 {
    00410     return gImmApiEntries.ImmIMPGetIMEA(hwnd, lpImeProA);
    00411 }

BOOL WINAPI IMPGetIMEW | ( | HWND | hwnd,
|  | LPIMEPROW | lpImeProW
| ) |

Definition at line 403 of file fareast.c.

References BOOL, and gImmApiEntries.

    00404 {
    00405     return gImmApiEntries.ImmIMPGetIMEW(hwnd, lpImeProW);
    00406 }

BOOL WINAPI IMPQueryIMEA | ( | LPIMEPROA | lpImeProA | ) |

Definition at line 418 of file fareast.c.

References BOOL, and gImmApiEntries.

    00419 {
    00420     return gImmApiEntries.ImmIMPQueryIMEA(lpImeProA);
    00421 }

BOOL WINAPI IMPQueryIMEW | ( | LPIMEPROW | lpImeProW | ) |

Definition at line 413 of file fareast.c.

References BOOL, and gImmApiEntries.

    00414 {
    00415     return gImmApiEntries.ImmIMPQueryIMEW(lpImeProW);
    00416 }

BOOL WINAPI IMPSetIMEA | ( | HWND | hwnd,
|  | LPIMEPROA | lpImeProA
| ) |

Definition at line 428 of file fareast.c.

References BOOL, and gImmApiEntries.

    00429 {
    00430     return gImmApiEntries.ImmIMPSetIMEA(hwnd, lpImeProA);
    00431 }

BOOL WINAPI IMPSetIMEW | ( | HWND | hwnd,
|  | LPIMEPROW | lpImeProW
| ) |

Definition at line 423 of file fareast.c.

References BOOL, and gImmApiEntries.

    00424 {
    00425     return gImmApiEntries.ImmIMPSetIMEW(hwnd, lpImeProW);
    00426 }

VOID InitializeImmEntryTable | ( | VOID |  | ) |

Definition at line 338 of file fareast.c.

References _InitializeImmEntryTable(), bImmInitializing, TRUE, and VOID().

Referenced by UserClientDllInitialize().

    00339 {
    00340     bImmInitializing = TRUE;
    00341     _InitializeImmEntryTable();
    00342 }

LRESULT WINAPI SendIMEMessageExA | ( | HWND | hwnd,
|  | LPARAM | lParam
| ) |

Definition at line 398 of file fareast.c.

References gImmApiEntries.

    00399 {
    00400     return gImmApiEntries.ImmSendIMEMessageExA(hwnd, lParam);
    00401 }

LRESULT WINAPI SendIMEMessageExW | ( | HWND | hwnd,
|  | LPARAM | lParam
| ) |

Definition at line 393 of file fareast.c.

References gImmApiEntries.

    00394 {
    00395     return gImmApiEntries.ImmSendIMEMessageExW(hwnd, lParam);
    00396 }

BOOL User32InitializeImmEntryTable | ( | DWORD | magic | ) |

Definition at line 344 of file fareast.c.

References _InitializeImmEntryTable(), bImmInitializing, BOOL, fakeImm_wd2(), FALSE, fpImmRegisterClient, GetImmFileName(), ghImm32, gImmApiEntries, gSharedInfo, IMM_MAGIC_CALLER_ID, MAX_PATH, NULL, and TRUE.

Referenced by ImmDllInitialize().

    00345 {
    00346     if (magic != IMM_MAGIC_CALLER_ID) {
    00347         RIPMSG1(RIP_WARNING, "User32InitializeImmEntryTable: magic # does not match: 0x%08x", magic);
    00348         return FALSE;
    00349     }
    00350
    00351     if (((PVOID)gImmApiEntries.ImmWINNLSEnableIME) != ((PVOID)fakeImm_wd2)) {
    00352         // already initialized
    00353         return TRUE;
    00354     }
    00355
    00356     _InitializeImmEntryTable();
    00357
    00358     if (ghImm32 == NULL) {
    00359         if (!bImmInitializing) {
    00360             // increment the load counter of IMM32.DLL; application may call FreeLibrary later
    00361             WCHAR wszImmFile[MAX_PATH];
    00362             GetImmFileName(wszImmFile);
    00363             ghImm32 = LoadLibraryW(wszImmFile);
    00364         }
    00365     }
    00366     // for IMM initialization
    00367     return fpImmRegisterClient(&gSharedInfo, ghImm32);
    00368 }

BOOL WINAPI WINNLSEnableIME | ( | HWND | hwnd,
|  | BOOL | bFlag
| ) |

Definition at line 383 of file fareast.c.

References BOOL, and gImmApiEntries.

    00384 {
    00385     return gImmApiEntries.ImmWINNLSEnableIME(hwnd, bFlag);
    00386 }

BOOL WINAPI WINNLSGetEnableStatus | ( | HWND | hwnd | ) |

Definition at line 388 of file fareast.c.

References BOOL, and gImmApiEntries.

    00389 {
    00390     return gImmApiEntries.ImmWINNLSGetEnableStatus(hwnd);
    00391 }

UINT WINAPI WINNLSGetIMEHotkey | ( | HWND | hwndIme | ) |

Definition at line 373 of file fareast.c.

References UINT.

    00374 {
    00375     UNREFERENCED_PARAMETER(hwndIme);
    00376
    00377     //
    00378     // Win95/NT3.51 behavior, i.e. always return 0.
    00379     //
    00380     return 0;
    00381 }

## Variable Documentation

BOOL bImmInitializing = FALSE

| Definition at line 336 of file fareast.c. Referenced by InitializeImmEntryTable(), and User32InitializeImmEntryTable().

HMODULE ghImm32

| Definition at line 207 of file fareast.c. Referenced by _InitializeImmEntryTable(), User32InitializeImmEntryTable(), and UserClientDllInitialize().

ImmApiEntries gImmApiEntries

| Definition at line 135 of file fareast.c. Referenced by _InitializeImmEntryTable(), IMPGetIMEA(), IMPGetIMEW(), IMPQueryIMEA(), IMPQueryIMEW(), IMPSetIMEA(), IMPSetIMEW(), SendIMEMessageExA(), SendIMEMessageExW(), User32InitializeImmEntryTable(), WINNLSEnableIME(), and WINNLSGetEnableStatus().