Archived

This topic is now archived and is closed to further replies.

doctorsixstring

Derived classes in DLLs

Recommended Posts

I am starting a new project here at work, and I want to make it as extendable as possible. To this end, I want to be able to implement a system where I have multiple DLLs, each containing a class derived from some base class the has been declared in my program. In the main app, there will be a class "CDevice". This class will be pretty simple, and not have many functions: a constructor, a destructor, and an update function. I want to be able to write DLLs that contain classes that are derived from CDevice. Eventually, I will have it so that all DLL files in a given folder are loaded into my program to provide various types of devices which can be manipulated by the program. I would be very happy to see links/code/tidbits of knowledge on DLLs that contain classes (specifically derived classes). Thanks! -Mike

Share this post


Link to post
Share on other sites
Just make sure that you have a __stdcall function to create an instance of the derived class. Otherwise, just write it like any other DLL ( or program, for that matter )

Share this post


Link to post
Share on other sites