stephenteh
December 1st, 2006, 06:42 AM
Hi,
I have a question global variable sharing (I'm a beginner of C++). I have 2 projects, one is exe another is dll. The dll will be loaded by the exe. I have a global variable in the exe let say variable A, is it possible for the dll to use this variable? I cannot use the extern as it's in difference project. I think the dll should be able to use this variable as the dll is loaded by the exe that's mean there are in the same process space or same memory space. I just need a way to let the dll know there is such variable in the exe project.
btw, the dll will be dynamically loaded by the exe not statically linked during compile...
Thanks in advance
I have a question global variable sharing (I'm a beginner of C++). I have 2 projects, one is exe another is dll. The dll will be loaded by the exe. I have a global variable in the exe let say variable A, is it possible for the dll to use this variable? I cannot use the extern as it's in difference project. I think the dll should be able to use this variable as the dll is loaded by the exe that's mean there are in the same process space or same memory space. I just need a way to let the dll know there is such variable in the exe project.
btw, the dll will be dynamically loaded by the exe not statically linked during compile...
Thanks in advance