> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblContextDuplicateHandle

> XblContextDuplicateHandle

Duplicates the XblContextHandle.

## Syntax

```cpp theme={null}
HRESULT XblContextDuplicateHandle(  
         XblContextHandle xboxLiveContextHandle,  
         XblContextHandle* duplicatedHandle  
)  
```

### Parameters

*xboxLiveContextHandle*   \_In\_\
Type: [XblContextHandle](https://docs.xbox.com/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

The XBOX Live context handle.

*duplicatedHandle*   \_Out\_\
Type: [XblContextHandle\*](https://docs.xbox.com/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

Passes back the duplicated handle.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

Use this method rather than creating a new context with the same user if the XblContextHandle is needed by multiple threads.

## Requirements

**Header:** xbox\_live\_context\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[xbox\_live\_context\_c](https://docs.xbox.com/reference/live/xsapi-c/xbox_live_context_c/xbox_live_context_c_members.md)


## Related topics

- [XblContextCreateHandle](https://docs.xbox.com/reference/live/xsapi-c/xbox_live_context_c/functions/xblcontextcreatehandle.md)
- [xbox_live_context_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/xbox_live_context_c/xbox_live_context_c_members.md)
- [How to use XBOX services APIs](https://docs.xbox.com/services/xbox-services/fundamentals/xbox-services-api/live-gs-xbl-apis.md)
- [XblMultiplayerSearchHandleDuplicateHandle](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersearchhandleduplicatehandle.md)
- [XblMultiplayerSessionDuplicateHandle](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionduplicatehandle.md)
