windows::Win32::Security

Function DuplicateTokenEx

pub unsafe fn DuplicateTokenEx(
    hexistingtoken: HANDLE,
    dwdesiredaccess: TOKEN_ACCESS_MASK,
    lptokenattributes: Option<*const SECURITY_ATTRIBUTES>,
    impersonationlevel: SECURITY_IMPERSONATION_LEVEL,
    tokentype: TOKEN_TYPE,
    phnewtoken: *mut HANDLE,
) -> Result<()>