A question about making modules more modular

Discussion in 'Civ4 - World of Civilization' started by esemjay, Jan 30, 2010.

  1. esemjay

    esemjay Prince

    Jan 24, 2008
    What is the possibility, and pro's/con's of coding the DLL to have a possibility to open other DLL's? Say, for example, you have a unit that you want to have custom actions; rather than updating the MAIN DLL file, it would check to see if the unt has it's own DLL in it's module directory, check to see if it has it's own code for that action, and if so- run that. If the XML dictates to run it before, after, or instead of the default code, it'll do that.

    I'm under the impression that this can be done with "LoadLibrary" and "ReleaseLibrary" functions- but I don't know if it would cause significant overhead or if I've just been away from C++ so long that I don't know what I'm talking about anymore.
  2. johny smith

    johny smith Deity

    Mar 10, 2007
    I asked this before and was told it was not possible. The exe would not allow it I thought was the reason at the time. I am not the best in understanding the SDK as you probably already know.

Share This Page