In my VC++ win32 application,I was successful in loading a dll and also successful in using the methods of it directly.
But my present problem lies in creating objects to the classes that are present in that dll and accessing the methods in that class through the created object.
kindly provide me any sample code which does this.
thnx in advance.
Regards,
sunny.
i think the proper way to do this is to export only a factory function in the DLL, not the class itself.
DLLEXPORT myclass *factory();
myclass *factory()
{
return new myclass;
}
in your application, load the dll, load the factory-function and use it to create the object.
read this article … http://www.codeproject.com/dll/SimpleDll…
your class in dll is written with C++ of microsoft or another environment?