> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OfferResources (XBOX Series 主機)

> 允許作業系統藉由捨棄資源內容來釋放資源的視訊記憶體。

允許作業系統藉由捨棄資源內容來釋放資源的視訊記憶體。

## 語法

```cpp theme={null}
HRESULT OfferResources(  
         UINT NumResources,  
         IDXGIResource* ppResources,  
         DXGI_OFFER_RESOURCE_PRIORITY Priority  
)  
```

### 參數

*NumResources*   \_In\_\
類型：UINT

*ppResources* 引數陣列中的資源數目。

*ppResources*   \_In\_reads\_(NumResources)\
類型：IDXGIResource\*

指向要提供之資源的 *IDXGIResource* 介面指標陣列。

*Priority*   \_In\_\
類型：DXGI\_OFFER\_RESOURCE\_PRIORITY

A [DXGI\_OFFER\_RESOURCE\_PRIORITY](https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_2/ne-dxgi1_2-dxgi_offer_resource_priority)類型的值，表示資料的重要程度。

### 傳回值

類型：HRESULT

如果成功，會傳回 S\_OK；否則會傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 需求

**標頭：** d3d12\_xs.h

**程式庫：** d3d12\_xs.lib\
**支援的平台：** XBOX Series 主機

## 另請參閱

[IDXGIDevice2](/zh-TW/reference/graphics/d3d12_xs/interfaces/IDXGIDevice2/idxgidevice2)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [Access GDK resources and downloads](/home/onboarding-access/access-resources.md)
- [使用 GDKX 建置並執行你的第一個主機遊戲](/zh-TW/home/build-first-title/first-console-title-walkthrough.md)
- [XBOX Series X|S 總覽](/zh-TW/paths/series-xs/overview.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
