I'm trying to export a Class within a DLL and use it in Python. So lets say my class is called MyClass, and to use it I need to make an instance with a method called getupdate() which looks like this :
MyClass* MyClass::getupdate()
{
if(update==NULL)
{
update = new MyClass();
}
return update;
}
So after compiling the dll, I load it in a Python script using ctypes module, like this :
from ctypes import *
win = WinDLL('MyDLL')
And here I don't know how to create an instance of MyClass like we can do simply in C++ :
MyClass* update;
update = MyClass::getupdate();
I need to have a pointer to MyClass in Python and access the rest of methods within this pointer.
Thank you in advance for you help.