> ## 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 成员](/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [实体句柄](/zh-CN/services/playfab/sdks/c/entity-handles.md)
- [Services C API overview - PFEntity.h](/zh-CN/services/playfab/api-references/c/pfentity/pfentity_members.md)
- [XUserDuplicateHandle](/zh-CN/reference/system/xuser/functions/xuserduplicatehandle.md)
- [WdDuplicateCancellationHandle](/zh-CN/reference/remoting/functions/wdduplicatecancellationhandle.md)
- [XTaskQueueDuplicateHandle](/zh-CN/reference/system/xtaskqueue/functions/xtaskqueueduplicatehandle.md)
