[JDEV] JabberCOM in C++: The problem ...

Robert Temple robert.temple at dig.com
Fri May 25 23:18:03 CDT 2001


> From: Scott Francis [mailto:sfrancis at blueairnetworks.com]
> Sent: Friday, May 25, 2001 5:05 AM
> Subject: [JDEV] JabberCOM in C++: The problem ...
[snip]
> The reason you can't use ATL to implement IDispatch for you is 
> because the event interfaces in the JabberCOM IDL are not defined 
> as dual (why?). Therefore, you basically need to have a massive 
> switch statement in your IDispatch::Invoke() method, checking 
> the DISPID's of the method being invoked.  Then either call your 
> function directly from IDispatch, or hell, make it inline.  But 
> at least it will be called.

It is not unusual for connection point interfaces in COM to only be
dispinterfaces.  In fact this is the way ATL wizards generate event
interfaces for you.

ATL provides two C++ templates for connection point sinks for 
handling events on a dispinterface, IDispEventImpl and 
IDispEventSimpleImpl.

-Robert



More information about the JDev mailing list