Düzenle

Aracılığıyla paylaş


IDXGISurface2::GetResource method (dxgi1_2.h)

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

[in] riid

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

[out] ppParentResource

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

[out] pSubresourceIndex

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

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header dxgi1_2.h
Library Dxgi.lib

See also

IDXGISurface2