summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b8fa73d)
svn path=/trunk/; revision=19085
#include <k32.h>
#define NDEBUG
#include <k32.h>
#define NDEBUG
-#define USING_PROPER_NPFS_WAIT_SEMANTICS
+//#define USING_PROPER_NPFS_WAIT_SEMANTICS
#include "../include/debug.h"
/* FUNCTIONS ****************************************************************/
#include "../include/debug.h"
/* FUNCTIONS ****************************************************************/
CallNamedPipeA(LPCSTR lpNamedPipeName,
CallNamedPipeA(LPCSTR lpNamedPipeName,
- LPVOID lpInBuffer,
- DWORD nInBufferSize,
- LPVOID lpOutBuffer,
- DWORD nOutBufferSize,
- LPDWORD lpBytesRead,
- DWORD nTimeOut)
+ LPVOID lpInBuffer,
+ DWORD nInBufferSize,
+ LPVOID lpOutBuffer,
+ DWORD nOutBufferSize,
+ LPDWORD lpBytesRead,
+ DWORD nTimeOut)
- UNICODE_STRING PipeName;
- BOOL Result;
-
- RtlCreateUnicodeStringFromAsciiz(&PipeName,
- (LPSTR)lpNamedPipeName);
-
- Result = CallNamedPipeW(PipeName.Buffer,
- lpInBuffer,
- nInBufferSize,
- lpOutBuffer,
- nOutBufferSize,
- lpBytesRead,
- nTimeOut);
+ UNICODE_STRING PipeName = &NtCurrentTeb()->StaticUnicodeString;
+ ANSI_STRING AnsiPipe;
- RtlFreeUnicodeString(&PipeName);
+ /* Initialize the string as ANSI_STRING and convert to Unicode */
+ RtlInitAnsiString(&NameA, (LPSTR)lpName);
+ RtlAnsiStringToUnicodeString(NameU, &NameA, FALSE);
+ /* Call the Unicode function */
+ return CallNamedPipeW(PipeName->Buffer,
+ lpInBuffer,
+ nInBufferSize,
+ lpOutBuffer,
+ nOutBufferSize,
+ lpBytesRead,
+ nTimeOut);