firehazard 0.0.0-2022-09-10

Unopinionated low level API bindings focused on soundness, safety, and stronger types over raw FFI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// \[[docs.microsoft.com](https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-istokenrestricted)\] IsTokenRestricted
///
/// ### Example
/// ```
/// # use firehazard::*;
/// let token : token::OwnedHandle = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap();
/// assert!(!is_token_restricted(&token));
/// ```
pub fn is_token_restricted(token: &crate::token::OwnedHandle) -> bool {
    use crate::*;
    0 != unsafe { winapi::um::securitybaseapi::IsTokenRestricted(token.as_handle()) }
}