Retrieves information about the specified mailslot.
Syntax
BOOL WINAPI GetMailslotInfo( __in HANDLE hMailslot, __out_opt LPDWORD lpMaxMessageSize, __out_opt LPDWORD lpNextSize, __out_opt LPDWORD lpMessageCount, __out_opt LPDWORD lpReadTimeout );
Parameters
- hMailslot [in]
-
A handle to a mailslot. The CreateMailslot function must create this handle.
- lpMaxMessageSize [out, optional]
-
The maximum message size, in bytes, allowed for this mailslot. This value can be greater than or equal to the value specified in the cbMaxMsg parameter of the CreateMailslot function that created the mailslot. This parameter can be NULL.
- lpNextSize [out, optional]
-
The size of the next message, in bytes. The following value has special meaning.
Value Meaning - MAILSLOT_NO_MESSAGE
- ((DWORD)-1)
There is no next message.
This parameter can be NULL.
- lpMessageCount [out, optional]
-
The total number of messages waiting to be read, when the function returns. This parameter can be NULL.
- lpReadTimeout [out, optional]
-
The amount of time, in milliseconds, a read operation can wait for a message to be written to the mailslot before a time-out occurs. This parameter is filled in when the function returns. This parameter can be NULL.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Examples
For an example, see Reading from a Mailslot.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 9/7/2011
