[Wine-patches] [eterhack 6/8] Add hack for loading grdkey.sys (eterbug #3649).
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Мар 25 16:28:57 MSK 2009
---
dlls/usbhub.sys/usbhub.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/usbhub.sys/usbhub.c b/dlls/usbhub.sys/usbhub.c
index 1d9f52a..8194b85 100644
--- a/dlls/usbhub.sys/usbhub.c
+++ b/dlls/usbhub.sys/usbhub.c
@@ -336,7 +336,7 @@ static NTSTATUS WINAPI usbhub_dispatch_pnp( DEVICE_OBJECT *device, IRP *irp )
return STATUS_SUCCESS;
}
-static BOOL start_service( WCHAR *name )
+static BOOL start_service( const WCHAR *name )
{
SC_HANDLE scm, service;
BOOL ret;
@@ -487,6 +487,8 @@ fail:
static DWORD CALLBACK enum_usb_devices( void *usbhubdrv )
{
+ static const WCHAR grdkeyW[] = {'G','r','d','K','e','y',0};
+
struct DeviceInstance *instance;
struct usb_device *dev;
struct usb_bus *bus;
@@ -513,6 +515,17 @@ static DWORD CALLBACK enum_usb_devices( void *usbhubdrv )
dev->descriptor.idVendor == instance->vid &&
dev->descriptor.idProduct == instance->pid)
{
+ /* HACK for grdkey.sys */
+ if (instance->vid == 0xa89 && start_service( grdkeyW ))
+ {
+ status = IoCreateDevice( hubdrv, 0, NULL, 0, 0, FALSE, &pdo );
+ if (status != STATUS_SUCCESS) break;
+ while (!(driver = __wine_get_driver_object( grdkeyW )))
+ Sleep( 100 );
+ status = __wine_add_device( driver, pdo );
+ if (status != STATUS_SUCCESS) break;
+ __wine_start_device( driver );
+ }
if (start_service( instance->service ))
{
pdo = create_pdo( instance, hubdrv );
--
1.6.1.3.GIT
Подробная информация о списке рассылки Wine-patches