“public: virtual long __stdcall PCI1761Event::GetTypeInfoCount(unsigned int *)” (?GetTypeInfoCount@PCI1761Event@@UAGJPAI@Z)
Code
class PCI1761Event :
public CComObjectRoot,
public _IAdvDIOEvents
{
public:
BEGIN_COM_MAP(PCI1761Event)
COM_INTERFACE_ENTRY(_IAdvDIOEvents)
END_COM_MAP()
PCI1761Event(void);<br>
HRESULT OnDiInterrupt (
long channel,
VARIANT * data,
long scanStart,
long scanCount );<br>
HRESULT OnDiStatusChange (
long port,
VARIANT * data,
long scanStart,
long scanCount );<br>
HRESULT OnDiPatternMatch (
long port,
VARIANT * data,
long scanStart,
long scanCount );<br>
HRESULT OnDeviceRemoved (
long DeviceNumber );
HRESULT STDMETHODCALLTYPE GetTypeInfoCount(
/* [out] */ UINT *pctinfo) ;<br>
HRESULT STDMETHODCALLTYPE GetTypeInfo(
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo **ppTInfo) ;
HRESULT STDMETHODCALLTYPE GetIDsOfNames(
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR *rgszNames,
/* [in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID *rgDispId) ;
/* [local] */ HRESULT STDMETHODCALLTYPE Invoke(
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr) ;
public:
~PCI1761Event(void);
};
Why????
Because
_IAdvDIOEventsinteface you are trying to implement is derived fromIDispatchand thus you have to implementIDispatchmethods on your class too. In ATL you typically inherit your class fromIDispatchImpl<_IAdvDIOEvents, ...>class to have the menthods implemented for you.