xtd 0.2.0
Loading...
Searching...
No Matches

◆ get_environment_variables() [2/2]

static std::map< std::string, std::string > & xtd::environment::get_environment_variables ( environment_variable_target  target)
static

Retrieves all environment variable names and their values from the current process, or from the Windows operating system registry key for the current user or local machine.

Parameters
targetOne of the environment_variable_target values.
Returns
std::map A dictionary that contains all environment variable names and their values from the source specified by the target parameter; otherwise, an empty dictionary if no environment variables are found.
Exceptions
std::invalid_argumenttarget is not a valid environment_variable_target value.
Remarks
The names and values for the environment variables are stored as key-value pairs in the returned std::map.
Todo:
Add xtd::registry and uncomment lines.