The RtlInitString routine initializes a counted string.
VOID
RtlInitString(
IN OUT PSTRING DestinationString,
IN PCSZ SourceString
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
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.