why ctypes+dll gives a strange result

oyster lepto.python at gmail.com
Sun Nov 11 12:21:25 CET 2007

you can download the files at
the dll and exe are created by freebasic

import ctypes

_TwoTimes=getattr(mydll,'TWOTIMES at 8')
def TwoTimes(i):
        return _TwoTimes(i)

in fact, twotimes function return double*2, but when I use
print TwoTimes(10)
in python, I get 2226880

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071111/181a9eb3/attachment.html>

More information about the Python-list mailing list