#ifndef _NTIOAPI_H
/**
* The NtCreateMailslotFile routine creates a mailslot.
*
* \param[out] FileHandle Pointer to a variable that receives a handle to the mailslot.
* \param[in] DesiredAccess The requested access to the mailslot.
* \param[in] ObjectAttributes Pointer to an OBJECT_ATTRIBUTES structure.
* \param[out] IoStatusBlock Pointer to an IO_STATUS_BLOCK structure.
* \param[in] CreateOptions Specifies the options to be applied when creating the mailslot.
* \param[in] MailslotQuota Specifies the amount of memory that the mailslot can use for its messages.
* \param[in] MaximumMessageSize Specifies the maximum size of a message that can be written to the mailslot.
* \param[in] ReadTimeout Specifies the maximum time a read operation can wait for a message to be written to the mailslot.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createmailslotw
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateMailslotFile(
_Out_ PHANDLE FileHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ PCOBJECT_ATTRIBUTES ObjectAttributes,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_ ULONG CreateOptions,
_In_ ULONG MailslotQuota,
_In_ ULONG MaximumMessageSize,
_In_ PLARGE_INTEGER ReadTimeout
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateMailslotFile(
_Out_ PHANDLE FileHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ PCOBJECT_ATTRIBUTES ObjectAttributes,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_ ULONG CreateOptions,
_In_ ULONG MailslotQuota,
_In_ ULONG MaximumMessageSize,
_In_ PLARGE_INTEGER ReadTimeout
);
View code on GitHubNo description available.
Function NtCreateMailslotFile creates especial File Object called Mailslot. See Microsoft SDK for more information about Mailslots.
Result of call - HANDLE to Mailslot File Object.
Access rights associated with opened handle.
Pointer to OBJECT_ATTRIBUTES structure contains valid object name. Name must be in format "\\??\MAILSLOT\..." where "..." means unique name of Mailslot.
IO result of call.
Can be combination of:
???
Maximum message size, or MAILSLOT_SIZE_AUTO for automatic message size.
Timeout value, or -1 for infinite waiting.