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

# PFEntityDuplicateHandle

> 複製 PFEntityHandle。

複製 PFEntityHandle。

## 語法

```cpp theme={null}
HRESULT PFEntityDuplicateHandle(  
    PFEntityHandle entityHandle,  
    PFEntityHandle* duplicatedEntityHandle  
)  
```

### 參數

**`entityHandle`**   PFEntityHandle

要複製的實體控制代碼。

**`duplicatedEntityHandle`**   PFEntityHandle\*<br />*output*

複製的控制代碼。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。

## 備註

當不再需要複製的控制代碼和原始控制代碼時，兩者都需要使用 PFEntityCloseHandle 關閉。

## 需求

**標頭：** PFEntity.h

## 另請參閱

[PFEntity 成員](/zh-TW/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [實體控制代碼](/zh-TW/services/playfab/sdks/c/entity-handles.md)
- [服務 C API 概觀 - PFEntity.h](/zh-TW/services/playfab/api-references/c/pfentity/pfentity_members.md)
- [XUserDuplicateHandle](/zh-TW/reference/system/xuser/functions/xuserduplicatehandle.md)
- [WdDuplicateCancellationHandle](/zh-TW/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [XTaskQueueDuplicateHandle](/zh-TW/reference/system/xtaskqueue/functions/xtaskqueueduplicatehandle.md)
