CreateFileA returns HFILE_ERROR when the filename contains a wild card.
This commit is contained in:
parent
2862362259
commit
567bcf130f
|
@ -449,6 +449,10 @@ HFILE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
|
||||||
return HFILE_ERROR;
|
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$ */
|
/* Open a console for CONIN$ or CONOUT$ */
|
||||||
if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
|
if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa );
|
||||||
if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
|
if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa );
|
||||||
|
|
Loading…
Reference in New Issue