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.

IDXGIInfoQueue::GetMessage method

Gets a message from the message queue.

Syntax


HRESULT GetMessage(
  [in]            DXGI_DEBUG_ID           Producer,
  [in]            UINT64                  MessageIndex,
  [out, optional] DXGI_INFO_QUEUE_MESSAGE *pMessage,
  [in, out]       SIZE_T                  *pMessageByteLength
);

Parameters

Producer [in]

A DXGI_DEBUG_ID value that identifies the entity that gets the message.

MessageIndex [in]

An index into the 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. Call IDXGIInfoQueue::GetNumStoredMessagesAllowedByRetrievalFilters to obtain this number. 0 is the message at the beginning of the message queue.

pMessage [out, optional]

A pointer to a DXGI_INFO_QUEUE_MESSAGE structure that describes the message.

pMessageByteLength [in, out]

A pointer to a variable that receives the size, in bytes, of the message description that pMessage points to. This size includes the size of the message string that pMessage points to.

Return value

Returns S_OK if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR.

Remarks

This method doesn't remove any messages from the message queue.

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

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(DXGI_DEBUG_ALL, 0, NULL, &messageLength);

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


Note  This API requires the Windows Software Development Kit (SDK) for Windows 8.
 

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8

Header

DXGIDebug.h

DLL

DXGIDebug.dll

See also

IDXGIInfoQueue

 

 

Show:
© 2017 Microsoft