Function winsafe::GetEnvironmentStrings[][src]

pub fn GetEnvironmentStrings() -> WinResult<HashMap<String, String>>
Expand description

GetEnvironmentStrings function.

Returns the parsed strings, and automatically frees the retrieved environment block with FreeEnvironmentStrings.

Examples

Retrieving and printing the key/value pairs of all environment strings:

use winsafe::GetEnvironmentStrings;

let env_vars = GetEnvironmentStrings()?;
for (k, v) in env_vars.iter() {
    println!("{} = {}", k, v);
}