Board index » cppbuilder » Event Parameters by Reference

Event Parameters by Reference

For example, the WebBrowser interface has an OnBeforeNavigate event that
uses by-reference parameters to allow the client to modify the data before
the control does it's work.  Kinda like an ActiveX equivilent to a VCL
form's OnClose event, where the event handler can tell the form what to do
(minimize, hide, free itself, etc).

I have a multi-use COM server I'm working on right now where I have a need
to trigger one event to all connected clients, and for each client get its
response to the event (such as setting a bool parameter to true or false)
and then trigger a second event if the first one succeeded.  Can that be
implemented in Builder and if so, how?

Gambit

 

Re:Event Parameters by Reference


Usually such things are done via the OUT parameter - you pass a boolean
pointer to a sink, it sets the value, then you examine it when the call
returns.

.a

Quote
Remy Lebeau wrote:

[snip]

Re:Event Parameters by Reference


Ok, wasn't sure if it was supposed to be an [in] or [out] exactly.  Wanted
to make sure COM even really supported what I was wanting to do.

Gambit

"Alex Bakaev [TeamB]" <z...@att.net> wrote in message
news:3BBE2649.E53BDA18@att.net...

Quote
> Usually such things are done via the OUT parameter - you pass a boolean
> pointer to a sink, it sets the value, then you examine it when the call
> returns.

Other Threads