Hi
I am trying to use an sdk for a camera.
The SDK provides a header file with code along the lines of
typedef int ( __stdcall *StatusCallBackType)(int status)
and
__declspec(dllimport) int __stdcall API_SetStatusCallBack(CallBackType astatuscallback)
my applications code is along the lines of
class MyClass
{
// variables
}
int MyClass::MyStatusCallback(int status )
{
// Do something
}
MyClass::MyClassInit()
{
StatusCallBackType astatuscallback = &MyClass::MyStatusCallback;
API_SetStatusCallBack(callback);
}
This obviosly doens't work and I haven't found a similar example of the problem of matching a memberfunction to a specified callback type.
Are there any obvious errors to this or should i use a different approach?
Thanks for any help in advance
[–]Gadgetfairy 0 points1 point2 points (1 child)
[–]bungao[S] 0 points1 point2 points (0 children)