RtlStringFromGUID function (wdm.h)

The RtlStringFromGUID routine converts a given GUID from binary format into a Unicode string.

Syntax

NTSYSAPI NTSTATUS RtlStringFromGUID(
  [in]  REFGUID         Guid,
  [out] PUNICODE_STRING GuidString
);

Parameters

[in] Guid

Specifies the binary-format GUID to convert.

[out] GuidString

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.

Return value

If the conversion succeeds, RtlStringFromGUID returns STATUS_SUCCESS. Otherwise, no storage was allocated, nor was the conversion performed.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe (kernel mode); Ntdll.dll (user mode)
IRQL PASSIVE_LEVEL

See also

RtlGUIDFromString