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

# OpenSharedHandle

> HANDLE 및 REFIID를 사용하여 공유 리소스, 공유 힙 및 공유 펜스에 대한 핸들을 엽니다.

HANDLE 및 REFIID를 사용하여 공유 리소스, 공유 힙 및 공유 펜스에 대한 핸들을 엽니다.

## 구문

```cpp theme={null}
HRESULT OpenSharedHandle(
    HANDLE NTHandle,
    const IID & riid,
    void  ppvObj
)
```

### 매개 변수

*NTHandle \[in]*\
형식: HANDLE

[ID3D12Device::CreateSharedHandle](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsharedhandle_public) 호출에서 출력된 핸들입니다.

*riid*\
형식: const IID &

다음 인터페이스 중 하나에 대한 전역 고유 식별자(**GUID**)입니다:

<ul>
  <li>
    [ID3D12Heap](/reference/graphics/d3d12/interfaces/id3d12heap/id3d12heap_public)
  </li>

  <li>
    [ID3D12Resource](/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs)
  </li>

  <li>
    [ID3D12Fence](/reference/graphics/d3d12/interfaces/id3d12fence/id3d12fence_public)
  </li>
</ul>

인터페이스의 **REFIID** 또는 **GUID**는 \_\_uuidof() 매크로를 사용하여 얻을 수 있습니다.
예를 들어 \_\_uuidof(ID3D12Heap)은 리소스에 대한 인터페이스의 **GUID**를 가져옵니다.

*ppvObj \[out, optional]*\
형식: void \*\*

다음 인터페이스 중 하나에 대한 포인터를 받는 메모리 블록에 대한 포인터입니다:

<ul>
  <li>
    [ID3D12Heap](/reference/graphics/d3d12/interfaces/id3d12heap/id3d12heap_public)
  </li>

  <li>
    [ID3D12Resource](/reference/graphics/d3d12_xs/interfaces/ID3D12Resource/id3d12resource_xs)
  </li>

  <li>
    [ID3D12Fence](/reference/graphics/d3d12/interfaces/id3d12fence/id3d12fence_public)
  </li>
</ul>

### 반환 값

형식: HRESULT

이 메서드는 [Direct3D 12 반환 코드](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues) 중 하나를 반환합니다.

## 요구 사항

**헤더:** d3d12\_xs.h 또는 d3d12\_x.h\
**라이브러리:** d3d12\_xs.lib 또는 d3d12\_x.lib\
**지원 플랫폼**: XBOX Series 콘솔 및 XBOX One 제품군

## 함께 보기

[ID3D12Device](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)

[다중 어댑터 시스템](https://learn.microsoft.com/en-us/windows/win32/direct3d12/multi-engine)


## Related topics

- [OpenSharedHandleByName](/ko/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_opensharedhandlebyname_public.md)
- [IGameInputDispatcher::OpenWaitHandle](/ko/reference/input/gameinput/interfaces/IGameInputDispatcher/methods/igameinputdispatcher_openwaithandle.md)
- [SHARED_SHAPE_CONTEXTS](/ko/reference/audio/acphal/structs/shared_shape_contexts.md)
- [PFAuthenticationLoginWithOpenIdConnectAsync](/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationloginwithopenidconnectasync.md)
- [PFAuthenticationReLoginWithOpenIdConnectAsync](/ko/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationreloginwithopenidconnectasync.md)
