GetMailslotInfo function

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.

ValueMeaning
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 [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
Mailslot Functions
Mailslots Overview
SetMailslotInfo

 

 

Community Additions

ADD
Show:
© 2014 Microsoft