Previous Next

RtlInitString

The RtlInitString routine initializes a counted string.

VOID 
  RtlInitString(
    IN OUT PSTRING  DestinationString,
    IN PCSZ  SourceString
    );

Parameters

DestinationString
Pointer to the buffer for a counted string to be initialized.
SourceString
Pointer to a NULL-terminated string value with which to initialize the counted string.

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

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

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

See Also

RtlInitAnsiString, RtlInitUnicodeString