imm32.dll: CtfImmIsGuidMapEnable could not be located in the dynamic link library

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Post Reply
jollywolly
Newbie
Newbie
Posts: 3
Joined: Thu Jan 25, 2024 2:56 pm

imm32.dll: CtfImmIsGuidMapEnable could not be located in the dynamic link library

Post by jollywolly »

In winehq-stable version 9, I am trying to run an executable. But in a MessageBox it displays 'The procedure entry point CtfImmIsGuidMapEnable could not be located in the dynamic link library imm32.dll' and shutting down.

GPT told me:
In the Wine configuration window, go to the "Libraries" tab.
In the "New override for library" dropdown, select imm32 and click "Add." Then, select builtin from the list and click "Apply."

But it did not fix the issue.

What to do?
jollywolly
Newbie
Newbie
Posts: 3
Joined: Thu Jan 25, 2024 2:56 pm

Re: imm32.dll: CtfImmIsGuidMapEnable could not be located in the dynamic link library

Post by jollywolly »

Should I try to resolve this by creating a function stub and compiling imm32.dll.so file?
I think this should be the way, unless someone already maintains a custom lib with some of the missing stubs.

Can anyone provide me a link as a guide for custom compilation wine libs?
I am just getting my feet wet in wine.

Cheers.
jollywolly
Newbie
Newbie
Posts: 3
Joined: Thu Jan 25, 2024 2:56 pm

Re: imm32.dll: CtfImmIsGuidMapEnable could not be located in the dynamic link library

Post by jollywolly »

I was trying to diagnose the issue.
And I was thinking of adding some empty stubs.

`CtfImmIsGuidMapEnable` is probably not something important, but it locks my application from executing.

The idea was:

To create a stub DLL with the CtfImmIsGuidMapEnable function, say `ctfimm.dll`, and `regsvr32 CtfImmIsGuidMapEnable.dll` it, and add it in winecfg overrides, so that the application sees the CtfImmIsGuidMapEnable stub function.

But, I noticed something weird.

Here's what I did.

Here is the content of ctfimm.c:
$ cat ctfimm.c

Code: Select all

#include <windows.h>

BOOL CtfImmIsGuidMapEnable()
{
    return FALSE;
}

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved)
{
    return TRUE;
}

/*
  If I don't supply the below, both WINEARCH=win32 and WINEARCH=win64
  regsvr32 complains 'DllRegisterServer' not implemented in DLL
  'ctfimm.dll'
*/
STDAPI DllRegisterServer(void)
{
    return S_OK;
}

STDAPI DllUnregisterServer(void)
{
    return S_OK;
}
Now, When I (for 64bit):
$ x86_64-w64-mingw32-gcc -shared -mwindows -o ctfimm.dll ctfimm.c
$ WINEARCH=win64 wine regsvr32 ctfimm.dll

regsvr32 registers dll. No problem.

However, when I (for 32bit):
$ i686-w64-mingw32-gcc -shared -mwindows -o ctfimm.dll ctfimm.c
$ WINEARCH=win32 wine regsvr32 ctfimm.dll

regsvr32 complains 'DllRegisterServer' not implemented in DLL 'ctfimm.dll'

Tried many things, like
  • i686-w64-mingw32-gcc -shared -mwindows -o ctfimm.dll ctfimm.c -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -limm32
  • Tried adding the following line to the top of your ctfimm.c file:

    Code: Select all

    #define WIN32_LEAN_AND_MEAN
    This macro is used to reduce the size of the Windows headers. It may help to fix the problem.
But no matter what I do for win32 arch, it always complains, regsvr32 complains 'DllRegisterServer' not implemented in DLL 'ctfimm.dll' and for win64 it worked like a charm, after I also supplied the DllRegisterServer stubs.

Needless to say, I'm lost.
Has anyone faced this win32 and win64 fiasco?
Is it the mingw compiler, maybe?

--

System:
debian bookworm or debian testing
wine-devel latest >=9.*
Post Reply