1>..\Include\CDirectShowCamera.cpp(224) : error C3867: 'CDirectShowCamera::BufferCB': function call missing argument list; use '&CDirectShowCamera::BufferCB' to create a pointer to member
Code:
this->pGrabber->SetCallback(this->BufferCB , 1);
keep returning errors, here is the callback function, which is implimented as a member function
Code:
HRESULT CDirectShowCamera::BufferCB(double SampleTime , BYTE* pImage , long BufferLen){
// snip irrelevant guts
return S_OK;
}
except if I add the ampersand it gives this error
Code:
this->pGrabber->SetCallback(&CDirectShowCamera::BufferCB , 1);
1>..\Include\CDirectShowCamera.cpp(224) : error C2664: 'ISampleGrabber::SetCallback' : cannot convert parameter 1 from 'HRESULT (__thiscall CDirectShowCamera::* )(double,BYTE *,long)' to 'ISampleGrabberCB *'
which makes even less sense. Obviously I need to be able to call this callback function, but I need it to know what instance of CDIrectShowCamera it is handling, so that it can add the sampels to the appropriate buffer. There will be more than one instance of the class operating simultaneously. I know im probably missing somethign realyl obvious.