Naderi
Naderi

Reputation: 154

c++ MFC compile error "C2470: 'CMySink' : looks like a function definition, but there is no parameter list; skipping apparent body"

c++ MFC compile error

error C2470: 'CMySink' : looks like a function definition, but there is no parameter list; skipping apparent body d:\faxmanager\faxmanager\mysink.cpp 34

.h file

class CMySink : public CCmdTarget
{
    DECLARE_DYNAMIC(CMySink)
...

protected:
    DECLARE_MESSAGE_MAP()    
     void OnJobAdded(FAXCOMEXLib::IFaxServer *pFaxServer, BSTR bstrJobId);
    ...
};

.cpp file

BEGIN_DISPATCH_MAP(CMySink, CCmdTarget)
  DISP_FUNCTION (CMySink ,"OnOutgoingJobAdded", OnJobAdded, VT_EMPTY, VTS_I4 VTS_BSTR)
END_DISPATCH_MAP()

void CMySink:OnJobAdded(FAXCOMEXLib::IFaxServer *pFaxServer,  BSTR bstrJobId) 
{ 

}

Upvotes: 0

Views: 819

Answers (1)

Luchian Grigore
Luchian Grigore

Reputation: 258608

void CMySink:OnJobAdded

should be

void CMySink::OnJobAdded

Upvotes: 2

Related Questions