Pass the correct instance when installing the mouse hook (spotted by
Lionel Ulmer).

diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index a0ec24e..93ffb04 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -50,11 +50,14 @@
 static dinput_device * dinput_devices[MAX_WINE_DINPUT_DEVICES];
 static int nrof_dinput_devices = 0;
 
+HINSTANCE DINPUT_instance = NULL;
+
 BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv)
 {
     switch(reason)
     {
       case DLL_PROCESS_ATTACH:
+        DINPUT_instance = inst;
         keyboard_hook = SetWindowsHookExW( WH_KEYBOARD_LL, KeyboardCallback, inst, 0 );
         break;
       case DLL_PROCESS_DETACH:
diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h
index 77f1eaf..f739dc7 100644
--- a/dlls/dinput/dinput_private.h
+++ b/dlls/dinput/dinput_private.h
@@ -46,4 +46,6 @@
 
 LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam );
 
+extern HINSTANCE DINPUT_instance;
+
 #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
diff --git a/dlls/dinput/mouse/main.c b/dlls/dinput/mouse/main.c
index 22a1dff..f8b91ba 100644
--- a/dlls/dinput/mouse/main.c
+++ b/dlls/dinput/mouse/main.c
@@ -527,7 +527,7 @@
     /* Install our mouse hook */
     if (This->dwCoopLevel & DISCL_EXCLUSIVE)
       ShowCursor(FALSE); /* hide cursor */
-    This->hook = SetWindowsHookExW( WH_MOUSE_LL, dinput_mouse_hook, 0, 0 );
+    This->hook = SetWindowsHookExA( WH_MOUSE_LL, dinput_mouse_hook, DINPUT_instance, 0 );
 
     /* Get the window dimension and find the center */
     GetWindowRect(This->win, &rect);