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

# CreateMemoryLayout (XBOX One 系列)

> 以指定的名稱和大小建立新的記憶體配置。

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

以指定的名稱和大小建立新的記憶體配置。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT CreateMemoryLayout(
         const WCHAR *strName,
         SIZE_T LayoutSizeBytes,
         XG_GPU_VIRTUAL_ADDRESS DesiredVirtualAddress,
         XGMemoryLayout **ppLayout
)  
```

<a id="ID4EG" />

### 參數

*strName*   \_In\_z\_\
類型：WCHAR\*

新記憶體配置的名稱。

*LayoutSizeBytes*   \
類型：SIZE\_T

新記憶體配置的大小。

*DesiredVirtualAddress*   \
類型：XG\_GPU\_VIRTUAL\_ADDRESS

嘗試使用的虛擬位址 (UINT64)
。若要自動指派虛擬位址，請傳入 0。

*ppLayout*   \_Out\_\
類型：XGMemoryLayout\*\*

產生的新記憶體配置。

<a id="ID4EP" />

### 傳回值

類型：HRESULT

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

<a id="requirements" />

## 需求

**標頭：** xgmemory.h

<a id="ID4ESB" />

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

## 另請參閱

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


## Related topics

- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [Diretório de tópicos NDA: links ativos do Microsoft Learn](/pt-BR/nda/nda-topic-directory.md)
- [XGameStreamingShowTouchControlLayout](/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayout.md)
- [D3D12_INPUT_LAYOUT_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_input_layout_desc_public.md)
- [XGameStreamingShowTouchControlLayoutOnClient](/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingshowtouchcontrollayoutonclient.md)
