mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +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:
@@ -32,22 +32,16 @@ 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,
|
||||
dwOpenMode,
|
||||
dwPipeMode,
|
||||
nMaxInstances,
|
||||
nOutBufferSize,
|
||||
nInBufferSize,
|
||||
nDefaultTimeOut,
|
||||
lpSecurityAttributes);
|
||||
/* Call the W(ide) function */
|
||||
ConvertWin32AnsiChangeApiToUnicodeApi(CreateNamedPipe,
|
||||
lpName,
|
||||
dwOpenMode,
|
||||
dwPipeMode,
|
||||
nMaxInstances,
|
||||
nOutBufferSize,
|
||||
nInBufferSize,
|
||||
nDefaultTimeOut,
|
||||
lpSecurityAttributes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user