Undocumented functions of NTDLL

2OO1, 1 March



NtCreateNamedPipeFile
NtCreateNamedPipeFile

NTSYSAPI 
NTSTATUS
NTAPI

NtCreateNamedPipeFile(

OUT PHANDLE NamedPipeFileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN BOOLEAN WriteModeMessage, IN BOOLEAN ReadModeMessage, IN BOOLEAN NonBlocking, IN ULONG MaxInstances, IN ULONG InBufferSize, IN ULONG OutBufferSize, IN PLARGE_INTEGER DefaultTimeOut );




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.



  • NamedPipeFileHandle
  •     Result of call - pointer to HANDLE to Named Pipe.
  • DesiredAccess
  •     Access rights for object's handle. Can be one or combination of: Also combination of Generic rights are supported.
  • ObjectAttributes
  •     Pointer to OBJECT_ATTRIBUTES structure contains name of named pipe. Name must begin with "/??/PIPE/" string, that is Symbolic Link to NamedPipe device object.
  • IoStatusBlock
  •     IO result of call.
  • ShareAccess
  •     Can be combination of following:
  • CreateDisposition
  •     Use FILE_CREATE, FILE_OPEN or FILE_OPEN_IF.
  • CreateOptions
  •     See description of NtCreateFile for possible creation flags.
  • WriteModeMessage
  •     If set, writing to created pipe are processed in Message Mode. If not, all writes are in Byte Mode.
  • ReadModeMessage
  •     The same functionality as WriteModeMessage parameter, but for reading data.
  • NonBlocking
  •     If set, all operations on created pipe are asynchronous.
  • MaxInstances
  •     Maximum number of open handles for Named Pipe, or FILE_PIPE_UNLIMITED_INSTANCES constant.
  • InBufferSize
  •     Input buffer size, in bytes.
  • OutBufferSize
  •     Output buffer size, in bytes.
  • DefaultTimeOut
  •     Pointer to LARGE_INTEGER value specifing pipe's time out, in 100-ns units. Negative value means relative time.


    Documented by:
    Tomasz Nowak
    Reactos



    Requirements:
    Library: ntdll.lib


    See also:
    FILE_INFORMATION_CLASS
    FILE_PIPE_INFORMATION
    FILE_PIPE_LOCAL_INFORMATION
    FILE_PIPE_REMOTE_INFORMATION
    NtFsControlFile
    NtQueryInformationFile
    NtReadFile
    NtSetInformationFile
    NtWriteFile