Transferring Pointers from Python to dll and get modified values back
Transferring Pointers from Python to dll and get modified values back I am struggeling with the following problem, which is, I guess, not that complicated for people with more advanced C skills. My intention is to access C++ funtions stored in an DLL from Python. I managed to get this running for simple functions as ADD and MULT. As the funtions I'd like to access (later) will return multiple float values I need tu use pointers. I'd like to do the following basic steps: -Create a variable in python, -Transfer the pointer to the dll (ctypes --> c_pointer(...)), -Update the value the pointer is referring to; -go back to python and use the modified value. My C++ funtion I used for dll creation is: #include <stdio.h> #include <wchar.h> #include <iostream> #include <vector> #include <math.h> #include <fstream> using namespace::std; extern "C" { __declspec(dllexport) int Kappel(double a, double *f){ *f = 25.5; return 0; } } // ext...