Indirect Memory Addressing

L

Larry Bates

I need to call a function in a vendor supplied
Windows .DLL file that returns an address that
points to a list of longs. I am able to call
the function and get back the pointer (by
using membuf). Now I need to know how to get
to the data that is pointed to by the address.

from dynwin.windll import membuf
abuf=membuf(4*"\x00)
..
.. Make call to my .DLL function here
..
address=abuf.read()


address contains memory address that points
to the first entry in my list of longs, but
I don't know how to read the contents of that
address (something like peek).

Thanks in advance,
Regards,
Larry Bates
Syscon, Inc.
 
M

Michel Claveau/Hamster

Hi !

Yes : I had the same case (access to variable of other application, via a
long integer pointer).
I had soluce with ctypes and win32 (Mark Hammond extensions).

win32 extension are necessaray, for my case, because I use Python like a
COM-server (for than Python soft and the other application are in the same
memory-space).

Bref : it' run OK


(* sorry for my bad english *)


@-salutations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top