mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
little simplification
svn path=/trunk/; revision=11241
This commit is contained in:
parent
6961ff9728
commit
a30f6d7c94
1 changed files with 6 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: pipe.c,v 1.11 2004/10/08 21:48:46 weiden Exp $
|
/* $Id: pipe.c,v 1.12 2004/10/08 23:12:29 weiden 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
|
||||||
|
@ -37,7 +37,7 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE ReadPipeHandle;
|
HANDLE ReadPipeHandle;
|
||||||
HANDLE WritePipeHandle;
|
HANDLE WritePipeHandle;
|
||||||
ULONG PipeId;
|
ULONG PipeId, Attributes;
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
|
||||||
|
|
||||||
DefaultTimeout.QuadPart = 300000000; /* 30 seconds */
|
DefaultTimeout.QuadPart = 300000000; /* 30 seconds */
|
||||||
|
@ -50,23 +50,19 @@ BOOL STDCALL CreatePipe(PHANDLE hReadPipe,
|
||||||
RtlInitUnicodeString (&PipeName,
|
RtlInitUnicodeString (&PipeName,
|
||||||
Buffer);
|
Buffer);
|
||||||
|
|
||||||
|
Attributes = OBJ_CASE_INSENSITIVE;
|
||||||
if (lpPipeAttributes)
|
if (lpPipeAttributes)
|
||||||
{
|
{
|
||||||
SecurityDescriptor = lpPipeAttributes->lpSecurityDescriptor;
|
SecurityDescriptor = lpPipeAttributes->lpSecurityDescriptor;
|
||||||
|
if(lpPipeAttributes->bInheritHandle)
|
||||||
|
Attributes |= OBJ_INHERIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&PipeName,
|
&PipeName,
|
||||||
OBJ_CASE_INSENSITIVE,
|
Attributes,
|
||||||
NULL,
|
NULL,
|
||||||
SecurityDescriptor);
|
SecurityDescriptor);
|
||||||
if (lpPipeAttributes)
|
|
||||||
{
|
|
||||||
if(lpPipeAttributes->bInheritHandle)
|
|
||||||
ObjectAttributes.Attributes |= OBJ_INHERIT;
|
|
||||||
if (lpPipeAttributes->lpSecurityDescriptor)
|
|
||||||
ObjectAttributes.SecurityDescriptor = lpPipeAttributes->lpSecurityDescriptor;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = NtCreateNamedPipeFile(&ReadPipeHandle,
|
Status = NtCreateNamedPipeFile(&ReadPipeHandle,
|
||||||
FILE_GENERIC_READ,
|
FILE_GENERIC_READ,
|
||||||
|
|
Loading…
Reference in a new issue