I don't even know how to properly word this, but I'll try my best to explain it in code:
typedef void( *ExampleFn )( PVOID p1, PVOID p2, PVOID p3 );
struct Example
{
void ExampleFunction( PVOID p1, PVOID p2, PVOID p3 )
{
// do something with Example's members
}
};
Example example;
ExampleFn exampleFn = example.ExampleFunction;
So, I get this error:
Error C2440 '=': cannot convert from 'void (__thiscall Example::* )(PVOID,PVOID,PVOID)' to 'ExampleFn'
I understand the problem, Example::ExampleFunction is a __thiscall and ExampleFn is not, but how can I go about this?
How to have a Example object with a ExampleFn-like function in it that can use that object's members?