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

# CopyMapping (XBOX One 系列)

> 將來源對應複製到目的地對應。可選擇以目的地對應中新配置的系統記憶體頁面取代來源對應中的 ESRAM 頁面對應。

# XGMemoryLayout::CopyMapping 方法 (XBOX One 系列)

將來源對應複製到目的地對應。可選擇以目的地對應中新配置的系統記憶體頁面，取代來源對應中的 ESRAM 頁面對應。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT CopyMapping(
         XGMemoryLayoutMapping *pDestMapping,
         const XGMemoryLayoutMapping *pSourceMapping,
         UINT32 Flags
)  
```

<a id="ID4EG" />

### 參數

*pDestMapping*   \_In\_\
類型: XGMemoryLayoutMapping \*

目的地對應，以指向 [XGMemoryLayoutMapping](/zh-TW/reference/graphics/xgmemory_NR/structs/xgmemorylayoutmapping) 結構的指標表示。

*pSourceMapping*   \_In\_\
類型: XGMemoryLayoutMapping \*

來源對應，以指向 [XGMemoryLayoutMapping](/zh-TW/reference/graphics/xgmemory_NR/structs/xgmemorylayoutmapping) 結構的指標表示。

*Flags*   \
類型: UINT32

控制此方法的旗標，例如是否要取代 ESRAM 頁面和系統記憶體頁面的對應。為 [XG\_COPY\_MAPPING\_FLAGS](/zh-TW/reference/graphics/xgmemory_NR/enums/xg_copy_mapping_flags) 列舉常數的位元 OR 組合。

<a id="ID4EP" />

### 傳回值

類型: HRESULT

S\_OK、E\_INVALIDARG 或 E\_OUTOFMEMORY<a id="requirements" />

## 需求

**標頭:** xgmemory.h

<a id="ID4E1B" />

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

## 另請參閱

[XGMemoryLayout](/zh-TW/reference/graphics/xgmemory_NR/interfaces/XGMemoryLayout/xgmemorylayout)


## Related topics

- [CopyTileMappings](/zh-CN/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_copytilemappings_public.md)
- [CopyDescriptors](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_copydescriptors_public.md)
- [CopyTiles](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_copytiles_public.md)
- [OpenExistingHeapFromFileMapping](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device3/methods/id3d12device3_openexistingheapfromfilemapping_public.md)
- [D3D12_SHADER_COMPONENT_MAPPING](/zh-CN/reference/graphics/d3d12/enums/d3d12_shader_component_mapping_public.md)
