Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SetMailslotInfo function

Sets the time-out value used by the specified mailslot for a read operation.

Syntax


BOOL WINAPI SetMailslotInfo(
  _In_ HANDLE hMailslot,
  _In_ DWORD  lReadTimeout
);

Parameters

hMailslot [in]

A handle to a mailslot. The CreateMailslot function must create this handle.

lReadTimeout [in]

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.

ValueMeaning
0

Returns immediately if no message is present. (The system does not treat an immediate return as an error.)

MAILSLOT_WAIT_FOREVER
((DWORD)-1)

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

CreateMailslot
GetMailslotInfo
Mailslot Functions
Mailslots Overview

 

 

Show:
© 2017 Microsoft