COM object and global pointers [modified]
-
I have an MFC based dialog exe (VS2005 just one dialog) it has some global pointers which are initialized when the exe starts up. I added an ATL COM object to the project (enabled ATL support) now i call methods on this COM object through another process, everything goes on fine but in the called methods the global pointers appear NULL, seems the like the COM object is created in some other context can someone shed more light into this. [Edit] OK i just found out that even if the EXE is running windows still runs it one more time with arguments(/Embedded) this completely screws up my design (which is apparently flawed) is there some way out? [/Edit] Thanks.
C++ where friends have access to your private members !
modified on Tuesday, January 08, 2008 5:31:20 AM
-
I have an MFC based dialog exe (VS2005 just one dialog) it has some global pointers which are initialized when the exe starts up. I added an ATL COM object to the project (enabled ATL support) now i call methods on this COM object through another process, everything goes on fine but in the called methods the global pointers appear NULL, seems the like the COM object is created in some other context can someone shed more light into this. [Edit] OK i just found out that even if the EXE is running windows still runs it one more time with arguments(/Embedded) this completely screws up my design (which is apparently flawed) is there some way out? [/Edit] Thanks.
C++ where friends have access to your private members !
modified on Tuesday, January 08, 2008 5:31:20 AM
Monty2 wrote:
is there some way out?
Of what? We don't know what problem you are trying to solve. If you require interprocess communications I would not suggest COM as a solution, it is far to complex for most IPC requirements. But, I really don't know what problem you are trying to solve so that may not help you at all.