mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 13:11:33 +00:00
[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:
parent
45f4cd3964
commit
278fb2f2b6
1 changed files with 10 additions and 16 deletions
|
@ -32,15 +32,9 @@ CreateNamedPipeA(LPCSTR lpName,
|
|||
DWORD nDefaultTimeOut,
|
||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
||||
{
|
||||
PUNICODE_STRING NameU = &NtCurrentTeb()->StaticUnicodeString;
|
||||
ANSI_STRING NameA;
|
||||
|
||||
/* 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,
|
||||
/* Call the W(ide) function */
|
||||
ConvertWin32AnsiChangeApiToUnicodeApi(CreateNamedPipe,
|
||||
lpName,
|
||||
dwOpenMode,
|
||||
dwPipeMode,
|
||||
nMaxInstances,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue