#ifndef _NTRTL_H
/**
* The RtlStringFromGUID routine converts a given GUID from binary format into a Unicode string.
*
* \param[in] Guid Specifies the binary-format GUID to convert.
* \param[out] GuidString Pointer to a caller-supplied variable in which a pointer to the converted GUID string is returned and must free by calling RtlFreeUnicodeString.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlstringfromguid
*/
NTSYSAPI
NTSTATUS
NTAPI
RtlStringFromGUID(
_In_ PGUID Guid,
_Out_ PUNICODE_STRING GuidString
);
View code on GitHub// wdm.h
NTSYSAPI NTSTATUS RtlStringFromGUID(
[in] REFGUID Guid,
[out] PUNICODE_STRING GuidString
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The RtlStringFromGUID routine converts a given GUID from binary format into a Unicode string.
Guid [in]Specifies the binary-format GUID to convert.
GuidString [out]Pointer to a caller-supplied variable in which a pointer to the converted GUID string is returned. RtlStringFromGUID allocates the buffer space for the string, which the caller must free by calling RtlFreeUnicodeString. The returned string is in the form {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, including the prepended and appended braces.
If the conversion succeeds, RtlStringFromGUID returns STATUS_SUCCESS. Otherwise, no storage was allocated, nor was the conversion performed.