BOOL SetMailslotInfo(hMailslot, dwReadTimeout) | |||||
HANDLE hMailslot; | /* mailslot handle | */ | |||
DWORD dwReadTimeout; | /* read timeout | */ |
The SetMailslotInfo function sets the read timeout value for a specified mailslot.
hMailslot
Identifies a mailslot. This handle must have been created by using the CreateMailslot function.
dwReadTimeout
Specifies the amount of time (in milliseconds) to wait for a message to be written to the mailslot before timing out a read operation. The following values have special meanings:
Value | Meaning |
0 | ||
Return immediately if no message is present. (This is not treated as an error.) | ||
MAILSLOT_WAIT_FOREVER | ||
Wait forever for a message. |
The return value is TRUE if the function is successful. Otherwise, it is FALSE. Use the GetLastError function to obtain extended error information.
The initial read timeout value for a mailslot is typically set by the CreateMailslot function when the mailslot is created.
CreateMailslot, GetMailslotInfo