[Wine-patches] [eter-1.0.10 1/5] usbhub.sys: Add hack for loading nkey.sys (eterbug #3834).

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пт Июн 5 13:02:57 MSD 2009


---
 dlls/usbhub.sys/usbhub.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dlls/usbhub.sys/usbhub.c b/dlls/usbhub.sys/usbhub.c
index a6f80b1..66942e0 100644
--- a/dlls/usbhub.sys/usbhub.c
+++ b/dlls/usbhub.sys/usbhub.c
@@ -496,6 +496,7 @@ fail:
 static DWORD CALLBACK enum_usb_devices( void *usbhubdrv )
 {
     static const WCHAR grdkeyW[] = {'G','r','d','K','e','y',0};
+    static const WCHAR nkeyW[] = {'N','K','e','y',0};
     static const WCHAR usbhub_started_eventW[] = {'_','_','w','i','n','e',
                                                   '_','U','s','b','h','u','b',
                                                   'S','t','a','r','t','e','d',0};
@@ -539,6 +540,18 @@ static DWORD CALLBACK enum_usb_devices( void *usbhubdrv )
                         if (pdo->AttachedDevice)
                             __wine_start_device( pdo->AttachedDevice );
                     }
+                    /* HACK for nkey.sys */
+                    if (instance->vid == 0x14a8 && start_service( nkeyW ))
+                    {
+                        status = IoCreateDevice( hubdrv, 0, NULL, 0, 0, FALSE, &pdo );
+                        if (status != STATUS_SUCCESS) break;
+                        while (!(driver = __wine_get_driver_object( nkeyW )))
+                            Sleep( 100 );
+                        status = __wine_add_device( driver, pdo );
+                        if (status != STATUS_SUCCESS) break;
+                        if (pdo->AttachedDevice)
+                            __wine_start_device( pdo->AttachedDevice );
+                    }
                     if (start_service( instance->service ))
                     {
                         pdo = create_pdo( instance, hubdrv );
-- 
1.6.3.1



Подробная информация о списке рассылки Wine-patches