writing to windows memory

Thomas Heller theller at python.net
Thu Apr 3 08:41:07 EST 2003


vector <Vector180W at netscape.net> writes:

> newbie:
> pythonwin 2.2.2
> Id like to bind a button.widget that simply writes a one to windows
> address 440h. any ideas on where to start.(the button stuf is trivial)
> i need to know how to access the address space.

ctypes can do it http://starship.python.net/crew/theller/ctypes.html :

from ctypes import c_int

p = c_int.from_address(0x440)

p.value = 100

This would write the value '100' as integer to memory address 0x440.
Of course, for me, it only crashes.

Thomas




More information about the Python-list mailing list