msftedit: Explicitly load riched20 to make sure the window classes are created.
This commit is contained in:
parent
057c92db54
commit
bddb2e671b
|
@ -45,14 +45,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(msftedit);
|
|||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
static const WCHAR riched20W[] = {'r','i','c','h','e','d','2','0','.','d','l','l',0};
|
||||
static HMODULE richedit;
|
||||
|
||||
switch(reason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
/* explicitly load riched20 since it creates the window classes at dll attach time */
|
||||
richedit = LoadLibraryW( riched20W );
|
||||
DisableThreadLibraryCalls(inst);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
FreeLibrary( richedit );
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue