ID2D1ImageSource::TryReclaimResources method (d2d1_3.h)
Restores access to resources that were previously offered by calling OfferResources.
Syntax
HRESULT TryReclaimResources(
[out] BOOL *resourcesDiscarded
);
Parameters
[out] resourcesDiscarded
Type: BOOL*
Returns with TRUE if the corresponding resource’s content was discarded and is now undefined, or 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
Type: HRESULT
ReclaimResources returns:
- S_OK if resources were successfully reclaimed
- E_INVALIDARG if the resources are invalid
Remarks
After you call OfferResources to offer one or more resources, you must call TryReclaimResources before you can use those resources again. You must check the value in the resourcesDiscarded to determine whether the 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.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d2d1_3.h |
Library | D2D1.lib |
DLL | D2D1.dll |