I have a known function type definition of wintypes.HANDLE, wintypes.LPVOID with a return value of wintypes.DWORD.
Using ctypes I've defined the type and function and tried to make the call with a handle and lpvoid reference:
ftype = CFUNCTYPE(wintypes.HANDLE, wintypes.LPVOID, wintypes.DWORD)
function = ftype(address)
base = wintypes.LPVOID(0x0)
ptr = function(GetCurrentProcess(), byref(base))
However, when executing I receive an error:
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
Can someone please help me identify the problem?
What type should I be passing, if not the defined lpvoid?
byref(base)would bevoid **. Wouldn't you just passbase?argument 2: <class 'TypeError'>: wrong type