mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
revert changes from CreateFileA
svn path=/trunk/; revision=14236
This commit is contained in:
parent
b718e3cc4e
commit
86a52339fb
1 changed files with 4 additions and 19 deletions
|
@ -34,26 +34,15 @@ HANDLE STDCALL CreateFileA (LPCSTR lpFileName,
|
||||||
DWORD dwFlagsAndAttributes,
|
DWORD dwFlagsAndAttributes,
|
||||||
HANDLE hTemplateFile)
|
HANDLE hTemplateFile)
|
||||||
{
|
{
|
||||||
UNICODE_STRING FileNameU;
|
PWCHAR FileNameW;
|
||||||
ANSI_STRING FileName;
|
|
||||||
HANDLE FileHandle;
|
HANDLE FileHandle;
|
||||||
|
|
||||||
DPRINT("CreateFileA(lpFileName %s)\n",lpFileName);
|
DPRINT("CreateFileA(lpFileName %s)\n",lpFileName);
|
||||||
|
|
||||||
RtlInitAnsiString (&FileName,
|
if (!(FileNameW = FilenameA2W(lpFileName, FALSE)))
|
||||||
(LPSTR)lpFileName);
|
return INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
/* convert ansi (or oem) string to unicode */
|
|
||||||
if (bIsFileApiAnsi)
|
|
||||||
RtlAnsiStringToUnicodeString (&FileNameU,
|
|
||||||
&FileName,
|
|
||||||
TRUE);
|
|
||||||
else
|
|
||||||
RtlOemStringToUnicodeString (&FileNameU,
|
|
||||||
&FileName,
|
|
||||||
TRUE);
|
|
||||||
|
|
||||||
FileHandle = CreateFileW (FileNameU.Buffer,
|
FileHandle = CreateFileW (FileNameW,
|
||||||
dwDesiredAccess,
|
dwDesiredAccess,
|
||||||
dwShareMode,
|
dwShareMode,
|
||||||
lpSecurityAttributes,
|
lpSecurityAttributes,
|
||||||
|
@ -61,10 +50,6 @@ HANDLE STDCALL CreateFileA (LPCSTR lpFileName,
|
||||||
dwFlagsAndAttributes,
|
dwFlagsAndAttributes,
|
||||||
hTemplateFile);
|
hTemplateFile);
|
||||||
|
|
||||||
RtlFreeHeap (RtlGetProcessHeap (),
|
|
||||||
0,
|
|
||||||
FileNameU.Buffer);
|
|
||||||
|
|
||||||
return FileHandle;
|
return FileHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue