NtCreateMailslotFile - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateMailslotFile(
    _Out_ PHANDLE FileHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ POBJECT_ATTRIBUTES ObjectAttributes,
    _Out_ PIO_STATUS_BLOCK IoStatusBlock,
    _In_ ULONG CreateOptions,
    _In_ ULONG MailslotQuota,
    _In_ ULONG MaximumMessageSize,
    _In_ PLARGE_INTEGER ReadTimeout
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateMailslotFile(
    _Out_ PHANDLE FileHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ POBJECT_ATTRIBUTES ObjectAttributes,
    _Out_ PIO_STATUS_BLOCK IoStatusBlock,
    _In_ ULONG CreateOptions,
    _In_ ULONG MailslotQuota,
    _In_ ULONG MaximumMessageSize,
    _In_ PLARGE_INTEGER ReadTimeout
    );

#endif

View code on GitHub

Function NtCreateMailslotFile creates especial File Object called Mailslot. See Microsoft SDK for more information about Mailslots.

MailslotFileHandle

Result of call - HANDLE to Mailslot File Object.

DesiredAccess

Access rights associated with opened handle.

ObjectAttributes

Pointer to OBJECT_ATTRIBUTES structure contains valid object name. Name must be in format "\\??\MAILSLOT\..." where "..." means unique name of Mailslot.

IoStatusBlock

IO result of call.

CreateOptions

Can be combination of:

MailslotQuota

???

MaxMessageSize

Maximum message size, or MAILSLOT_SIZE_AUTO for automatic message size.

ReadTimeOut

Timeout value, or -1 for infinite waiting.

Documented by

See also