Hi,
I have noticed that when you load up Warcraft III, and then quit the game, that it will pop up with a messagebox error message complaining about a memory location, 0xdeadbeef. I have also noticed this message: err:win32:PE_fixup_imports No implementation for imm32.dll.2(ImmAssociateContextEx) imported from C:\war3\war3.exe, setting to 0xdeadbeef
I looked for ImmAssociateContextEx in imm32, and its not there, not even in the imm32.spec file.
I implemented a stub for ImmAssociateContextEx, and then ran the game. It now comes up with my stub message upon exiting the game: fixme:imm:ImmAssociateContextEx (0x20021, (nil), 16): stub
So apparently war3.exe has a reference to ImmAssociateContextEx, and detects the bad address, and immediately exits with an error. Applying the patch allows the game to exit normally.
I have the patch attached. Any comments?
Jesse
--- wine/dlls/imm32/imm.c 2004-03-02 13:55:57.000000000 -0700 +++ wine-new/dlls/imm32/imm.c 2004-03-02 16:49:23.000000000 -0700 @@ -255,6 +255,15 @@ }
/*********************************************************************** + * ImmAssociateContextEx (IMM32.@) + */ +BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags) +{ + FIXME("(%p, %p, %ld): stub\n", hWnd, hIMC, dwFlags); + return FALSE; +} + +/*********************************************************************** * ImmConfigureIMEA (IMM32.@) */ BOOL WINAPI ImmConfigureIMEA( --- wine/dlls/imm32/imm32.spec 2004-02-02 17:12:03.000000000 -0700 +++ wine-new/dlls/imm32/imm32.spec 2004-03-02 16:21:47.000000000 -0700 @@ -1,4 +1,5 @@ @ stdcall ImmAssociateContext(long long) +@ stdcall ImmAssociateContextEx(long long long) @ stdcall ImmConfigureIMEA(long long long ptr) @ stdcall ImmConfigureIMEW(long long long ptr) @ stdcall ImmCreateContext()
On Tue, 02 Mar 2004 17:38:05 -0700, Jesse Allen wrote:
I have the patch attached. Any comments?
Looks fine. Congrats on your (presumably) first wine patch! In future it's a good idea to send them to wine-patches, but don't worry, Alexandre will get it from the list this time.
thanks -mike