32 lines
603 B
C++
32 lines
603 B
C++
// CEventHandler.h
|
|
|
|
#ifndef __EVNET_HANDLER_H__
|
|
#define __EVNET_HANDLER_H__
|
|
|
|
#include <atlbase.h>
|
|
#include <atlcom.h>
|
|
|
|
class IEventHandler
|
|
{
|
|
public:
|
|
virtual void Received() = 0;
|
|
};
|
|
|
|
|
|
class CEventHandler : public IDispEventImpl<0, CEventHandler, &DIID__ISysDibEvents, &LIBID_CPSYSDIBLib, 1, 0>
|
|
{
|
|
public:
|
|
void SetIEventHandler(IEventHandler* pIEventHandler);
|
|
|
|
void __stdcall Received();
|
|
|
|
BEGIN_SINK_MAP(CEventHandler)
|
|
SINK_ENTRY_EX(0, DIID__ISysDibEvents, 1, Received)
|
|
END_SINK_MAP()
|
|
|
|
protected:
|
|
IEventHandler* m_pIEventHandler;
|
|
};
|
|
|
|
#endif /* __EVNET_HANDLER_H__ */
|