ICreateProcessInputs::SetEnvironmentVariable method
Sets a variable in the environment of the created process.
Syntax
HRESULT SetEnvironmentVariable( [in] PCWSTR pszName, [in] PCWSTR pszValue );
Parameters
- pszName [in]
-
A null-terminated string specifying the name of a variable to be set in the environment of the process to be created. This parameter may not be NULL.
- pszValue [in]
-
A null-terminated string specifying the value of the variable to be set in the environment of the process to be created. his parameter may not be NULL.
Return value
S_OK if the method succeeds. Otherwise, an HRESULT error code.
Remarks
If a variable with the same name already exists in the environment of the created process, it is replaced.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also
Show: