IDXGIDevice4::ReclaimResources1 method

Restores access to resources that were previously offered by calling IDXGIDevice4::OfferResources1.

Syntax

HRESULT ReclaimResources1(
  UINT                          NumResources,
  IDXGIResource                 * const *ppResources,
  DXGI_RECLAIM_RESOURCE_RESULTS *pResults
);

Parameters

NumResources

Type: UINT

The number of resources in the ppResources argument and pResults argument arrays.

ppResources

Type: IDXGIResource*

An array of pointers to IDXGIResource interfaces for the resources to reclaim.

pResults

Type: DXGI_RECLAIM_RESOURCE_RESULTS*

A pointer to an array that receives DXGI_RECLAIM_RESOURCE_RESULTS values. Each value in the array corresponds to a resource at the same index that the ppResources parameter specifies. The caller can pass in NULL, if the caller intends to fill the resources with new content regardless of whether the old content was discarded.

Return Value

Type: HRESULT

This method returns an HRESULT success or error code, including E_INVALIDARG if the resources are invalid.

Remarks

After you call OfferResources1 to offer one or more resources, you must call ReclaimResources1 before you can use those resources again.

To reclaim shared resources, call ReclaimResources1 only on one of the sharing devices. To ensure exclusive access to the resources, you must use an IDXGIKeyedMutex object and then call ReclaimResources1 only while you hold the mutex.

Requirements

   
Target Platform Windows
Header dxgi1_5.h
Library Dxgi.lib
DLL Dxgi.dll

See Also

IDXGIDevice4

ReclaimResources