T
thomas
in Exe.
----------------
Type* g_pGlobal;
func(){
g_pGlobal->doSth();
}
---------------
in another dll
---------------
func2(){
func()
}
-------------
It compiles ok, but "g_pGlobal" equals 0x000000 when running.
I guess the address space of the dll and exe are different, which
causes the problem.
Can anyone help?
If I set the global variable pointer to a local pointer in the class
holding func(), it works. But modification is supposed to be done to
the dll only.
----------------
Type* g_pGlobal;
func(){
g_pGlobal->doSth();
}
---------------
in another dll
---------------
func2(){
func()
}
-------------
It compiles ok, but "g_pGlobal" equals 0x000000 when running.
I guess the address space of the dll and exe are different, which
causes the problem.
Can anyone help?
If I set the global variable pointer to a local pointer in the class
holding func(), it works. But modification is supposed to be done to
the dll only.