#ifndef _NTIOAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateNamedPipeFile(
_Out_ PHANDLE FileHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_ ULONG ShareAccess,
_In_ ULONG CreateDisposition,
_In_ ULONG CreateOptions,
_In_ ULONG NamedPipeType,
_In_ ULONG ReadMode,
_In_ ULONG CompletionMode,
_In_ ULONG MaximumInstances,
_In_ ULONG InboundQuota,
_In_ ULONG OutboundQuota,
_In_ PLARGE_INTEGER DefaultTimeout
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateNamedPipeFile(
_Out_ PHANDLE FileHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_ ULONG ShareAccess,
_In_ ULONG CreateDisposition,
_In_ ULONG CreateOptions,
_In_ ULONG NamedPipeType,
_In_ ULONG ReadMode,
_In_ ULONG CompletionMode,
_In_ ULONG MaximumInstances,
_In_ ULONG InboundQuota,
_In_ ULONG OutboundQuota,
_In_ PLARGE_INTEGER DefaultTimeout
);
View code on GitHub
This function is documented in Windows SDK.
Function NtCreateNamedPipeFile
creates Named Pipe File Object. Named Pipes are especial kind of files, so all functionality is provided with file's functions like NtReadFile
, NtWriteFile
etc.
Named Pipes are frequently used in NT system, for example as stdin and stdout handles.
Result of call - pointer to HANDLE
to Named Pipe.
Access rights for object's handle. Can be one or combination of:
FILE_READ_DATA
FILE_WRITE_DATA
FILE_CREATE_PIPE_INSTANCE
FILE_READ_ATTRIBUTES
FILE_WRITE_ATTRIBUTES
SYNCHRONIZE
READ_CONTROL
WRITE_OWNER
WRITE_DAC
ACCESS_SYSTEM_SECURITY
Also combination of Generic rights are supported.Pointer to OBJECT_ATTRIBUTES
structure contains name of named pipe. Name must begin with "\??\PIPE\" string, that is Symbolic Link to NamedPipe device object.
IO result of call.
Can be combination of following:
Use FILE_CREATE
, FILE_OPEN
or FILE_OPEN_IF
.
See description of NtCreateFile
for possible creation flags.
If set, writing to created pipe are processed in Message Mode. If not, all writes are in Byte Mode.
The same functionality as WriteModeMessage
parameter, but for reading data.
If set, all operations on created pipe are asynchronous.
Maximum number of open handles for Named Pipe, or FILE_PIPE_UNLIMITED_INSTANCES
constant.
Input buffer size, in bytes.
Output buffer size, in bytes.
Pointer to LARGE_INTEGER
value specifying pipe's time out, in 100-ns units. Negative value means relative time.