Click here to Skip to main content
15,909,325 members
Home / Discussions / COM
   

COM

 
GeneralCOM/ATL Event problem [modified] Pin
knuttermutter3-Apr-08 0:21
knuttermutter3-Apr-08 0:21 
GeneralEvents from C# to COM dll (C++) Pin
SteinarAa2-Apr-08 2:58
SteinarAa2-Apr-08 2:58 
GeneralRe: Events from C# to COM dll (C++) Pin
Randor 14-Apr-08 17:10
professional Randor 14-Apr-08 17:10 
QuestionMaking COM introp and calling the method from C# project Pin
Mushtaque Nizamani30-Mar-08 6:06
Mushtaque Nizamani30-Mar-08 6:06 
QuestionDCOM security issue Pin
tony_Udz27-Mar-08 17:46
tony_Udz27-Mar-08 17:46 
GeneralSetWindowPos in COM application Pin
sheetal_0626-Mar-08 23:38
sheetal_0626-Mar-08 23:38 
GeneralCOM Communication Pin
HakunaMatada25-Mar-08 1:25
HakunaMatada25-Mar-08 1:25 
GeneralRe: COM Communication Pin
Mike Dimmick30-Mar-08 12:58
Mike Dimmick30-Mar-08 12:58 
If calling between code in the same process, in the same context, in the same apartment, there is no translation whatever. It's the same as making a virtual function call to another class in your own code.

If in a different COM+ context in the same apartment, it marshals the arguments to make any pointers context-relative, executes any code to set up the thread for the new context, and unmarshals arguments and calls the method. On return it again sets up the thread for the right context, remaps any pointers for the right context (to ensure correct interception occurs) and returns to the caller.

If in a different apartment, it depends on the receiving apartment. If the receiving apartment is an STA, it will have created a hidden window to receive incoming calls. The arguments are marshalled and a window message sent to that hidden window. When the receiving thread's message pump picks up the message and dispatches it to the window procedure, the window procedure makes the call. The calling thread waits (pumping messages, if an STA) until the call returns.

If the receiving apartment is an MTA, it uses RPC, but a special RPC channel called Local RPC, to get the call onto a worker thread.

If going cross-process, again it uses windows messaging to target an STA, and RPC to target an MTA.

For DCOM RPC is always used.


DoEvents: Generating unexpected recursion since 1991

GeneralRe: COM Communication Pin
HakunaMatada30-Mar-08 19:12
HakunaMatada30-Mar-08 19:12 
GeneralBSTR variable Pin
vc++_fragrance24-Mar-08 19:48
vc++_fragrance24-Mar-08 19:48 
GeneralRe: BSTR variable Pin
User 21559725-Mar-08 1:24
User 21559725-Mar-08 1:24 
GeneralRe: BSTR variable Pin
CPallini26-Mar-08 1:07
mveCPallini26-Mar-08 1:07 
GeneralC# class library Pin
pnpfriend24-Mar-08 9:24
pnpfriend24-Mar-08 9:24 
GeneralRe: C# class library Pin
Scott Dorman25-Mar-08 15:37
professionalScott Dorman25-Mar-08 15:37 
GeneralCalling .NET component from VB. [modified] Pin
SPanicker*23-Mar-08 21:38
SPanicker*23-Mar-08 21:38 
GeneralRe: Calling .NET component from VB. Pin
Vi23-Apr-08 20:13
Vi23-Apr-08 20:13 
QuestionHow to Rreference COM object(tlb file) in VC++ Pin
Jahnson K21-Mar-08 10:05
Jahnson K21-Mar-08 10:05 
AnswerRe: How to Rreference COM object(tlb file) in VC++ Pin
User 21559722-Mar-08 3:02
User 21559722-Mar-08 3:02 
GeneralRe: How to Rreference COM object(tlb file) in VC++ Pin
Jahnson K22-Mar-08 11:31
Jahnson K22-Mar-08 11:31 
GeneralRe: How to Rreference COM object(tlb file) in VC++ Pin
User 21559723-Mar-08 2:28
User 21559723-Mar-08 2:28 
AnswerRe: How to Rreference COM object(tlb file) in VC++ Pin
pnpfriend24-Mar-08 9:34
pnpfriend24-Mar-08 9:34 
GeneralRe: How to Rreference COM object(tlb file) in VC++ Pin
Jahnson K25-Mar-08 7:35
Jahnson K25-Mar-08 7:35 
GeneralRe: How to Rreference COM object(tlb file) in VC++ Pin
Jahnson K27-Mar-08 13:04
Jahnson K27-Mar-08 13:04 
GeneralRe: How to Rreference COM object(tlb file) in VC++ Pin
Vi23-Apr-08 20:19
Vi23-Apr-08 20:19 
GeneralRe: How to Rreference COM object(tlb file) in VC++ Pin
Jahnson K7-Apr-08 8:19
Jahnson K7-Apr-08 8:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.