Move vxd check from vxd.c to file.c

Vitaliy Margolen wine-patch at kievinfo.com
Sun Dec 4 10:56:58 CST 2005


This should allow opening Nt devices where they should be opened - from
NtCreateFile.

ChangeLog:
Move vxd check from vxd.c to file.c

 dlls/kernel/file.c |    8 ++++++--
 dlls/kernel/vxd.c  |    6 ------
 2 files changed, 6 insertions(+), 8 deletions(-)
-------------- next part --------------
0542f30c8675d7d737b844b35fdbfe7fdfc5016d
diff --git a/dlls/kernel/file.c b/dlls/kernel/file.c
index 5f8d128..b8225fc 100644
--- a/dlls/kernel/file.c
+++ b/dlls/kernel/file.c
@@ -1298,8 +1298,12 @@ HANDLE WINAPI CreateFileW( LPCWSTR filen
         }
         else if (filename[4])
         {
-            ret = VXD_Open( filename+4, access, sa );
-            goto done;
+            if(GetVersion() & 0x80000000)  /* there are no VxDs on NT */
+            {
+                ret = VXD_Open( filename+4, access, sa );
+                goto done;
+            }
+            /* NT devices are handled by NtCreateFile */
         }
         else
         {
diff --git a/dlls/kernel/vxd.c b/dlls/kernel/vxd.c
index 5d16684..564f101 100644
--- a/dlls/kernel/vxd.c
+++ b/dlls/kernel/vxd.c
@@ -183,12 +183,6 @@ HANDLE VXD_Open( LPCWSTR filenameW, DWOR
     HMODULE module;
     WCHAR *p, name[16];
 
-    if (!(GetVersion() & 0x80000000))  /* there are no VxDs on NT */
-    {
-        SetLastError( ERROR_FILE_NOT_FOUND );
-        return 0;
-    }
-
     /* normalize the filename */
 
     if (strlenW( filenameW ) >= sizeof(name)/sizeof(WCHAR) - 4 ||


More information about the wine-patches mailing list