[KERNEL32]: Fix Bug #3. Make CreateNamedPipeA use our new macro. Fixes the fact it wasn't checking for success when doing the ANSI->Unicode translation, and just assumed things would work.

svn path=/trunk/; revision=52778
This commit is contained in:
Alex Ionescu 2011-07-22 09:50:33 +00:00
parent 45f4cd3964
commit 278fb2f2b6

View file

@ -32,15 +32,9 @@ CreateNamedPipeA(LPCSTR lpName,
DWORD nDefaultTimeOut, DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes) LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{ {
PUNICODE_STRING NameU = &NtCurrentTeb()->StaticUnicodeString; /* Call the W(ide) function */
ANSI_STRING NameA; ConvertWin32AnsiChangeApiToUnicodeApi(CreateNamedPipe,
lpName,
/* Initialize the string as ANSI_STRING and convert to Unicode */
RtlInitAnsiString(&NameA, (LPSTR)lpName);
RtlAnsiStringToUnicodeString(NameU, &NameA, FALSE);
/* Call the Unicode API */
return CreateNamedPipeW(NameU->Buffer,
dwOpenMode, dwOpenMode,
dwPipeMode, dwPipeMode,
nMaxInstances, nMaxInstances,