IDXGIDevice4::ReclaimResources1 method (dxgi1_5.h)
Restores access to resources that were previously offered by calling IDXGIDevice4::OfferResources1.
Syntax
HRESULT ReclaimResources1(
[in] UINT NumResources,
[in] IDXGIResource * const *ppResources,
[out] DXGI_RECLAIM_RESOURCE_RESULTS *pResults
);
Parameters
[in] NumResources
Type: UINT
The number of resources in the ppResources argument and pResults argument arrays.
[in] ppResources
Type: IDXGIResource*
An array of pointers to IDXGIResource interfaces for the resources to reclaim.
[out] 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
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dxgi1_5.h |
Library | Dxgi.lib |
DLL | Dxgi.dll |