"Georgy Pruss" <SEE_AT_THE_END@hotmail.com> writes:
[color=blue]
> How can I call a function which is in a Windows DLL? For example,[/color]
ctypes is your friend
from ctypes import *
If you have t.dll exporting INCREMENT
# load dll
inc = windll.LoadLibrary("t.dll")
# Initiate c-variable for the dll
n=c_int(1)
# Call the dll one
inc.INCREMENT(byref(n))
print "The integer is now: %d" % n.value
# And a few times more:
for i in range(5):
inc.INCREMENT(byref(n))
print "The square of the integer is now: %d" % n.value**2
[color=blue]
> Google didn't help on this.[/color]
???????
http://groups.google.com/groups?hl=e...=Google+Search
--
Brian (remove the sport for mail)
http://www.et.dtu.dk/staff/be