Advertisement Jump to content
Sign in to follow this  

DLL Symbols Entity Framework

This topic is 1742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm not wanting to get full type information or anything crazy. I just am interested in creating a data driven design for my entities. Thing is I have NO idea how to get an enumeration of the DLL function names in Windows. I'm looking at stuff like DbgHelp and other stuff, but the documentation is pretty poor and I'm having a hard time figuring out how to enumerate it.


What I'm trying to do:

class GameComponent
virtual void XMLSave(XMLDocument& doc,XMLElement* parent) = 0;
virtual GameComponent* XMLLoad(XMLElement* node) = 0;
virtual const int TypeID() = 0;
virtual const char* Name() = 0;
virtual void Update(){}
virtual void Initialize(){}

Idea is a search through the symbol list when the engine initializes so that I can build a list of XMLSave, XMLLoad functions without having to hard code a static list of them. Also will allow me to be able to make additional dlls in the future and extend it.

class GameComponentFactory
map<const char*,delegate<GameComponent*(XMLElement*)>> ComponentLoadMap;
void Initialize(const char* dllPath);
Scene* LoadXMLFile(const char* path);

void GameObjectFactory::Initialize(const char* dllPath)
      How do you load the table?
   vector<string> enumerations = LoadDLLExportTable(dllPath);

      Determine if class is derived from GameComponent ...
      if so add to the map functions that belong to the main game loop
      and xml load / save files.
      I've read papers that said they've done this ... I just have no clue how.

Scene* GameComponentFactory::LoadXMLFile(const char* path)
   Psuedo-code would need to be much more safe
   XMLDocument doc;
Scene* scene = ResourceManager::NewScene();
for(auto obj = doc->FirstChildElement();obj;obj->NextSiblingElement())
   GameObject* go = new GameObject(obj->Name());
   for(auto component = obj->FirstChildElement();component;component->NextSiblingElement())
  return scene;
Edited by ChaseRLewis

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!