I'm working on a project in MSVC++ 2012, and I'm trying to split it up into smaller parts. Currently, the dependencies looks something like this:
output.exe --- deploy.dll --- coreext.dll
|
|-- physical.dll --- coreext.dll
|
|-- renderer.dll --- physical.dll --- coreext.dll
| |
| |-- coreext.dll
|
|-- engine.dll ----- physical.dll --- coreext.dll
|
|-- coreext.dll
I have a bit of global data that gets changed in "physical.dll" but it seems that this change doesn't apply to all instances of physical.dll. The value changes at the "deploy.dll" level, but not at the "engine.dll" level. Currently, I'm using implicit linking. There are three more layers of dependencies in the actual output, but I'm just working on these parts here for now.
For the life of me, I cannot seem to figure out how to pass the data around to the proper level either. I put a function in renderer.dll and engine.dll to set the global data, but when going line-by-line with the debugger, it isn't a valid pointer once it goes in - probably some virtual address thing?
I saw this, which gave me the impression this shouldn't be an issue. Then this lead me to this, which I'm reading and trying to wrap my head around it. This is my first time doing this in Windows, and I get the feeling that I'm approaching this sort of design all wrong.
I don't want to do a large load of dumpbin and GetProcAddress()'s as there's thousands of functions to go through, and that would be a pain to maintain (but still automatable I suppose) and the code is nowhere as clean. Besides changing all my DLLs to a collection of OBJ files and linking those - which works, but puts me back where I was - how can I get this working?