Repository navigation
Expand file tree
/
Copy pathhandleapi.py
More file actions
50 lines (36 loc) · 1.68 KB
/
Copy pathhandleapi.py
File metadata and controls
50 lines (36 loc) · 1.68 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
"""
*********************************************************************************
* *
* handleapi.h -- ApiSet Contract for api-ms-win-core-handle-l1-1-0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
*********************************************************************************
"""
from . import cpreproc
from .minwindef import *
from .defbase import *
if cpreproc.pragma_once("_APISETHANDLE_"):
kernel32 = get_win_library("kernel32.dll")
kernelbase = get_win_library("kernelbase.dll")
if isinstance(kernelbase, NullLibrary):
kernelbase = kernel32
#
# Constants
#
INVALID_HANDLE_VALUE = HANDLE(-1).value
# REGION *** Application Family or OneCore Family or Games Family ***
#
# Prototypes
#
CloseHandle = declare(kernel32.CloseHandle, BOOL, HANDLE)
DuplicateHandle = declare(kernel32.DuplicateHandle, BOOL, HANDLE, HANDLE, HANDLE, LPHANDLE, DWORD, BOOL, DWORD)
# REGION ***
# REGION *** Application Family or OneCore Family ***
CompareObjectHandles = declare(kernelbase.CompareObjectHandles, BOOL, HANDLE, HANDLE)
# REGION ***
# REGION *** Application Family or OneCore Family or Games Family ***
GetHandleInformation = declare(kernel32.GetHandleInformation, BOOL, HANDLE, LPDWORD)
SetHandleInformation = declare(kernel32.SetHandleInformation, BOOL, HANDLE, DWORD, DWORD)
# REGION ***
# _APISETHANDLE_