Function winsafe::GetPrivateProfileSection

source ·
pub fn GetPrivateProfileSection(
    section_name: &str,
    file_name: &str
) -> SysResult<Vec<(String, String)>>
Available on crate feature kernel only.
Expand description

GetPrivateProfileSection function.

§Examples

Reading all key/value pairs of a section from an INI file:

use winsafe::{self as w, prelude::*};

let pairs = w::GetPrivateProfileSection(
    "MySection",
    "C:\\Temp\\foo.ini",
)?;

for (key, val) in pairs.iter() {
    println!("{} = {}", key, val);
}