mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Add winproxy.is_implemented
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
V0.3:
|
||||
|
||||
* NtStatusException is now a WindowsError
|
||||
* Add shr/shl RM32(64)/Imm8
|
||||
* Small fix simple_x64 Imm8 encoding
|
||||
* `execute_64bits_code_from_syswow` able to return ULONG64
|
||||
* utils.get_short_path / utils.get_long_path
|
||||
* Object returned by `windows.native_exec.create_function` has an attribute `code_addr` with the address of the executable code
|
||||
* add `windows.winproxy.is_implemented` Ex: windows.winproxy.is_implemented(windows.winproxy.QueryWorkingSetEx)
|
||||
+8
-1
@@ -9,6 +9,13 @@ from windows.generated_def.ntstatus import NtStatusException
|
||||
from windows.dbgprint import dbgprint
|
||||
|
||||
|
||||
def is_implemented(winfunc):
|
||||
try:
|
||||
winfunc.force_resolution()
|
||||
except ExportNotFound:
|
||||
return False
|
||||
return True
|
||||
|
||||
class Kernel32Error(WindowsError):
|
||||
def __new__(cls, func_name):
|
||||
win_error = ctypes.WinError()
|
||||
@@ -83,7 +90,7 @@ def error_ntstatus(func_name, result, func, args):
|
||||
return args
|
||||
|
||||
|
||||
class ExportNotFound(AttributeError):
|
||||
class ExportNotFound(RuntimeError):
|
||||
def __init__(self, func_name, api_name):
|
||||
self.func_name = func_name
|
||||
self.api_name = api_name
|
||||
|
||||
Reference in New Issue
Block a user