Transfer pointer from dll (c/c++) to python
I have a DLL written in C++ ( it can be rewritten in C ) and python code where I import the DLL with cdll.LoadLibrary()
. Then I specify a function from DLL and it’s agrument types. Then I call the function
which returns double *
. The pointer points to memory allocated somewhere in the heap — the function
does some math and stores the result in 3500 x 8 array ( I allocate memory with new[] and don’t free it in DLL function. I supposed to use that DLL with C++ code so I could free the memory somewhere in it ).