Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
IRP
MDL
Expand Minimize

UNICODE_STRING structure

The UNICODE_STRING structure is used to define Unicode strings.

Syntax


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

Members

Length

The length, in bytes, of the string stored in Buffer.

MaximumLength

The length, in bytes, of Buffer.

Buffer

Pointer to a buffer used to contain a string of wide characters.

Remarks

The UNICODE_STRING structure is used to pass Unicode strings. Use RtlUnicodeStringInit or RtlUnicodeStringInitEx to initialize a UNICODE_STRING structure.

If the string is null-terminated, Length does not include the trailing null character.

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

Requirements

Header

Ntdef.h (include Wdm.h or Ntddk.h)

See also

OEM_STRING
ANSI_STRING
RtlAnsiStringToUnicodeSize
RtlAnsiStringToUnicodeString
RtlFreeUnicodeString
RtlInitUnicodeString
RtlUnicodeStringToAnsiSize
RtlUnicodeStringToAnsiString

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft