import typing
from System.Runtime.InteropServices import CriticalHandle, SafeHandle

class CriticalHandleMinusOneIsInvalid(CriticalHandle):
    @property
    def IsClosed(self) -> bool: ...
    @property
    def IsInvalid(self) -> bool: ...


class CriticalHandleZeroOrMinusOneIsInvalid(CriticalHandle):
    @property
    def IsClosed(self) -> bool: ...
    @property
    def IsInvalid(self) -> bool: ...


class SafeFileHandle(SafeHandleZeroOrMinusOneIsInvalid):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, preexistingHandle: int, ownsHandle: bool) -> None: ...
    @property
    def IsAsync(self) -> bool: ...
    @property
    def IsClosed(self) -> bool: ...
    @property
    def IsInvalid(self) -> bool: ...


class SafeHandleMinusOneIsInvalid(SafeHandle):
    @property
    def IsClosed(self) -> bool: ...
    @property
    def IsInvalid(self) -> bool: ...


class SafeHandleZeroOrMinusOneIsInvalid(SafeHandle):
    @property
    def IsClosed(self) -> bool: ...
    @property
    def IsInvalid(self) -> bool: ...


class SafeWaitHandle(SafeHandleZeroOrMinusOneIsInvalid):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, existingHandle: int, ownsHandle: bool) -> None: ...
    @property
    def IsClosed(self) -> bool: ...
    @property
    def IsInvalid(self) -> bool: ...

