mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
fix SIZE_T definition to ctypes.c_size_t + fix MessageAttribute._get_required_buffer_size
This commit is contained in:
@@ -22,7 +22,7 @@ TYPE_EQUIVALENCE = [
|
||||
('BYTE', 'c_ubyte'),
|
||||
('PWSTR', 'LPWSTR'),
|
||||
('PCWSTR', 'LPWSTR'),
|
||||
('SIZE_T', 'c_ulong'),
|
||||
('SIZE_T', 'c_size_t'),
|
||||
('PSIZE_T', 'POINTER(SIZE_T)'),
|
||||
('PVOID', 'c_void_p'),
|
||||
('PPS_POST_PROCESS_INIT_ROUTINE', 'PVOID'),
|
||||
|
||||
+3
-1
@@ -57,8 +57,10 @@ class MessageAttribute(gn.ALPC_MESSAGE_ATTRIBUTES):
|
||||
res = gn.DWORD()
|
||||
try:
|
||||
windows.winproxy.AlpcInitializeMessageAttribute(flags, None, 0, res)
|
||||
except windows.generated_def.ntstatus.NtStatusException:
|
||||
except windows.generated_def.ntstatus.NtStatusException as e:
|
||||
# Buffer too small: osef
|
||||
return res.value
|
||||
return res.value
|
||||
|
||||
|
||||
class AlpcPORT(object):
|
||||
|
||||
@@ -7,7 +7,7 @@ from windef import *
|
||||
BYTE = c_ubyte
|
||||
PWSTR = LPWSTR
|
||||
PCWSTR = LPWSTR
|
||||
SIZE_T = c_ulong
|
||||
SIZE_T = c_size_t
|
||||
PSIZE_T = POINTER(SIZE_T)
|
||||
PVOID = c_void_p
|
||||
PPS_POST_PROCESS_INIT_ROUTINE = PVOID
|
||||
|
||||
Reference in New Issue
Block a user