fix SIZE_T definition to ctypes.c_size_t + fix MessageAttribute._get_required_buffer_size

This commit is contained in:
Clement Rouault
2017-06-08 18:22:24 +02:00
parent 1a7e342318
commit ae5a211613
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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):
+1 -1
View File
@@ -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