CreateFile failing without setting Last Error

Shachar Shemesh wine-patches at sun.consumer.org.il
Thu Jan 9 00:17:40 CST 2003


When passing a path in the form of "\??\c:\....", CreateFile fails 
because the path contains invalid characters. On windows error 161 is 
set, but on Wine not.

At least, until this patch is included.

Changelog
Shachar Shemesh <winecode at sun.consumer.org.il>

file/file.c

    * Call "SetLastError" if the path contains wildcard characters.


-------------- next part --------------
Index: files/file.c
===================================================================
RCS file: /home/sun/sources/cvs/wine/files/file.c,v
retrieving revision 1.175
diff -u -r1.175 file.c
--- files/file.c	7 Jan 2003 20:36:22 -0000	1.175
+++ files/file.c	9 Jan 2003 06:13:46 -0000
@@ -623,7 +623,10 @@
 
     /* If the name contains a DOS wild card (* or ?), do no create a file */
     if(strchrW(filename, '*') || strchrW(filename, '?'))
+    {
+        SetLastError(ERROR_BAD_PATHNAME);
         return INVALID_HANDLE_VALUE;
+    }
 
     /* Open a console for CONIN$ or CONOUT$ */
     if (!strcmpiW(filename, coninW))


More information about the wine-patches mailing list