The technique is to create a static function in your class. The first parameter to your function is this. In the function, dispatch to the member function using the this pointer. This technique is a kind of a thunk.
Code:
class MyClass
{
private:
static void sProcessTask(MyClass* self, int someParam);
void DispatchTask();
void ProcessTask();
}
void MyClass::sProcessTask(MyClass* self, int someParam)
{
self.ProcessTask(someParam);
}
void MyClass::DispatchTask()
{
Task myTask = new Task("MyTask", sProcessTask, this, someParam);
}
void MyClass::ProcessTask(int param)
{
// do something on task
}
(Warning: Uncompiled and untested)