Platform SDK: Interprocess Communications |
The SetMailslotInfo function sets the time-out value used by the specified mailslot for a read operation.
BOOL SetMailslotInfo( HANDLE hMailslot, // mailslot handle DWORD lReadTimeout // read time-out interval );
Value | Meaning |
---|---|
0 | Returns immediately if no message is present. (The system does not treat an immediate return as an error.) |
MAILSLOT_WAIT_FOREVER | Waits forever for a message. |
This time-out value applies to all subsequent read operations and to all inherited mailslot handles.
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.
The initial time-out value used by a mailslot for a read operation is typically set by CreateMailslot when the mailslot is created.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Mailslots Overview, Mailslot Functions, CreateMailslot, GetMailslotInfo