C Specification

The xrStructureTypeToString2KHR function is defined as:

// Provided by XR_KHR_extended_struct_name_lengths
XrResult xrStructureTypeToString2KHR(
    XrInstance                                  instance,
    XrStructureType                             value,
    char                                        buffer[XR_MAX_STRUCTURE_NAME_SIZE_EXTENDED_KHR]);

Parameters

Parameter Descriptions
  • instance is the handle of the instance to ask for the string.

  • value is the XrStructureType value to turn into a string.

  • buffer is the buffer that will be used to return the string in.

Description

Returns the name of the provided XrStructureType value by copying a valid null-terminated UTF-8 string into buffer.

In all cases the returned string must be one of:

Structure Type String Output Values
  • The literal string defined for the provided numeric value in the core specification or extension. (e.g. the value of XR_TYPE_INSTANCE_CREATE_INFO results in the string XR_TYPE_INSTANCE_CREATE_INFO)

  • XR_UNKNOWN_STRUCTURE_TYPE_ concatenated with the structure type number expressed as a decimal number.

For structure type enumerants whose names fit within the original size limit of 63 bytes, xrStructureTypeToString2KHR must return the same resultant string as xrStructureTypeToString, up to the null terminator.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

On failure, this command returns
  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

See Also

Document Notes

For more information, see the OpenXR Specification

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

Copyright 2014-2025 The Khronos Group Inc.