Partilhar via


MQGetOverlappedResult

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The MQGetOverlappedResult function retrieves the Message Queuing success or error code from the OVERLAPPED structure used to retrieve a message asynchronously.

HRESULT APIENTRY MQGetOverlappedResult(  
  LPOVERLAPPED lpOverlapped  
);  

Parameters

lpOverlapped

[in] The OVERLAPPED structure used to retrieve the message.

Return Values

MQ_OK

Indicates success.

MQ_ERROR_INSUFFICIENT_RESOURCES (0xC00E0027)

There are not enough resources to complete operation (for example, not enough memory). Operation failed.

MQ_ERROR_IO_TIMEOUT (0xC00E001B)

No message was received within the time-out period specified by dwTimeout in the preceding call to MQReceiveMessage.

Remarks

Call this function after the event is signaled or after you get a completion port notification. The function retrieves the success or error code from the Internal member of the OVERLAPPED structure.

Example Code

The following code example is included in Using Message Queuing.

For an example of See
Retrieving the Message Queuing success or error code from an OVERLAPPED structure after receiving a completion port notification C/C++ Code Example: Reading Messages Asynchronously Using Completion Ports

Requirements

Windows NT/2000/XP: Included in Windows 2000 and later.

Windows 95/98/Me: Unsupported.

Header: Declared in Mq.h.

Library: Use Mqrt.lib.

See Also

Message Queuing Functions
MQReceiveMessage