FILE_MAILSLOT_QUERY_INFORMATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#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;

#endif

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

NtDoc

This structure is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (ns-ntifs-_file_mailslot_query_information)

_FILE_MAILSLOT_QUERY_INFORMATION structure

Description

The FILE_MAILSLOT_QUERY_INFORMATION structure contains information about a mailslot.

Members

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.

Remarks

For more information, see Mailslots.