Click here to Skip to main content
15,921,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How proxy binds to original coclass object? Pin
George_George6-Aug-08 20:23
George_George6-Aug-08 20:23 
GeneralRe: How proxy binds to original coclass object? Pin
Stephen Hewitt6-Aug-08 20:28
Stephen Hewitt6-Aug-08 20:28 
GeneralRe: How proxy binds to original coclass object? Pin
George_George6-Aug-08 20:47
George_George6-Aug-08 20:47 
GeneralRe: How proxy binds to original coclass object? Pin
Stephen Hewitt6-Aug-08 20:53
Stephen Hewitt6-Aug-08 20:53 
GeneralRe: How proxy binds to original coclass object? Pin
George_George6-Aug-08 21:26
George_George6-Aug-08 21:26 
GeneralRe: How proxy binds to original coclass object? Pin
Stephen Hewitt6-Aug-08 21:33
Stephen Hewitt6-Aug-08 21:33 
GeneralRe: How proxy binds to original coclass object? Pin
George_George6-Aug-08 21:52
George_George6-Aug-08 21:52 
GeneralRe: How proxy binds to original coclass object? Pin
Stephen Hewitt6-Aug-08 22:06
Stephen Hewitt6-Aug-08 22:06 
George_George wrote:
1. In the source apartment, the interface pointer contains address to the original coclass object;


Obviously calling a method on an interface pointer will affect the COM object you got it from. The phrase "address to the original coclass object" a little simplistic, but if you like to think of it this way there's no harm.

George_George wrote:
2. The pointer to the original coclass object is marshalled, and unmarshalled to another interface in the destination apartment;


Forget about coclasses: it's all about interfaces.


George_George wrote:
3. Since the interface to original coclass object contains address information to the original object, during unmarshalling, the unmarshalled pointer also got the address information to the original coclass object and the address information will be maintained by proxy object;


Again, calling a method on an interface pointer will affect the COM object you got it from. This should not come as a surprise.


George_George wrote:
4. The proxy object knows the interface it implements (IID) and the address information of the original pointer which points to the original coclass object.


Let's take the case where you marshal an interface from a single threaded apartment (A) to another single threaded apartment (B) in the same process. In this case normal window messages are used to communicate between apartments behind the scenes. When B calls a method on the proxy it’s sends a message to A. When A pumps the message it calls the function on the interface. Note that the method is called by the apartment where the object "lives" and so from that end it’s no different to a normal interface call.

Steve

GeneralRe: How proxy binds to original coclass object? Pin
George_George6-Aug-08 23:34
George_George6-Aug-08 23:34 
GeneralRe: How proxy binds to original coclass object? Pin
Stephen Hewitt7-Aug-08 14:41
Stephen Hewitt7-Aug-08 14:41 
GeneralRe: How proxy binds to original coclass object? Pin
George_George9-Aug-08 0:07
George_George9-Aug-08 0:07 
QuestionUSB Device Data Read Pin
vcprog6-Aug-08 18:24
vcprog6-Aug-08 18:24 
AnswerRe: USB Device Data Read Pin
ptr_Electron6-Aug-08 18:59
ptr_Electron6-Aug-08 18:59 
GeneralRe: USB Device Data Read Pin
vcprog6-Aug-08 19:31
vcprog6-Aug-08 19:31 
GeneralRe: USB Device Data Read Pin
ptr_Electron6-Aug-08 20:07
ptr_Electron6-Aug-08 20:07 
GeneralRe: USB Device Data Read Pin
vcprog6-Aug-08 20:16
vcprog6-Aug-08 20:16 
GeneralRe: USB Device Data Read Pin
vcprog6-Aug-08 21:00
vcprog6-Aug-08 21:00 
GeneralRe: USB Device Data Read Pin
vcprog6-Aug-08 21:12
vcprog6-Aug-08 21:12 
GeneralRe: USB Device Data Read Pin
ptr_Electron6-Aug-08 21:48
ptr_Electron6-Aug-08 21:48 
GeneralRe: USB Device Data Read Pin
vcprog6-Aug-08 23:26
vcprog6-Aug-08 23:26 
GeneralRe: USB Device Data Read Pin
David Crow25-Aug-08 4:17
David Crow25-Aug-08 4:17 
GeneralRe: USB Device Data Read Pin
vcprog6-Aug-08 22:19
vcprog6-Aug-08 22:19 
GeneralRe: USB Device Data Read Pin
ptr_Electron7-Aug-08 0:06
ptr_Electron7-Aug-08 0:06 
GeneralRe: USB Device Data Read Pin
vcprog7-Aug-08 0:35
vcprog7-Aug-08 0:35 
GeneralRe: USB Device Data Read Pin
vcprog7-Aug-08 1:36
vcprog7-Aug-08 1:36 

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.