2.2.2.15.1.1 TS_UNICODE_STRING

The TS_UNICODE_STRING structure contains a Unicode string.

 typedef struct _TS_UNICODE_STRING {
     USHORT Length;
     USHORT MaximumLength;
 #ifdef __midl
     [size_is(MaximumLength),length_is(Length)]PWSTR  Buffer;
 #else
     PWSTR  Buffer;
 #endif
 } TS_UNICODE_STRING;

Length: The actual length of the string currently stored in the Buffer member, in bytes.

MaximumLength: The maximum length of the string that can be stored in Buffer, in bytes.

Buffer: A wide character string that MUST NOT be followed by the terminating NULL character.