UNICODE_STRING

typedef struct _UNICODE_STRING {
    USHORT Length;
    USHORT MaximumLength;
    PWSTR Buffer;
} UNICODE_STRING *PUNICODE_STRING;

The UNICODE_STRING structure is used to define UNICODE strings.

Members

Length
The length in bytes of the string stored in Buffer.
MaximumLength
The maximum length in bytes of Buffer.
Buffer
Points to a buffer used to contain a string of wide characters.

Comments

The STRING structure is used to pass UNICODE strings.

If the string is NULL terminated, Length does not include the trailing NULL.

The MaximumLength is used to indicate the length of Buffer so that if the string is passed to a conversion routine such as RtlUnicodeStringToAnsiString the returned string does not exceed the buffer size.

See Also

OEM_STRING, ANSI_STRING, RtlAnsiStringToUnicodeSize , RtlAnsiStringToUnicodeString, RtlFreeAnsiString, RtlInitAnsiString, RtlUnicodeStringToAnsiString