I have a method define in C/C++ DLL that takes 2 args
void SetLines(char** args,int argCount);
I need to call it from Python, what is the proper way to do so.
from ctypes import *
path="test.dll"
lib = cdll.LoadLibrary(path)
Lines=["line 2","line 2"]
lib.SetLines(Lines,len(lines))
print(code)
Excuting the Python code gives the following error:
Traceback (most recent call last):
File "<test.py>", line 6, in <module>
ctypes.ArgumentError: argument 1: <class 'TypeError'>: Don't know how to convert parameter 1
ctypesconversion for the list of strings. If you find the Answer, you could write it so new comers can find it