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

> Duplicates a PFEntityHandle.

Duplicates a PFEntityHandle.

## Syntax

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

### Parameters

**`entityHandle`**   PFEntityHandle

Entity handle to duplicate.

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

The duplicated handle.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

Both the duplicated handle and the original handle need to be closed with PFEntityCloseHandle when they are no longer needed.

## Requirements

**Header:** PFEntity.h

## See also

[PFEntity members](/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

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