I need to make a callback for a function in a class, when i just declare the function itself, the compiler complains when i want to pass the pointer to the function.
I know the anser has to do with a typedef (did something like this a long time ago), but I forgot how to declare the function with it....
here's something similar to what I have
Anyone knows how to make it work ?Code:class myclass
{
private:
void CALLBACK myCallbackFunction(long num);
void some_other_function(void);
}
void CALLBACK myclass::myCallbackFunction(long num)
{
}
void myclass::some_other_function(void)
{
// compiler gives error on next line
// cannot convert (function prototype here) to DWORD_PTR
ret = API_function((DWORD_PTR)myCallbackFunction);
}
