I am trying to use a C++ library in my python app. I can load the dll in python but could not find any solution on how to create an instance of a class that is inside that c++ dll and invoke methods on that onject.
Following is what I did and want
C++ code inside My.dll
class MyClass
{
public:
MyMethod(int param);
}
Python code
from ctypes import *
myDll = windll.LoadLibrary("My.dll")
I want to do the following
myClassInstance = myDll.InstantiateMyClass()
myClassInstance.MyMethod(5)