mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 20:21:22 +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,22 +32,16 @@ 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 */
|
dwOpenMode,
|
||||||
RtlInitAnsiString(&NameA, (LPSTR)lpName);
|
dwPipeMode,
|
||||||
RtlAnsiStringToUnicodeString(NameU, &NameA, FALSE);
|
nMaxInstances,
|
||||||
|
nOutBufferSize,
|
||||||
/* Call the Unicode API */
|
nInBufferSize,
|
||||||
return CreateNamedPipeW(NameU->Buffer,
|
nDefaultTimeOut,
|
||||||
dwOpenMode,
|
lpSecurityAttributes);
|
||||||
dwPipeMode,
|
|
||||||
nMaxInstances,
|
|
||||||
nOutBufferSize,
|
|
||||||
nInBufferSize,
|
|
||||||
nDefaultTimeOut,
|
|
||||||
lpSecurityAttributes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue