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

# OpenSharedHandleByName

> Opens a handle for shared resources, shared heaps, and shared fences, by using Name and Access.

Opens a handle for shared resources, shared heaps, and shared fences, by using Name and Access.

## Syntax

```cpp theme={null}
HRESULT OpenSharedHandleByName(
    LPCWSTR Name,
    DWORD Access,
    HANDLE  pNTHandle
)
```

### Parameters

*Name \[in]*\
Type: LPCWSTR

The name that was optionally passed as the *Name* parameter in the call to
[ID3D12Device::CreateSharedHandle](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsharedhandle_public.md).

*Access*\
Type: DWORD

The access level that was specified in the *Access* parameter in the call to
[ID3D12Device::CreateSharedHandle](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsharedhandle_public.md).

*pNTHandle \[out]*\
Type: HANDLE \*

Pointer to the shared handle.

### Return value

Type: HRESULT

This method returns one of the [Direct3D 12 Return Codes](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12-graphics-reference-returnvalues).

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device](https://docs.xbox.com/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device.md)


## Related topics

- [OpenSharedHandle](https://docs.xbox.com/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_opensharedhandle_public.md)
- [xbWatson](https://docs.xbox.com/tools/tools-console/xbWatson/xbwatson.md)
- [OpenWaitHandle](https://docs.xbox.com/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_openwaithandle.md)
- [Get Player Shared Secrets](https://docs.xbox.com/api-reference/authentication/get-player-shared-secrets.md)
- [Update Player Shared Secret](https://docs.xbox.com/api-reference/authentication/update-player-shared-secret.md)
