CreateFileA returns HFILE_ERROR when the filename contains a wild card.

This commit is contained in:
Francois Boisvert 1999-09-20 18:31:21 +00:00 committed by Alexandre Julliard
parent 2862362259
commit 567bcf130f
1 changed files with 4 additions and 0 deletions

View File

@ -449,6 +449,10 @@ HFILE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
return HFILE_ERROR;
}
/* If the name contains a DOS wild card (* or ?), do no create a file */
if(strchr(filename,'*') || strchr(filename,'?'))
return HFILE_ERROR;
/* Open a console for CONIN$ or CONOUT$ */
if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );