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.
How To Create An Object To A Class Present In A Dll ?
How to fix .dll or .ocx errors: download .dll or .ocx files for free at dll-download-system.com
How to fix .sys errors: Files .sys information file is windows driver file.Driver Genius 9 will keep your system up to date by automatically find drivers that your system can't, automatically getting the latest drivers from your hardware's manufacturer. It's professional driver management tool that can back-up, restore, update, remove and find new drivers for your PC.
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?