Back to Wsl

WslcSetProcessSettingsEnvVariables

doc/docs/api-reference/c/process-apis/wslcsetprocesssettingsenvvariables.md

2.9.4555 B
Original Source

WslcSetProcessSettingsEnvVariables

c
STDAPI WslcSetProcessSettingsEnvVariables(_In_ WslcProcessSettings* processSettings, _In_reads_(argc) PCSTR const* key_value, size_t argc);
ParameterTypeDirection
processSettingsWslcProcessSettings*in
key_valuePCSTR const*in
argcsize_tin

Return value: HRESULT.

Example:

c
PCSTR const key_value[] = { "HOME=/root", "DEMO_FLAG=1" };
HRESULT hr = WslcSetProcessSettingsEnvVariables(&processSettings, key_value, _countof(key_value));