> ## 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.

# InitializeWithPageCounts (XBOX One 系列)

> 使用系統頁面計數和 ESRAM 頁面計數初始化 **XGMemoryLayoutEngine**。

# XGMemoryLayoutEngine::InitializeWithPageCounts 方法 (XBOX One 系列)

使用系統頁面計數和 ESRAM 頁面計數初始化 **XGMemoryLayoutEngine**。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT InitializeWithPageCounts(
         UINT32 SystemPageCount,
         UINT32 EsramPageCount,
         UINT32 EsramPageOffset
)  
```

<a id="ID4EJ" />

### 參數

*SystemPageCount*\
類型：UINT32

系統頁面數目。

*EsramPageCount*\
類型：UINT32

ESRAM 頁面數目。

*EsramPageOffset*\
類型：UINT32

ESRAM 頁面起始處的位移。

<a id="ID4ES" />

### 傳回值

類型：HRESULT

S\_OK、E\_INVALIDARG 或 E\_OUTOFMEMORY。

<a id="remarks" />

## 備註

頁面會由此方法配置，並在釋放記憶體配置引擎時釋放。

<a id="requirements" />

## 需求

**標頭：** xgmemory.h

<a id="ID4ERB" />

**支援的平台：** XBOX One 系列

## 另請參閱

[XGMemoryLayoutEngine](/zh-TW/reference/graphics/xgmemory_NR/interfaces/XGMemoryLayoutEngine/xgmemorylayoutengine)


## Related topics

- [Initialize](/zh-CN/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_initialize.md)
- [chat_manager::initialize](/zh-CN/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_initialize.md)
- [FFTInitializeUnityTable](/zh-CN/reference/audio/xdsp/functions/fftinitializeunitytable.md)
- [XGameStreamingInitialize](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminginitialize.md)
- [XGameRuntimeInitialize](/zh-CN/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)
