By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

Need help in writing Event Sink in COM

P: 1
Hi all,

I am trying to create a class that will act as event sink to a COM object. Just to tell you the COM object is SoftUSBEndpoint which is part of Device Simulation Framework.

Anyways its outbound interface is ISoftUSBEndpointEevents which implements IUnknown interface. It is shown below

ISoftUSBEndpointEvents : public IUnknown

I tried to implement my EventSink class using IDispEventSimpleImpl but its not working for me.
Is it because IDispEventSimpleImpl provides implementation of IDispatch which is not in my hierarchy? If this is so, then how to build non COM event sink class

By the way it worked fine when I implemented my event sink class as a COM class as shown below

class ATL_NO_VTABLE CLoopbackDevice :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CLoopbackDevice, &CLSID_LoopbackDevice>,
public ISoftUSBEndpointEvents,
public IDispatchImpl<ILoopbackDevice, &IID_ILoopbackDevice, &LIBID_SoftUSBLoopbackLib, /*wMajor =*/ 1, /*wMinor =*/ 0>

Any clue??
Aug 27 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 4,677
Bumping .
Aug 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.