2OOO, 3 December
NTSYSAPI NTSTATUS NTAPI
NtQuerySystemEnvironmentValue(
IN PUNICODE_STRING VariableName, OUT PWCHAR Value, IN ULONG ValueBufferLength, OUT PULONG RequiredLength OPTIONAL );
Seems not works on NT 4.0 SP6. Control Panel applet query and set System Environment values by Rtl...Environment functions or directly by registry.