#ifndef _NTRTL_H
NTSYSAPI
NTSTATUS
NTAPI
RtlExpandEnvironmentStrings_U(
_In_opt_ PVOID Environment,
_In_ PUNICODE_STRING Source,
_Inout_ PUNICODE_STRING Destination,
_Out_opt_ PULONG ReturnedLength
);
View code on GitHub
Pointer to environment block.
Pointer to UNICODE_STRING
structure with text. If text contains any environment variable name separated with '%' character, variable name is replaced by value of this variable.
Result of above operation. At input only MaximumLength of UNICODE_STRING
structure must be valid.
If you don't know, how long should be result buffer, use value at DestinationBufferLength
pointer.