#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_10)
NTSYSAPI
NTSTATUS
NTAPI
RtlInitStringEx(
_Out_ PSTRING DestinationString,
_In_opt_z_ __drv_aliasesMem PCSZ SourceString
);
View code on GitHub// ntifs.h
NTSYSAPI NTSTATUS RtlInitStringEx(
[out] PSTRING DestinationString,
[in, optional] __drv_aliasesMem PCSZ SourceString
);
View the official Windows Driver Kit DDI reference// wdm.h
NTSYSAPI NTSTATUS RtlInitStringEx(
[out] PSTRING DestinationString,
[in, optional] __drv_aliasesMem PCSZ SourceString
);
View the official Windows Driver Kit DDI referenceThe RtlInitStringEx routine initializes a counted string of 8-bit characters.
DestinationString [out]A pointer to the STRING structure to be initialized. The Ntdef.h header file defines this structure to be identical to the ANSI_STRING structure.
SourceString [in, optional]A pointer to a null-terminated character string. This string is used to initialize the counted string pointed to by DestinationString.
Returns STATUS_NAME_TOO_LONG if the SourceString is too long. Otherwise, this routine returns STATUS_SUCCESS.
This routine initializes a counted character string.
The routine copies the SourceString pointer value to the Buffer member of the STRING structure pointed to by DestinationString. The Length member of this structure is set to the length, in bytes, of the source string, excluding the terminating null. The MaximumLength member of the structure is set to the length, in bytes, of the source string, including the terminating null. If SourceString is NULL, Length and MaximumLength are both set to zero.
RtlInitStringEx does not alter the source string pointed to by SourceString.
Callers of RtlInitStringEx 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 IRQL > PASSIVE_LEVEL.
The RtlInitStringEx routine initializes a counted string of 8-bit characters.
DestinationString [out]A pointer to the STRING structure to be initialized. The Ntdef.h header file defines this structure to be identical to the ANSI_STRING structure.
SourceString [in, optional]A pointer to a null-terminated character string. This string is used to initialize the counted string pointed to by DestinationString.
Returns STATUS_NAME_TOO_LONG if the SourceString is too long. Otherwise, this routine returns STATUS_SUCCESS.
This routine initializes a counted character string.
The routine copies the SourceString pointer value to the Buffer member of the STRING structure pointed to by DestinationString. The Length member of this structure is set to the length, in bytes, of the source string, excluding the terminating null. The MaximumLength member of the structure is set to the length, in bytes, of the source string, including the terminating null. If SourceString is NULL, Length and MaximumLength are both set to zero.
RtlInitStringEx does not alter the source string pointed to by SourceString.
Callers of RtlInitStringEx 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 IRQL > PASSIVE_LEVEL.