|
| Re: COM callback |
 |
Tue, 4 Dec 2007 14:46:20 -0800 |
"Cristian Giannini" <cgv@vialcom.cl> wrote in message
news:4755b3c1@newsgroups.borland.com...
> it is possible to create a callback from a COM server?
Of course.
> I need to send some data to the client that invoke a COM server.
What exactly are you trying to implement? Are you having a particular
problem with it, or just looking for general information?
Gambit
|
| Post Reply
|
| COM callback |
 |
Tue, 4 Dec 2007 17:19:19 -0300 |
Hi: it is possible to create a callback from a COM server? I need to send
some data to the client that invoke a COM server.
Thanks
|
| Post Reply
|
| Re: COM callback |
 |
Wed, 5 Dec 2007 09:36:03 -0800 |
"Cristian Giannini" <cgv@vialcom.cl> wrote in message
news:47569de3@newsgroups.borland.com...
> I like to allow a module (COM server) can tell the client
> (the central application) to lunch another module.
When you create a new COM object, the wizard gives you the option of
enabling event support for it. That produces an event interface in your
Type Library that clients can attach to. Simply att whatever methods you
want to that interface. If you then import the COM object into a client
project, the import wizard produces a wrapper component that includes those
events. Or you can use the TEventDispatcher class to attach to the events
manually.
Gambit
|
| Post Reply
|
| Re: COM callback |
 |
Wed, 5 Dec 2007 09:58:14 -0300 |
Hi: I'm building an application that is divide in 7 modules. Each module is
COM server that provide functionality to others modules.
Furthermore exists a central application that the only purpose is to lunch
each module. Each Module can also lunch wichever module directly. The
problem is when a module lunch other module and then I close the main
application I get the advertisement that the COM server is in use.
I like to allow a module (COM server) can tell the client (the central
application) to lunch another module. This is do it by clicking a button on
the main form of each module.
Can you give any idea please?
Thank you
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escribió en el
mensaje
news:4755d908$1@newsgroups.borland.com...
>
> "Cristian Giannini" <cgv@vialcom.cl> wrote in message
> news:4755b3c1@newsgroups.borland.com...
>
>> it is possible to create a callback from a COM server?
>
> Of course.
>
>> I need to send some data to the client that invoke a COM server.
>
> What exactly are you trying to implement? Are you having a particular
> problem with it, or just looking for general information?
>
>
> Gambit
>
|
| Post Reply
|
| Re: COM callback |
 |
Thu, 6 Dec 2007 09:21:05 -0800 |
"Cristian Giannini" <cgv@vialcom.cl> wrote in message
news:4757ea87$1@newsgroups.borland.com...
> OK...thanks. Can I add event support if I previouslly create
> a COM object without checking that box?
Yes, but there are several steps involved. You have to add a DispInterface
to the TypeLibrary, add it to the CoClass, and mark it as "Source".
Then
you have to implement the IConnectionPointContainer and IConnectionPoint
interfaces in your COM object's implemantation class (you can use the ATL's
IConnectionPointImpl and IConnectionPointContainerImpl classes to help you
with that). At runtime, your clients will implement the DispInterface on
their end and register themselves with your IConnectionPoint implementation,
after which time your COM object can then call the registered methods when
needed.
Gambit
|
| Post Reply
|
|
|
|
|
|
|
|
|
|