ActiveX or Vanilla DLL - Can multiple objects dynamically support the same Interface and be swapped out at run-time?
Posted on 2003-11-13
I am working on an MFC app.
I have created several classes with the same name and public methods, though each implement those methods quite differently. For example, lets say that they all have the same method that takes a string input, though each class searches for a different regular expression on that string and returns true or false based on its findings.
I want to be able to load a single instance of one of these objects into my MFC app during run-time, to which the user can pass strings to.
I also want to be able to unload the current instance of this object and reload an instance of one of the other class objects at run-time to allow for the user to search using another regular expression. This way, the application only has to know about the single interface that each class supports and the existence of the dll's or controls from which it can select to load.
I am not sure if I am barking up the wrong tree, or if the simplified example above can be implemented using ActiveX controls or just plain dll's or not.
I want to be able to easily give the user a new Control or dll in the future that will add further functionality.
Will the AtiveX or COM techology work for me in this regard?