DosGetEnv returns the process' environment string in the specified buffer.
#include <os2.h> PULONG BufferLength; PVOID Buffer; APIRET rc; rc = DosGetEnv(BufferLength, Buffer);