Kernel: Move handling of NT devices to NtCreateFile

Vitaliy Margolen wine-patch at kievinfo.com
Fri Aug 26 11:48:09 CDT 2005


Move some stuff around for upcoming ntoskrnl.exe

changelog:
  dlls/kernel/file.c
  dlls/kernel/vxd.c
    Move handling of NT devices to NtCreateFile
    (c)Ivan Leo Puoti
-------------- next part --------------
Index: dlls/kernel/file.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/file.c,v
retrieving revision 1.40
diff -u -p -r1.40 file.c
--- dlls/kernel/file.c	11 Jul 2005 14:23:46 -0000	1.40
+++ dlls/kernel/file.c	26 Aug 2005 16:42:43 -0000
@@ -1240,8 +1240,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
         {
Index: dlls/kernel/vxd.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/vxd.c,v
retrieving revision 1.20
diff -u -p -r1.20 vxd.c
--- dlls/kernel/vxd.c	22 Aug 2005 14:08:39 -0000	1.20
+++ dlls/kernel/vxd.c	26 Aug 2005 16:42:52 -0000
@@ -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