Fix the signature of Nt/ZwCreateNamedPipe, the 8th to 10th arguments are ULONGs instead of BOOLEANs.

svn path=/trunk/; revision=12303
This commit is contained in:
Eric Kohl 2004-12-23 20:13:38 +00:00
parent 52bbffc39f
commit 09e71d4f7d
3 changed files with 79 additions and 84 deletions

View file

@ -1,5 +1,4 @@
/* $Id: zw.h,v 1.39 2004/12/23 20:12:51 ekohl Exp $
/* $Id: zw.h,v 1.38 2004/12/14 00:41:23 gdalsnes Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -830,9 +829,9 @@ NtCreateNamedPipeFile (OUT PHANDLE NamedPipeFileHandle,
IN ULONG ShareAccess, IN ULONG ShareAccess,
IN ULONG CreateDisposition, IN ULONG CreateDisposition,
IN ULONG CreateOptions, IN ULONG CreateOptions,
IN BOOLEAN WriteModeMessage, IN ULONG NamedPipeType,
IN BOOLEAN ReadModeMessage, IN ULONG ReadMode,
IN BOOLEAN NonBlocking, IN ULONG CompletionMode,
IN ULONG MaxInstances, IN ULONG MaxInstances,
IN ULONG InBufferSize, IN ULONG InBufferSize,
IN ULONG OutBufferSize, IN ULONG OutBufferSize,
@ -846,9 +845,9 @@ ZwCreateNamedPipeFile (OUT PHANDLE NamedPipeFileHandle,
IN ULONG ShareAccess, IN ULONG ShareAccess,
IN ULONG CreateDisposition, IN ULONG CreateDisposition,
IN ULONG CreateOptions, IN ULONG CreateOptions,
IN BOOLEAN WriteModeMessage, IN ULONG NamedPipeType,
IN BOOLEAN ReadModeMessage, IN ULONG ReadMode,
IN BOOLEAN NonBlocking, IN ULONG CompletionMode,
IN ULONG MaxInstances, IN ULONG MaxInstances,
IN ULONG InBufferSize, IN ULONG InBufferSize,
IN ULONG OutBufferSize, IN ULONG OutBufferSize,

View file

@ -1,4 +1,4 @@
/* $Id: npipe.c,v 1.20 2004/10/08 23:24:01 weiden Exp $ /* $Id: npipe.c,v 1.21 2004/12/23 20:13:19 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -73,9 +73,9 @@ CreateNamedPipeW(LPCWSTR lpName,
ACCESS_MASK DesiredAccess; ACCESS_MASK DesiredAccess;
ULONG CreateOptions; ULONG CreateOptions;
ULONG CreateDisposition; ULONG CreateDisposition;
BOOLEAN WriteModeMessage; ULONG WriteModeMessage;
BOOLEAN ReadModeMessage; ULONG ReadModeMessage;
BOOLEAN NonBlocking; ULONG NonBlocking;
IO_STATUS_BLOCK Iosb; IO_STATUS_BLOCK Iosb;
ULONG ShareAccess, Attributes; ULONG ShareAccess, Attributes;
LARGE_INTEGER DefaultTimeOut; LARGE_INTEGER DefaultTimeOut;
@ -109,11 +109,8 @@ CreateNamedPipeW(LPCWSTR lpName,
SecurityDescriptor); SecurityDescriptor);
DesiredAccess = 0; DesiredAccess = 0;
ShareAccess = 0; ShareAccess = 0;
CreateDisposition = FILE_OPEN_IF; CreateDisposition = FILE_OPEN_IF;
CreateOptions = 0; CreateOptions = 0;
if (dwOpenMode & FILE_FLAG_WRITE_THROUGH) if (dwOpenMode & FILE_FLAG_WRITE_THROUGH)
{ {
@ -138,41 +135,41 @@ CreateNamedPipeW(LPCWSTR lpName,
if (dwPipeMode & PIPE_TYPE_BYTE) if (dwPipeMode & PIPE_TYPE_BYTE)
{ {
WriteModeMessage = FALSE; WriteModeMessage = FILE_PIPE_BYTE_STREAM_MODE;
} }
else if (dwPipeMode & PIPE_TYPE_MESSAGE) else if (dwPipeMode & PIPE_TYPE_MESSAGE)
{ {
WriteModeMessage = TRUE; WriteModeMessage = FILE_PIPE_MESSAGE_MODE;
} }
else else
{ {
WriteModeMessage = FALSE; WriteModeMessage = FILE_PIPE_BYTE_STREAM_MODE;
} }
if (dwPipeMode & PIPE_READMODE_BYTE) if (dwPipeMode & PIPE_READMODE_BYTE)
{ {
ReadModeMessage = FALSE; ReadModeMessage = FILE_PIPE_BYTE_STREAM_MODE;
} }
else if (dwPipeMode & PIPE_READMODE_MESSAGE) else if (dwPipeMode & PIPE_READMODE_MESSAGE)
{ {
ReadModeMessage = TRUE; ReadModeMessage = FILE_PIPE_MESSAGE_MODE;
} }
else else
{ {
ReadModeMessage = FALSE; ReadModeMessage = FILE_PIPE_BYTE_STREAM_MODE;
} }
if (dwPipeMode & PIPE_WAIT) if (dwPipeMode & PIPE_WAIT)
{ {
NonBlocking = FALSE; NonBlocking = FILE_PIPE_QUEUE_OPERATION;
} }
else if (dwPipeMode & PIPE_NOWAIT) else if (dwPipeMode & PIPE_NOWAIT)
{ {
NonBlocking = TRUE; NonBlocking = FILE_PIPE_COMPLETE_OPERATION;
} }
else else
{ {
NonBlocking = FALSE; NonBlocking = FILE_PIPE_QUEUE_OPERATION;
} }
if (nMaxInstances >= PIPE_UNLIMITED_INSTANCES) if (nMaxInstances >= PIPE_UNLIMITED_INSTANCES)
@ -203,10 +200,10 @@ CreateNamedPipeW(LPCWSTR lpName,
{ {
DPRINT("NtCreateNamedPipe failed (Status %x)!\n", Status); DPRINT("NtCreateNamedPipe failed (Status %x)!\n", Status);
SetLastErrorByStatus (Status); SetLastErrorByStatus (Status);
return(INVALID_HANDLE_VALUE); return INVALID_HANDLE_VALUE;
} }
return(PipeHandle); return PipeHandle;
} }
@ -251,7 +248,6 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName,
&NamedPipeName, &NamedPipeName,
NULL, NULL,
NULL); NULL);
if (!r) if (!r)
{ {
return(FALSE); return(FALSE);
@ -611,7 +607,7 @@ GetNamedPipeHandleStateW(HANDLE hNamedPipe,
IO_STATUS_BLOCK StatusBlock; IO_STATUS_BLOCK StatusBlock;
NTSTATUS Status; NTSTATUS Status;
if(lpState != NULL) if (lpState != NULL)
{ {
FILE_PIPE_INFORMATION PipeInfo; FILE_PIPE_INFORMATION PipeInfo;
@ -620,7 +616,7 @@ GetNamedPipeHandleStateW(HANDLE hNamedPipe,
&PipeInfo, &PipeInfo,
sizeof(FILE_PIPE_INFORMATION), sizeof(FILE_PIPE_INFORMATION),
FilePipeInformation); FilePipeInformation);
if(!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
SetLastErrorByStatus(Status); SetLastErrorByStatus(Status);
return FALSE; return FALSE;

View file

@ -24,9 +24,9 @@ NtCreateNamedPipeFile(PHANDLE FileHandle,
ULONG ShareAccess, ULONG ShareAccess,
ULONG CreateDisposition, ULONG CreateDisposition,
ULONG CreateOptions, ULONG CreateOptions,
BOOLEAN NamedPipeType, ULONG NamedPipeType,
BOOLEAN ReadMode, ULONG ReadMode,
BOOLEAN CompletionMode, ULONG CompletionMode,
ULONG MaximumInstances, ULONG MaximumInstances,
ULONG InboundQuota, ULONG InboundQuota,
ULONG OutboundQuota, ULONG OutboundQuota,