Piotr Caban (@piotr) commented about dlls/imm32/imm.c:
TRACE("implicit COM initialization\n");
- if (!pCoRevokeInitializeSpy)
- {
HMODULE module_ole32 = GetModuleHandleA("ole32");
pCoRevokeInitializeSpy = (void*)GetProcAddress(module_ole32, "CoRevokeInitializeSpy");
pCoUninitialize = (void*)GetProcAddress(module_ole32, "CoUninitialize");
- }
Please use e.g. InitOnceExecuteOnce to initialize the variables. In theory, one thread may set pCoRevokeInitializeSpy, second thread may assume at this point that pCoUninitialize is already set while it's not.