diff --git a/dlls/winedos/Makefile.in b/dlls/winedos/Makefile.in index 56eb36dce06..d1a053496ed 100644 --- a/dlls/winedos/Makefile.in +++ b/dlls/winedos/Makefile.in @@ -8,6 +8,7 @@ IMPORTS = user32 kernel32 ntdll C_SRCS = \ dosvm.c \ + int09.c \ module.c @MAKE_DLL_RULES@ diff --git a/dlls/winedos/dosvm.c b/dlls/winedos/dosvm.c index ad2c3d5145e..6d23f36db46 100644 --- a/dlls/winedos/dosvm.c +++ b/dlls/winedos/dosvm.c @@ -693,3 +693,18 @@ void WINAPI DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data } #endif + +BOOL WINAPI DOSVM_Init( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) +{ + TRACE_(module)("(0x%08x,%ld,%p)\n", hinstDLL, fdwReason, lpvReserved); + + if (fdwReason == DLL_PROCESS_ATTACH) { + INT_SetWineHandler(9, INT_Int09Handler); + } + else if (fdwReason == DLL_PROCESS_DETACH) + { + INT_SetWineHandler(9, NULL); + } + + return TRUE; +} diff --git a/msdos/int09.c b/dlls/winedos/int09.c similarity index 91% rename from msdos/int09.c rename to dlls/winedos/int09.c index 513048abc0d..ba12c3278f1 100644 --- a/msdos/int09.c +++ b/dlls/winedos/int09.c @@ -42,13 +42,10 @@ void WINAPI INT_Int09Handler( CONTEXT86 *context ) ch[0] = ascii; cnt = 1; } else { -#if 0 /* FIXME: cannot call USER functions here */ UINT vkey = MapVirtualKeyA(scan&0x7f, 1); - /* as in TranslateMessage, windows/input.c */ - cnt = ToAscii(vkey, scan, QueueKeyStateTable, (LPWORD)ch, 0); -#else - cnt = 0; -#endif + BYTE keystate[256]; + GetKeyboardState(keystate); + cnt = ToAscii(vkey, scan, keystate, (LPWORD)ch, 0); } if (cnt>0) { for (c2=0; c2