
cegadgets.com ATL CE event firing
You add your events as methods of _InterfaceAEvents interface. Then
build the project. Then right-click your coclass in Class View, and
choose Implement Connection Point. A wizard will generate Fire_XXX
function for every event named XXX. To fire the event, you call this
Fire_XXX function.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
Quote:
> I made an interface lets call it InterfaceA. I clicked on "Use
connection
> points" then it generated an interface _InterfaceAEvents. I add a
temporary
> method for InterfaceA "SetEvent". I want this function to fire an
event
> (just for testing purpouses to make sure everything is o.k). Do I add
my
> event to _InterfaceAEvents ? Once I have my event added, how do I
fire it
> in VC++ ? I am not trying to fire an event from the client.
> > You seem to be confused. Sink maps and _ATL_FUNC_INFO are about
sinking
> > events, not about firing them. You see, there is a control, and
there is
> > a client using the control. The control fires events. The client
sinks
> > them. The code you are talking about is for the client to sink
events.
> > It has nothing to do with firing them. Figure out which of the two
> > parties you are developing.
> > --
> > With best wishes,
> > Igor Tandetnik
> > "For every complex problem, there is a solution that is simple,
neat,
> > and wrong." H.L. Mencken
> > > Using the example from cegadgets.com I have setup my com object to
> > support
> > > events, I made the event map, defined the event function and
> > everything
> > > seems o.k. Now how do I fire this event ? If I just simply call
this
> > > function in my code will the rest magically work itself out ?
> > > I have to use _ATL_FUNC_INFO & I have the function
> > "GetFuncInfoFromId". How
> > > can I change the parameters of my event function ? I want the
event
> > to have
> > > a BSTR and a VARIANT. I need to modify something in the
> > _ATL_FUNC_INFO
> > > struct but I am not sure because I cannot find any documentation
on
> > this
> > > structure.