Difference between revisions of "User:Alvinhochun/Localization/IME/IMM"
< User:Alvinhochun | Localization | IME
Alvinhochun (talk | contribs) (→Loading of imm32.dll) |
Alvinhochun (talk | contribs) (→Loading of imm32.dll) |
||
Line 2: | Line 2: | ||
== Loading of <code>imm32.dll</code> == | == Loading of <code>imm32.dll</code> == | ||
− | IMM32 is loaded by <code>user32.dll</code> from <code> | + | IMM32 is loaded by <code>user32.dll</code> from <code>_InitializeImmEntryTable</code>. It loads the library (if not already) and fill in a structure of function pointers <code>gImmApiEntries</code>. This function is supposed to be called in the DllMain of USER32 but the relevant code is currently commented out. |
In ReactOS, the related functions are located under <code>win32ss\user\user32\misc\imm.c</code>. The functions it loads is different from that of Windows XP. | In ReactOS, the related functions are located under <code>win32ss\user\user32\misc\imm.c</code>. The functions it loads is different from that of Windows XP. | ||
+ | |||
+ | A simple trace (hopefully I got it correct): | ||
+ | |||
+ | * user32!DllMain | ||
+ | ** user32!_InitializeImmEntryTable | ||
+ | *** GetModuleHandle (and fail) | ||
+ | *** LoadLibrary(imm32.dll) | ||
+ | **** imm32!DllMain | ||
+ | ***** imm32!ImmInitializeGlobals | ||
+ | ***** user32!User32InitializeImmEntryTable | ||
+ | ****** user32!_InitializeImmEntryTable | ||
+ | ******* GetProcAddress and fill in the function table | ||
+ | ****** imm32!ImmRegisterClient | ||
+ | ******* imm32!ImmInitializeGlobals | ||
+ | ** imm32!ImmRegisterClient | ||
+ | *** imm32!ImmInitializeGlobals | ||
''TODO: Log all calls to Imm* functions with stack traces.'' | ''TODO: Log all calls to Imm* functions with stack traces.'' |
Revision as of 13:36, 10 May 2015
Operations of IMM under XP.
Loading of imm32.dll
IMM32 is loaded by user32.dll
from _InitializeImmEntryTable
. It loads the library (if not already) and fill in a structure of function pointers gImmApiEntries
. This function is supposed to be called in the DllMain of USER32 but the relevant code is currently commented out.
In ReactOS, the related functions are located under win32ss\user\user32\misc\imm.c
. The functions it loads is different from that of Windows XP.
A simple trace (hopefully I got it correct):
- user32!DllMain
- user32!_InitializeImmEntryTable
- GetModuleHandle (and fail)
- LoadLibrary(imm32.dll)
- imm32!DllMain
- imm32!ImmInitializeGlobals
- user32!User32InitializeImmEntryTable
- user32!_InitializeImmEntryTable
- GetProcAddress and fill in the function table
- imm32!ImmRegisterClient
- imm32!ImmInitializeGlobals
- user32!_InitializeImmEntryTable
- imm32!DllMain
- imm32!ImmRegisterClient
- imm32!ImmInitializeGlobals
- user32!_InitializeImmEntryTable
TODO: Log all calls to Imm* functions with stack traces.