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

# 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 <i>Name</i> parameter in the call to
[ID3D12Device::CreateSharedHandle](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsharedhandle_public).

*Access*\
Type: DWORD

The access level that was specified in the <i>Access</i> parameter in the call to
[ID3D12Device::CreateSharedHandle](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsharedhandle_public).

*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](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [OpenSharedHandle](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_opensharedhandle_public.md)
- [xbWatson](/tools/tools-console/xbWatson/xbwatson.md)
- [Profile Writes Meter API Description](/services/playfab/pricing/meters/profile-writes.md)
- [IXtfApplicationClient::DeployToTitleScratch](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/ixtfapplicationclient-deploytotitlescratch.md)
- [OpenSSL license](/services/playfab/sdks/cocos2d-x/Licenses/openssl-license.md)
