# VkExportFenceWin32HandleInfoKHR(3) Manual Page

## Name

VkExportFenceWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a fence

## C Specification

To specify additional attributes of NT handles exported from a fence, add a VkExportFenceWin32HandleInfoKHR structure to the `pNext` chain of the VkFenceCreateInfo structure. The `VkExportFenceWin32HandleInfoKHR` structure is defined as:

    typedef struct VkExportFenceWin32HandleInfoKHR {
        VkStructureType               sType;
        const void*                   pNext;
        const SECURITY_ATTRIBUTES*    pAttributes;
        DWORD                         dwAccess;
        LPCWSTR                       name;
    } VkExportFenceWin32HandleInfoKHR;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `pAttributes` is a pointer to a Windows `SECURITY_ATTRIBUTES` structure specifying security attributes of the handle.

- `dwAccess` is a `DWORD` specifying access rights of the handle.

- `name` is a null-terminated UTF-16 string to associate with the underlying synchronization primitive referenced by NT handles exported from the created fence.

## Description

If VkExportFenceCreateInfo is not present in the same `pNext` chain, this structure is ignored.

If VkExportFenceCreateInfo is present in the `pNext` chain of VkFenceCreateInfo with a Windows `handleType`, but either `VkExportFenceWin32HandleInfoKHR` is not present in the `pNext` chain, or if it is but `pAttributes` is set to `NULL`, default security descriptor values will be used, and child processes created by the application will not inherit the handle, as described in the MSDN documentation for “Synchronization Object Security and Access Rights”1. Further, if the structure is not present, the access rights will be

`DXGI_SHARED_RESOURCE_READ` | `DXGI_SHARED_RESOURCE_WRITE`

for handles of the following types:

`VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT`

1

  https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage

- If VkExportFenceCreateInfo::`handleTypes` does not include `VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT`, a `VkExportFenceWin32HandleInfoKHR` structure must not be included in the `pNext` chain of VkFenceCreateInfo.

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR`

- If `pAttributes` is not `NULL`, `pAttributes` must be a valid pointer to a valid `SECURITY_ATTRIBUTES` value

## See Also

VkStructureType

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.