UNICODE_STRING Home
Windows Driver Kit: Kernel-Mode Driver Architecture
UNICODE_STRING

The UNICODE_STRING structure is used to define Unicode strings.

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.

Comments

The UNICODE_STRING structure is used to pass Unicode strings. Use RtlInitUnicodeString to initialize a UNICODE_STRING.

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 RtlAnsiStringToUnicodeString the returned string does not exceed the buffer size.

Requirements

Headers: Defined in Ntdef.h. Include Wdm.h or Ntddk.h.

See Also

OEM_STRING, ANSI_STRING, RtlAnsiStringToUnicodeSize, RtlAnsiStringToUnicodeString, RtlFreeUnicodeString, RtlInitUnicodeString, RtlUnicodeStringToAnsiSize, RtlUnicodeStringToAnsiString

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View