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.

IDXGISurface2::GetResource method

Gets the parent resource and subresource index that support a subresource surface.

Syntax


HRESULT GetResource(
  [in]  REFIID riid,
  [out] void   **ppParentResource,
  [out] UINT   *pSubresourceIndex
);

Parameters

riid [in]

The globally unique identifier (GUID) of the requested interface type.

ppParentResource [out]

A pointer to a buffer that receives a pointer to the parent resource object for the subresource surface.

pSubresourceIndex [out]

A pointer to a variable that receives the index of the subresource surface.

Return value

Returns S_OK if successful; otherwise, returns one of the following values:

  • E_NOINTERFACE if the object does not implement the GUID that the riid parameter specifies.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Remarks

For subresource surface objects that the IDXGIResource1::CreateSubresourceSurface method creates, GetResource simply returns the values that were used to create the subresource surface.

Current objects that implement IDXGISurface are either resources or views. GetResource for these objects returns “this” or the resource that supports the view respectively. In this situation, the subresource index is 0.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8

Header

DXGI1_2.h

Library

Dxgi.lib

See also

IDXGISurface2

 

 

Show:
© 2016 Microsoft