Function winsafe::GetEnvironmentStrings

source ·
pub fn GetEnvironmentStrings() -> SysResult<Vec<(String, String)>>
Available on crate feature kernel only.
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::{self as w, prelude::*};

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