[Wine-patches] ntoskrnl.exe: Return TRUE for grdkey.sys (eterbug #3781).
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пн Апр 27 15:54:24 MSD 2009
----------- следующая часть -----------
From c16fbbdd7db1cd1c2bfe396423a39bad23c81323 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 27 Apr 2009 14:37:32 +0400
Subject: [PATCH] ntoskrnl.exe: Return TRUE for grdkey.sys (eterbug #3781).
---
dlls/ntoskrnl.exe/ntoskrnl.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index e8e9c68..572338c 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1318,7 +1318,27 @@ void WINAPI IoInvalidateDeviceRelations( PDEVICE_OBJECT DeviceObject,
*/
BOOLEAN WINAPI IoIsWdmVersionAvailable( UCHAR MajorVersion, UCHAR MinorVersion )
{
+#ifdef __i386__
+ static const WCHAR grdkeyW[] = {'g','r','d','k','e','y','.','s','y','s',0};
+
+ int *ptr;
+ HMODULE module;
+ WCHAR path[MAX_PATH], *name, *p;
+#endif
+
TRACE( "%u %u\n", MajorVersion, MinorVersion );
+#ifdef __i386__
+ /* HACK for grdkey.sys */
+ __asm__( "movl %%ebp,%0" : "=r" (ptr) );
+ if (GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
+ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, *(void **)++ptr, &module ) &&
+ GetModuleFileNameW( module, path, sizeof(path) ))
+ {
+ p = path;
+ while ((p = strchrW( p, '\\' ))) name = ++p;
+ if (!strcmpiW( name, grdkeyW )) return TRUE;
+ }
+#endif
return FALSE;
}
--
1.6.1.3.GIT
Подробная информация о списке рассылки Wine-patches