En Sun, 11 Nov 2007 08:21:25 -0300, oyster <[EMAIL PROTECTED]>  
escribi�:

> import ctypes
> mydll=ctypes.windll.LoadLibrary("mydll.dll")
>
> _TwoTimes=getattr(mydll,'[EMAIL PROTECTED]')
> _TwoTimes.argtypes=[ctypes.c_double]
> 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

I think you should declare the result type also, if it's not an integer.
_TwoTimes.restype=ctypes.c_double


-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to