LP_c_double is dynamically created by ctypes when a pointer to double is created. i.e.
LP_c_double = POINTER(c_double)
At this point, you created type C. Now you can instantiate these pointers.
my_pointer_one = LP_c_double()
But here is the kicker. Your function does not expect a pointer to double. He expects an array of doubles. In C, an array of type X is represented by a pointer (of type X) to the first element in this array.
In other words, in order to create a double pointer suitable for passing your function, you really need to allocate an array of doubles of some finite size (the documentation for ReturnPulse should indicate how much to allocate), and then pass this element directly (do not drop, do not remove the link) .
i.e.
size = GetSize()
Now five arrays should be populated with the values โโreturned by ReturnPulse.
source share