Windows memory pointers in Python?

Gregory Piñero gregpinero at gmail.com
Wed Oct 12 12:04:08 EDT 2005


Hi guys,

I'm really lost of on this one. How can I turn this (VB?) code into Python?
Basically I call a function exposed from a dll and it returns me what I
believe is a pointer to a location in memory? Now I need to read that area
to get the string I need. This link has the solution but it is written in
VB:
http://www.contactreview.com/mb/showflat.php/Cat/0/Number/15670/an/0/page/14(it's
the third post down)

I have to think Python would have something similiar.

Below is my relevant source code just in case you need that too.

I really appriciate any help anyone might have.

--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com <http://www.blendedtechnologies.com>)

#---My code: (testing the GOLDMINE API)
from ctypes import *
windll.LoadLibrary('GM6S32.dll')
windll.GM6S32.GMW_LoadBDE('J:\\','J:\\GMBase\\',r'J:\\Common\\','user','pw')
windll.GM6S32.GMW_NV_SetValue(container,"AccountNo", "(310)555-1212")
#finally, I call a function to see what I stored:
windll.GM6S32.GMW_NV_GetValue(container, "AccountNo", "'(none)'")
#it returns 16236360
#Now I need to access the string related to this somewhere ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051012/5e60ddde/attachment.html>


More information about the Python-list mailing list