I am trying to access a 32-bit DLL through 64-bit Python. Some functions in a DLL need access to variables through pointers. I do this by first creating a numpy array and then passing its pointer through ctypes as such:
arr = np.array([0], dtype=np.uint32)
my_c_func(arr.ctypes.data)
This works fine on Windows 7, but since upgrading to Windows 10, the memory addresses seem to have changed to 64-bit values. Is there a way to create a 32-bit pointer, or alternatively convert a 64-bit pointer to a 32-bit pointer?
source
share