Skip to main content

duplicate_handle_with_access

Function duplicate_handle_with_access 

Source
pub fn duplicate_handle_with_access(
    handle: impl AsHandle,
    access: Access,
) -> Result<OwnedHandle, Error>
Expand description

A second handle to the object handle refers to, in this process, carrying exactly access.

This is duplicate_handle with DuplicateAccess::Chosen and Inheritance::NotInheritable, which is what its documentation says of the access, the narrowing and the errors. Not inheritable by child processes.

ยงErrors

The errors of duplicate_handle.