7 ms·
A safe API would look a lot like Windows' GetEnvironmentVariable and SetEnvironmentVariable https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winb
by ChrisSD 2y ago
A safe API would look a lot like Windows' GetEnvironmentVariable and SetEnvironmentVariable
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getenvironmentvariable https://learn.microsoft.com/en-us/windows/win32/api/winbase/...
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable https://learn.microsoft.com/en-us/windows/win32/api/winbase/...
- wahern 2y agoYep. GetEnvironmentStrings and FreeEnvironmentStrings are probably even more noteworthy as they seem to substitute for an exposed environ array, though they push more effort to the application.