I all, I have a win32 application and several DLLs that must use a global variable. In each dll I put
extern MYTYPE* myvariable = NULL;
and in the main program I have
MYTYPE* myvariable = NULL;
mavariable = new MYTYPE();
....
now, when the DLLs are loaded myvariable is NULL and I cannot use it. How can I share the instance of the main program with all the DLLs?