2 from typing import Any, NoReturn, Sequence, overload
3 from typing_extensions import Literal, final
5 CREATE_NEW_CONSOLE: int
6 CREATE_NEW_PROCESS_GROUP: int
7 DUPLICATE_CLOSE_SOURCE: int
8 DUPLICATE_SAME_ACCESS: int
9 ERROR_ALREADY_EXISTS: int
10 ERROR_BROKEN_PIPE: int
13 ERROR_NETNAME_DELETED: int
15 ERROR_NO_SYSTEM_RESOURCES: int
16 ERROR_OPERATION_ABORTED: int
18 ERROR_PIPE_CONNECTED: int
19 ERROR_SEM_TIMEOUT: int
20 FILE_FLAG_FIRST_PIPE_INSTANCE: int
21 FILE_FLAG_OVERLAPPED: int
22 FILE_GENERIC_READ: int
23 FILE_GENERIC_WRITE: int
27 NMPWAIT_WAIT_FOREVER: int
30 PIPE_ACCESS_DUPLEX: int
31 PIPE_ACCESS_INBOUND: int
32 PIPE_READMODE_MESSAGE: int
33 PIPE_TYPE_MESSAGE: int
34 PIPE_UNLIMITED_INSTANCES: int
36 PROCESS_ALL_ACCESS: int
37 PROCESS_DUP_HANDLE: int
38 STARTF_USESHOWWINDOW: int
39 STARTF_USESTDHANDLES: int
42 STD_OUTPUT_HANDLE: int
49 def CloseHandle(__handle: int) -> None: ...
51 def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ...
53 def ConnectNamedPipe(handle: int, overlapped: Literal[False] = ...) -> None: ...
55 def ConnectNamedPipe(handle: int, overlapped: bool) -> Overlapped | None: ...
58 __desired_access: int,
60 __security_attributes: int,
61 __creation_disposition: int,
62 __flags_and_attributes: int,
65 def CreateJunction(__src_path: str, __dst_path: str) -> None: ...
71 __out_buffer_size: int,
72 __in_buffer_size: int,
73 __default_timeout: int,
74 __security_attributes: int,
76 def CreatePipe(__pipe_attrs: Any, __size: int) -> tuple[int, int]: ...
78 __application_name: str | None,
79 __command_line: str | None,
82 __inherit_handles: bool,
83 __creation_flags: int,
84 __env_mapping: dict[str, str],
85 __current_directory: str | None,
87 ) -> tuple[int, int, int, int]: ...
89 __source_process_handle: int,
91 __target_process_handle: int,
92 __desired_access: int,
93 __inherit_handle: bool,
96 def ExitProcess(__ExitCode: int) -> NoReturn: ...
98 if sys.version_info >= (3, 7):
99 def GetACP() -> int: ...
100 def GetFileType(handle: int) -> int: ...
102 def GetCurrentProcess() -> int: ...
103 def GetExitCodeProcess(__process: int) -> int: ...
104 def GetLastError() -> int: ...
105 def GetModuleFileName(__module_handle: int) -> str: ...
106 def GetStdHandle(__std_handle: int) -> int: ...
107 def GetVersion() -> int: ...
108 def OpenProcess(__desired_access: int, __inherit_handle: bool, __process_id: int) -> int: ...
109 def PeekNamedPipe(__handle: int, __size: int = ...) -> tuple[int, int] | tuple[bytes, int, int]: ...
111 def ReadFile(handle: int, size: int, overlapped: Literal[True]) -> tuple[Overlapped, int]: ...
113 def ReadFile(handle: int, size: int, overlapped: Literal[False] = ...) -> tuple[bytes, int]: ...
115 def ReadFile(handle: int, size: int, overlapped: int | bool) -> tuple[Any, int]: ...
116 def SetNamedPipeHandleState(
117 __named_pipe: int, __mode: int | None, __max_collection_count: int | None, __collect_data_timeout: int | None
119 def TerminateProcess(__handle: int, __exit_code: int) -> None: ...
120 def WaitForMultipleObjects(__handle_seq: Sequence[int], __wait_flag: bool, __milliseconds: int = ...) -> int: ...
121 def WaitForSingleObject(__handle: int, __milliseconds: int) -> int: ...
122 def WaitNamedPipe(__name: str, __timeout: int) -> None: ...
124 def WriteFile(handle: int, buffer: bytes, overlapped: Literal[True]) -> tuple[Overlapped, int]: ...
126 def WriteFile(handle: int, buffer: bytes, overlapped: Literal[False] = ...) -> tuple[int, int]: ...
128 def WriteFile(handle: int, buffer: bytes, overlapped: int | bool) -> tuple[Any, int]: ...
132 def GetOverlappedResult(self, __wait: bool) -> tuple[int, int]: ...
133 def cancel(self) -> None: ...
134 def getbuffer(self) -> bytes | None: ...