I′m trying to do callback events in a different way 
Author Message
 I′m trying to do callback events in a different way

    I read many articles talking about how to implement callback events with
COM. But all of them told me to create an event in the server and one in the
client (sink) to communicate with each other.
    But I cant create a method in the server, because it cannot be altered.

    Please, does exists another way to implement callback events, using VC++
6.0 ?

ps. :     This object COM was implemented in delphi and, to use this in
Delphi, I just need to instantiate a class that implement that interface and
set the property of another class with this instance (Could you understand
? ).



Sat, 07 Jun 2003 04:13:23 GMT  
 I′m trying to do callback events in a different way
Greets,

    If your existing COM object supports an outgoing interface, you can
query the object for it's IConnectionPointContainer.  With the interface,
you can enumerate the connection points supported by the object.  You can
use use FindConnectionPoint() from IConnectionPointContainer to get the
outgoing interface for a specific connection point.  You can then implement
the interface in the client application that will be receiving the events
and then use the Advise() method on the appropriate IConnectionPoint
interface in order to hook up the event source and the sink.

    If your existing COM object does not support events, you can create your
own wrapper object and encapsulate the existing COM object.  You can then
create a source interface for your wrapper component and perhaps parallel
methods to those the component already supports.  (You just then forward the
calls to the contained component.)  The client application will still tie
its event sink to the source interface in the same manner I mentioned
earlier.

Regards,

Joe



Quote:
>     I read many articles talking about how to implement callback events
with
> COM. But all of them told me to create an event in the server and one in
the
> client (sink) to communicate with each other.
>     But I cant create a method in the server, because it cannot be
altered.

>     Please, does exists another way to implement callback events, using
VC++
> 6.0 ?

> ps. :     This object COM was implemented in Delphi and, to use this in
> Delphi, I just need to instantiate a class that implement that interface
and
> set the property of another class with this instance (Could you understand
> ? ).



Sat, 07 Jun 2003 04:42:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Difference between two different ways of doing things

2. Different ways of implementing a 2d array

3. Different ways of licensing class libraries

4. Trying to unravel the mysteries of callback functions

5. CALLBACK, CALLBACK, CALLBACK?

6. Implementing connection point callbacks from a different thread

7. Interface callback implementation (vs Delegates & Events)

8. About Event,callback and thread

9. waveOutOpen callback event

10. event callback using XML Web Service

11. Callback Event lost

12. Firing Events From Callback Function

 

 
Powered by phpBB® Forum Software