[New-bugs-announce] [issue43170] wintypes.SIZE is 8bytes on 32 bit machines

Noah Steinberg report at bugs.python.org
Mon Feb 8 16:02:02 EST 2021


New submission from Noah Steinberg <noahnsteinberg at gmail.com>:

Noticed while debugging a problem with a test running on Windows 10 x86 that sizeof(wintypes.SIZE)==8 when I believe it should be 4. While using 

kernel32.CreateRemoteThread.argtypes = [wintypes.HANDLE, wintypes.LPCVOID, wintypes.DWORD, wintypes.LPCVOID, wintypes.LPCVOID, wintypes.DWORD, wintypes.LPDWORD] 

and  

kernel32.CreateRemoteThread(h_process, 0, 0, 0xbadadd, 0, 4, byref(thread_id))

It caused CreateRemoteThread to recieve 4 as the last argument, resulting in an access denied

----------
components: ctypes
messages: 386666
nosy: nnstein
priority: normal
severity: normal
status: open
title: wintypes.SIZE is 8bytes on 32 bit machines
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43170>
_______________________________________


More information about the New-bugs-announce mailing list