Author: ion
Date: Fri Jul 22 09:50:33 2011
New Revision: 52778
URL:
http://svn.reactos.org/svn/reactos?rev=52778&view=rev
Log:
[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.
Modified:
trunk/reactos/dll/win32/kernel32/client/file/npipe.c
Modified: trunk/reactos/dll/win32/kernel32/client/file/npipe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/npipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/npipe.c [iso-8859-1] Fri Jul 22 09:50:33
2011
@@ -32,22 +32,16 @@
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);
}