Partilhar via


2.4.28 FileMailslotQueryInformation

This information class is used locally to query information on a mailslot.

A FILE_MAILSLOT_QUERY_INFORMATION data element, defined as follows, is returned to the caller.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

MaximumMessageSize

MailslotQuota

NextMessageSize

MessagesAvailable

ReadTimeout

...

MaximumMessageSize (4 bytes):  A 32-bit unsigned integer that contains the maximum size of a single message that can be written to the mailslot, in bytes. To specify that the message can be of any size, set this value to zero.

MailslotQuota (4 bytes):  A 32-bit unsigned integer that contains the quota, in bytes, for the mailslot. The mailslot quota specifies the in-memory pool quota that is reserved for writes to this mailslot.

NextMessageSize (4 bytes):  A 32-bit unsigned integer that contains the next message size, in bytes.

MessagesAvailable (4 bytes):  A 32-bit unsigned integer that contains the total number of messages waiting to be read from the mailslot.

ReadTimeout (8 bytes):  A 64-bit signed integer that contains the time a read operation can wait for a message to be written to the mailslot before a time-out occurs in milliseconds. The value of this field MUST be (-1) or greater than or equal to 0. 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.

This operation returns a status code as specified in section 2.2. Upon success, the status code returned by the function that processes this file information class is STATUS_SUCCESS. The most common error codes are listed in the following table.

Error code

Meaning

STATUS_INFO_LENGTH_MISMATCH

0xC0000004

The specified information record length does not match the length that is required for the specified information class.