Code: Alles auswählen
In [1]: import ctypes as ct
In [2]: ct.c_double * 8
Out[2]: <class '__main__.c_double_Array_8'>
Code: Alles auswählen
In [1]: import ctypes as ct
In [2]: ct.c_double * 8
Out[2]: <class '__main__.c_double_Array_8'>
Code: Alles auswählen
from ctypes import *
c_double_p = POINTER(c_double)
test = windll.LoadLibrary("test.dll");
# call the functions in the dll
def A(B,C): # wobei C ein double array mit 8 argumenten ist
A = test.A_BC #select function in dll
A.argtypes = [c_double_p,ctypes.c_double * 8] # input to double
A.restype = c_double_p
B = c_double(B)
# return value to console
return A(byref(B), byref(class '__main__.c_double_Array_8'))