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.

ID3D11InfoQueue::GetMessage method

Get a message from the message queue.

Syntax


HRESULT GetMessage(
  [in]       UINT64 MessageIndex,
  [out]      D3D11_MESSAGE *pMessage,
  [in, out]  SIZE_T *pMessageByteLength
);

Parameters

MessageIndex [in]

Type: UINT64

Index into message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter (which can be obtained with ID3D11InfoQueue::GetNumStoredMessagesAllowedByRetrievalFilter). 0 is the message at the front of the message queue.

pMessage [out]

Type: D3D11_MESSAGE*

Returned message (see D3D11_MESSAGE).

pMessageByteLength [in, out]

Type: SIZE_T*

Size of pMessage in bytes, including the size of the message string that the pMessage points to.

Return value

Type: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

Remarks

This method does not remove any messages from the message queue.

This method gets messages from the message queue after an optional retrieval filter has been applied.

Applications should call this method twice to retrieve a message - first to obtain the size of the message and second to get the message. Here is a typical example:



// Get the size of the message
SIZE_T messageLength = 0;
HRESULT hr = pInfoQueue->GetMessage(0, NULL, &messageLength);

// Allocate space and get the message
D3D11_MESSAGE * pMessage = (D3D11_MESSAGE*)malloc(messageLength);
hr = pInfoQueue->GetMessage(0, pMessage, &messageLength);


For an overview see Information Queue Overview.

Windows Phone 8: This API is supported.

Requirements

Header

D3D11SDKLayers.h

Library

D3D11.lib

See also

ID3D11InfoQueue Interface

 

 

Community Additions

Show:
© 2014 Microsoft