-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy path_winapi.pyi
More file actions
134 lines (129 loc) · 4.33 KB
/
_winapi.pyi
File metadata and controls
134 lines (129 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import sys
from typing import Any, NoReturn, Sequence, Tuple, overload
from typing_extensions import Literal
CREATE_NEW_CONSOLE: int
CREATE_NEW_PROCESS_GROUP: int
DUPLICATE_CLOSE_SOURCE: int
DUPLICATE_SAME_ACCESS: int
ERROR_ALREADY_EXISTS: int
ERROR_BROKEN_PIPE: int
ERROR_IO_PENDING: int
ERROR_MORE_DATA: int
ERROR_NETNAME_DELETED: int
ERROR_NO_DATA: int
ERROR_NO_SYSTEM_RESOURCES: int
ERROR_OPERATION_ABORTED: int
ERROR_PIPE_BUSY: int
ERROR_PIPE_CONNECTED: int
ERROR_SEM_TIMEOUT: int
FILE_FLAG_FIRST_PIPE_INSTANCE: int
FILE_FLAG_OVERLAPPED: int
FILE_GENERIC_READ: int
FILE_GENERIC_WRITE: int
GENERIC_READ: int
GENERIC_WRITE: int
INFINITE: int
NMPWAIT_WAIT_FOREVER: int
NULL: int
OPEN_EXISTING: int
PIPE_ACCESS_DUPLEX: int
PIPE_ACCESS_INBOUND: int
PIPE_READMODE_MESSAGE: int
PIPE_TYPE_MESSAGE: int
PIPE_UNLIMITED_INSTANCES: int
PIPE_WAIT: int
PROCESS_ALL_ACCESS: int
PROCESS_DUP_HANDLE: int
STARTF_USESHOWWINDOW: int
STARTF_USESTDHANDLES: int
STD_ERROR_HANDLE: int
STD_INPUT_HANDLE: int
STD_OUTPUT_HANDLE: int
STILL_ACTIVE: int
SW_HIDE: int
WAIT_ABANDONED_0: int
WAIT_OBJECT_0: int
WAIT_TIMEOUT: int
def CloseHandle(__handle: int) -> None: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: Literal[False] = ...) -> None: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: bool) -> Overlapped | None: ...
def CreateFile(
__file_name: str,
__desired_access: int,
__share_mode: int,
__security_attributes: int,
__creation_disposition: int,
__flags_and_attributes: int,
__template_file: int,
) -> int: ...
def CreateJunction(__src_path: str, __dst_path: str) -> None: ...
def CreateNamedPipe(
__name: str,
__open_mode: int,
__pipe_mode: int,
__max_instances: int,
__out_buffer_size: int,
__in_buffer_size: int,
__default_timeout: int,
__security_attributes: int,
) -> int: ...
def CreatePipe(__pipe_attrs: Any, __size: int) -> Tuple[int, int]: ...
def CreateProcess(
__application_name: str | None,
__command_line: str | None,
__proc_attrs: Any,
__thread_attrs: Any,
__inherit_handles: bool,
__creation_flags: int,
__env_mapping: dict[str, str],
__current_directory: str | None,
__startup_info: Any,
) -> Tuple[int, int, int, int]: ...
def DuplicateHandle(
__source_process_handle: int,
__source_handle: int,
__target_process_handle: int,
__desired_access: int,
__inherit_handle: bool,
__options: int = ...,
) -> int: ...
def ExitProcess(__ExitCode: int) -> NoReturn: ...
if sys.version_info >= (3, 7):
def GetACP() -> int: ...
def GetFileType(handle: int) -> int: ...
def GetCurrentProcess() -> int: ...
def GetExitCodeProcess(__process: int) -> int: ...
def GetLastError() -> int: ...
def GetModuleFileName(__module_handle: int) -> str: ...
def GetStdHandle(__std_handle: int) -> int: ...
def GetVersion() -> int: ...
def OpenProcess(__desired_access: int, __inherit_handle: bool, __process_id: int) -> int: ...
def PeekNamedPipe(__handle: int, __size: int = ...) -> Tuple[int, int] | Tuple[bytes, int, int]: ...
@overload
def ReadFile(handle: int, size: int, overlapped: Literal[True]) -> Tuple[Overlapped, int]: ...
@overload
def ReadFile(handle: int, size: int, overlapped: Literal[False] = ...) -> Tuple[bytes, int]: ...
@overload
def ReadFile(handle: int, size: int, overlapped: int | bool) -> Tuple[Any, int]: ...
def SetNamedPipeHandleState(
__named_pipe: int, __mode: int | None, __max_collection_count: int | None, __collect_data_timeout: int | None
) -> None: ...
def TerminateProcess(__handle: int, __exit_code: int) -> None: ...
def WaitForMultipleObjects(__handle_seq: Sequence[int], __wait_flag: bool, __milliseconds: int = ...) -> int: ...
def WaitForSingleObject(__handle: int, __milliseconds: int) -> int: ...
def WaitNamedPipe(__name: str, __timeout: int) -> None: ...
@overload
def WriteFile(handle: int, buffer: bytes, overlapped: Literal[True]) -> Tuple[Overlapped, int]: ...
@overload
def WriteFile(handle: int, buffer: bytes, overlapped: Literal[False] = ...) -> Tuple[int, int]: ...
@overload
def WriteFile(handle: int, buffer: bytes, overlapped: int | bool) -> Tuple[Any, int]: ...
class Overlapped:
event: int
def GetOverlappedResult(self, __wait: bool) -> Tuple[int, int]: ...
def cancel(self) -> None: ...
def getbuffer(self) -> bytes | None: ...