#ifndef _NTIOAPI_H
/**
* The FILE_MAILSLOT_QUERY_INFORMATION structure contains information about a mailslot.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_mailslot_query_information
*/
typedef struct _FILE_MAILSLOT_QUERY_INFORMATION
{
ULONG MaximumMessageSize; // The maximum size, in bytes, of a single message that can be written to the mailslot, or 0 for a message of any size.
ULONG MailslotQuota; // The size, in bytes, of the in-memory pool that is reserved for writes to this mailslot.
ULONG NextMessageSize; // The next message size, in bytes.
ULONG MessagesAvailable; // The total number of messages waiting to be read from the mailslot.
LARGE_INTEGER ReadTimeout; // The time, in milliseconds, that a read operation can wait for a message to be written to the mailslot before a time-out occurs.
} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
View code on GitHub
// ntifs.h
typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
ULONG MaximumMessageSize;
ULONG MailslotQuota;
ULONG NextMessageSize;
ULONG MessagesAvailable;
LARGE_INTEGER ReadTimeout;
} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
View the official Windows Driver Kit DDI reference
This structure is documented in Windows Driver Kit.
The FILE_MAILSLOT_QUERY_INFORMATION structure contains information about a mailslot.
MaximumMessageSize
The maximum size, in bytes, of a single message that can be written to the mailslot, or 0 for a message of any size.
MailslotQuota
The size, in bytes, of the in-memory pool that is reserved for writes to this mailslot.
NextMessageSize
The next message size, in bytes.
MessagesAvailable
The total number of messages waiting to be read from the mailslot.
ReadTimeout
The time, in milliseconds, that a read operation can wait for a message to be written to the mailslot before a time-out occurs. A value of –1 requests that the read wait forever for a message, without timing out. A value of 0 requests that the read not wait and return immediately whether a pending message is available to be read or not.
For more information, see Mailslots.