cegadgets.com ATL CE event firing 
Author Message
 cegadgets.com ATL CE event firing

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.



Sun, 12 Dec 2004 20:41:26 GMT  
 cegadgets.com ATL CE event firing
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


Quote:
> 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
Quote:
> 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.



Sun, 12 Dec 2004 23:53:22 GMT  
 cegadgets.com ATL CE event firing
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.


Quote:
> 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.



Mon, 13 Dec 2004 02:28:36 GMT  
 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.



Mon, 13 Dec 2004 02:56:05 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ATL COM Component firing events into VBScript event sink

2. ATL COM object pointer and fire events

3. Fire event with ByRef param from ATL COM ?!

4. ATL COM - Passing ATL COM classes through another ATL COM class in the same app

5. Lots of trouble getting my ActiveX events to fire under ATL

6. Firing ATL events between 2 STA's

7. Problem firing an event from ATL to VB which passes a SAFEARRAY

8. ATL Event Firing - pDispatch is wrong type

9. How to fire an event in ATL

10. ATL ActiveX Control Event not firing in IE?

11. Firing ATL event inside thread??

12. ATL event won't fire in Visual FoxPro

 

 
Powered by phpBB® Forum Software