Dynamically create object of DLLs form Factory - C++ -


hi have 6 projects defined in ide.

  1. eventhelper
  2. configparser
  3. officeeventhandler
  4. messaging
  5. loggingandpersistence
  6. screencamera

eventhelper has entry point. rest of projects dll gets absorbed eventhelper.
messaging , configparser being used in every other dlls well. code loading dlls , acessing common in modules (code redundancy).

dllhandle_parser = ::loadlibrary(text("configparser.dll"));  if (!dllhandle_parser){     return; }  configparserclient_fctry = reinterpret_cast<configparser>(::getprocaddress(dllhandle_parser, "getparserinstance"));  if (!configparserclient_fctry) {     ::freelibrary(dllhandle_parser);     return; }  parser = configparserclient_fctry(); 

and similar code messaging

my question is there way can have 1 dll called objectfactory can give name of class (in runtime, in string format) created. objectfactory.getinstance("configparser/messaging"). (java class.forname("classname"))

or if not possible way, suggested architecture?


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -