mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[_winapi] Add missing functions (#15132)
This commit is contained in:
@@ -1,14 +1,3 @@
|
||||
# ============================================
|
||||
# TODO: Allowlist entries that should be fixed
|
||||
# ============================================
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
_winapi.CreateFileMapping
|
||||
_winapi.MapViewOfFile
|
||||
_winapi.OpenFileMapping
|
||||
_winapi.VirtualQuerySize
|
||||
|
||||
|
||||
# ============================================
|
||||
# Modules that do not exist on Windows systems
|
||||
# ============================================
|
||||
|
||||
@@ -192,6 +192,9 @@ if sys.platform == "win32":
|
||||
template_file: int,
|
||||
/,
|
||||
) -> int: ...
|
||||
def CreateFileMapping(
|
||||
file_handle: int, security_attributes: int, protect: int, max_size_high: int, max_size_low: int, name: str, /
|
||||
) -> int: ...
|
||||
def CreateJunction(src_path: str, dst_path: str, /) -> None: ...
|
||||
def CreateNamedPipe(
|
||||
name: str,
|
||||
@@ -235,6 +238,9 @@ if sys.platform == "win32":
|
||||
def GetModuleFileName(module_handle: int, /) -> str: ...
|
||||
def GetStdHandle(std_handle: int, /) -> int: ...
|
||||
def GetVersion() -> int: ...
|
||||
def MapViewOfFile(
|
||||
file_map: int, desired_access: int, file_offset_high: int, file_offset_low: int, number_bytes: int, /
|
||||
) -> int: ...
|
||||
def OpenProcess(desired_access: int, inherit_handle: bool, process_id: int, /) -> int: ...
|
||||
def PeekNamedPipe(handle: int, size: int = 0, /) -> tuple[int, int] | tuple[bytes, int, int]: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
@@ -251,6 +257,7 @@ if sys.platform == "win32":
|
||||
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 VirtualQuerySize(address: int, /) -> int: ...
|
||||
def WaitForMultipleObjects(handle_seq: Sequence[int], wait_flag: bool, milliseconds: int = 0xFFFFFFFF, /) -> int: ...
|
||||
def WaitForSingleObject(handle: int, milliseconds: int, /) -> int: ...
|
||||
def WaitNamedPipe(name: str, timeout: int, /) -> None: ...
|
||||
@@ -281,6 +288,8 @@ if sys.platform == "win32":
|
||||
def ResetEvent(event: int) -> None: ...
|
||||
def SetEvent(event: int) -> None: ...
|
||||
|
||||
def OpenFileMapping(desired_access: int, inherit_handle: bool, name: str, /) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ...
|
||||
def NeedCurrentDirectoryForExePath(exe_name: str, /) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user