msftedit: Explicitly load riched20 to make sure the window classes are created.

This commit is contained in:
Alexandre Julliard 2008-05-28 20:55:37 +02:00
parent 057c92db54
commit bddb2e671b
1 changed files with 6 additions and 0 deletions

View File

@ -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;