2OOO, 3 December
NTSYSAPI NTSTATUS NTAPI
RtlExpandEnvironmentStrings_U(
IN PVOID Environment OPTIONAL, IN PUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString, OUT PULONG DestinationBufferLength OPTIONAL );
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.