2.2.5.20 UNICODE_STRING

The UNICODE_STRING structure specifies a Unicode string.

 typedef struct _UNICODE_STRING {
   unsigned short Length;
   unsigned short MaximumLength;
   [size_is(MaximumLength / 2), length_is((Length) / 2)] 
     unsigned short* Buffer;
 } UNICODE_STRING,
  *PUNICODE_STRING;

Length: The length, in bytes, of the string pointed to by the Buffer member, not including the terminating null character, if any. This value MUST be a multiple of 2.

MaximumLength: The total size, in bytes, of the Buffer. If this value is not a multiple of 2, the server (2) MUST decrement this value by 1. This value MUST NOT be less than Length.

Buffer: The Unicode UTF-8 string. If the MaximumLength value is greater than zero, this field MUST contain a non-null character. Buffer can contain a terminating null character.