// Copyright (c) 2018-2020 NVIDIA Corporation
//
// SPDX-License-Identifier: CC-BY-4.0

[open,refpage='vkGetMemoryWin32HandleNV',desc='retrieve Win32 handle to a device memory object',type='protos']
--
To retrieve the handle corresponding to a device memory object created with
slink:VkExportMemoryAllocateInfoNV::pname:handleTypes set to include
ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV or
ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, call:

include::{generated}/api/protos/vkGetMemoryWin32HandleNV.txt[]

  * pname:device is the logical device that owns the memory.
  * pname:memory is the slink:VkDeviceMemory object.
  * pname:handleType is a bitmask of
    elink:VkExternalMemoryHandleTypeFlagBitsNV containing a single bit
    specifying the type of handle requested.
  * pname:handle is a pointer to a Windows code:HANDLE in which the handle
    is returned.

.Valid Usage
****
  * [[VUID-vkGetMemoryWin32HandleNV-handleType-01326]]
    pname:handleType must: be a flag specified in
    slink:VkExportMemoryAllocateInfoNV::pname:handleTypes when allocating
    pname:memory
****

include::{generated}/validity/protos/vkGetMemoryWin32HandleNV.txt[]
--
