Function winsafe::LookupAccountName

source ·
pub fn LookupAccountName(
    system_name: Option<&str>,
    account_name: &str
) -> SysResult<(String, SidGuard, SID_NAME_USE)>
Available on crate feature kernel only.
Expand description

LookupAccountName function.

Returns account’s domain name, SID and type, respectively.

§Examples

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

let user_name = w::GetUserName()?;
let (domain_name, sid, kind) = w::LookupAccountName(None, &user_name)?;