mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 19:51:21 +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,
|
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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue