IRP
MDL
Expand Minimize

ANSI_STRING structure

The ANSI_STRING structure defines a counted string used for ANSI strings.

Syntax


typedef struct _STRING {
  USHORT Length;
  USHORT MaximumLength;
  PCHAR  Buffer;
} ANSI_STRING, *PANSI_STRING;

Members

Length

The length in bytes of the string stored in the buffer pointed to by Buffer.

MaximumLength

The length in bytes of the buffer pointed to by Buffer.

Buffer

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

Remarks

The ANSI_STRING structure is used to pass ANSI strings. Use the RtlInitAnsiString routine to initialize an ANSI_STRING.

If the string is null-terminated, Length does not include the terminating 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.

Requirements

Header

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

See also

OEM_STRING
UNICODE_STRING
RtlAnsiStringToUnicodeSize
RtlAnsiStringToUnicodeString
RtlFreeAnsiString
RtlInitAnsiString
RtlUnicodeStringToAnsiSize
RtlUnicodeStringToAnsiString

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft