mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
- Optimize CallNamedPipeA too and remove accidental define.
svn path=/trunk/; revision=19085
This commit is contained in:
parent
b8fa73dc20
commit
4cafc71bd8
1 changed files with 22 additions and 24 deletions
|
@ -12,7 +12,7 @@
|
||||||
#include <k32.h>
|
#include <k32.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#define USING_PROPER_NPFS_WAIT_SEMANTICS
|
//#define USING_PROPER_NPFS_WAIT_SEMANTICS
|
||||||
#include "../include/debug.h"
|
#include "../include/debug.h"
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
@ -664,7 +664,8 @@ SetNamedPipeHandleState(HANDLE hNamedPipe,
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL
|
||||||
|
WINAPI
|
||||||
CallNamedPipeA(LPCSTR lpNamedPipeName,
|
CallNamedPipeA(LPCSTR lpNamedPipeName,
|
||||||
LPVOID lpInBuffer,
|
LPVOID lpInBuffer,
|
||||||
DWORD nInBufferSize,
|
DWORD nInBufferSize,
|
||||||
|
@ -673,26 +674,23 @@ CallNamedPipeA(LPCSTR lpNamedPipeName,
|
||||||
LPDWORD lpBytesRead,
|
LPDWORD lpBytesRead,
|
||||||
DWORD nTimeOut)
|
DWORD nTimeOut)
|
||||||
{
|
{
|
||||||
UNICODE_STRING PipeName;
|
UNICODE_STRING PipeName = &NtCurrentTeb()->StaticUnicodeString;
|
||||||
BOOL Result;
|
ANSI_STRING AnsiPipe;
|
||||||
|
|
||||||
RtlCreateUnicodeStringFromAsciiz(&PipeName,
|
/* Initialize the string as ANSI_STRING and convert to Unicode */
|
||||||
(LPSTR)lpNamedPipeName);
|
RtlInitAnsiString(&NameA, (LPSTR)lpName);
|
||||||
|
RtlAnsiStringToUnicodeString(NameU, &NameA, FALSE);
|
||||||
|
|
||||||
Result = CallNamedPipeW(PipeName.Buffer,
|
/* Call the Unicode function */
|
||||||
|
return CallNamedPipeW(PipeName->Buffer,
|
||||||
lpInBuffer,
|
lpInBuffer,
|
||||||
nInBufferSize,
|
nInBufferSize,
|
||||||
lpOutBuffer,
|
lpOutBuffer,
|
||||||
nOutBufferSize,
|
nOutBufferSize,
|
||||||
lpBytesRead,
|
lpBytesRead,
|
||||||
nTimeOut);
|
nTimeOut);
|
||||||
|
|
||||||
RtlFreeUnicodeString(&PipeName);
|
|
||||||
|
|
||||||
return(Result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue