Calling convention: Assembly Programmer -> GOD "As to do everything by itself, he is the creator, he creates the atoms, don’t heaven know that exist some other creatures below him.” :suss: C/C++ Programmer -> SEMIGOD “He moves among two worlds, he can cast himself from God to Human and, with is * (pointer) he can create and destroy. He worships GODS and tolerate humans” :cool: C# and Java Programmer -> MALE HUMAN “They create, don’t manage resources, make garbage and don’t even care to clean up. They make the world ugly.” :-D VB -> FEMALE HUMAN “They don’t plan, just care about how they look. Sometimes are used by c/c++ and c#/Java programmers………….. :)” :~ Pedro Miranda != NULL
Pedro Miranda
Posts
-
What should C++ programmers be called -
How to use one instance of a COM object in different processes?Hi, I’m sorry but I did not fully understand your question? You want to use the some instance of a COM object in different processes or different threads in the same process? If you want to pass a pointer to a object to another thread in a running process you have to be aware of the COM Threading Model (Apartments) and Marshalling see http://www.codeguru.com/activex/COMApartments1.html and http://www.codeguru.com/activex/COMApartments2.html . . If you really want different processes to access the same COM object, then this last has to be implemented in a out-process (.exe) COM server having the class factory returning the same object every time a instance of that class is requested. Remember that using an out-process com server you’ll be linking whit a proxy/stub dll (Marshalling). http://www.codeguru.com/activex/MiniDcom.html I recommend you reading Essential COM (Don Box), ATL Internals (Brent Rector) and Learning DCOM (Thuan L. Thai)