RtlInitAnsiString

VOID
RtlInitAnsiString(

IN OUT PANSI_STRING DestinationString,
IN PCSZ SourceString
);

RtlInitAnsiString initializes a counted ANSI string.

Parameters

DestinationString

Points to the buffer for a counted ANSI string to be initialized.

SourceString

Points to a zero-terminated string with which to initialize the counted string.

Comments

The DestinationString is initialized to point to the SourceString. The length and maximum length for the DestinationString are initialized to the length of the SourceString.  If SourceString is NULL, the lengths are zero.

Callers of RtlInitAnsiString can be running at IRQL <= DISPATCH_LEVEL if the DestinationString buffer is nonpageable. Usually, callers run at IRQL PASSIVE_LEVEL because most other Rtl..String routines cannot be called at raised IRQL.

See Also

RtlInitString, RtlInitUnicodeString