(0) exportieren Drucken
Alle erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

IDXGIDevice2::ReclaimResources method

Restores access to resources that were previously offered by calling IDXGIDevice2::OfferResources.

Syntax


HRESULT ReclaimResources(
  [in]       UINT NumResources,
  [in]       IDXGIResource *const *ppResources,
  [in, out]  BOOL *pDiscarded
);

Parameters

NumResources [in]

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

ppResources [in]

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

pDiscarded [in, out]

A pointer to an array that receives Boolean values. Each value in the array corresponds to a resource at the same index that the ppResources parameter specifies. The runtime sets each Boolean value to TRUE if the corresponding resource’s content was discarded and is now undefined, or to FALSE if the corresponding resource’s old content is still intact. 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

ReclaimResources returns:

  • S_OK if resources were successfully reclaimed
  • E_INVALIDARG if the resources are invalid

Remarks

After you call IDXGIDevice2::OfferResources to offer one or more resources, you must call ReclaimResources before you can use those resources again. You must check the values in the array at pDiscarded to determine whether each resource’s content was discarded. If a resource’s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource’s content before you use the resource.

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

Platform Update for Windows 7:  The runtime validates that ReclaimResources is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows 7, see Platform Update for Windows 7.

Windows Phone 8: This API is supported.

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]

Header

DXGI1_2.h

Library

Dxgi.lib

See also

IDXGIDevice2
IDXGIDevice2::OfferResources

 

 

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft