SetMailslotInfo function (winbase.h)
Sets the time-out value used by the specified mailslot for a read operation.
Syntax
BOOL SetMailslotInfo(
[in] HANDLE hMailslot,
[in] DWORD lReadTimeout
);
Parameters
[in] hMailslot
A handle to a mailslot. The CreateMailslot function must create this handle.
[in] lReadTimeout
The time a read operation can wait for a message to be written to the mailslot before a time-out occurs, in milliseconds. The following values have special meanings.
Value | Meaning |
---|---|
|
Returns immediately if no message is present. (The system does not treat an immediate return as an error.) |
|
Waits forever for a message. |
This time-out value applies to all subsequent read operations and to all inherited mailslot handles.
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.
Remarks
The initial time-out value used by a mailslot for a read operation is typically set by CreateMailslot when the mailslot is created.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winbase.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |