Ok im trying to hook that function
I want to know how do i store the arguments value to use it latter.Code:void __stdcall ZCharacterManagerFindHook(MUID uid)
{
}
Thanks :)
Printable View
Ok im trying to hook that function
I want to know how do i store the arguments value to use it latter.Code:void __stdcall ZCharacterManagerFindHook(MUID uid)
{
}
Thanks :)
A functor is a class that acts like a function. It overloads the function call operator:
Code:
class ZCharacterManagerFindHookFunctor {
MUID muid_;
public:
ZCharacterManagerFindHookFunctor(MUID m)
{
muid_ = m;
}
void operator()() {
ZCharacterManagerFindHook(muid_);
}
};
void func(ZCharacterManagerFindHookFunctor& f)
{
// Invoke the functor
f();
}
int main()
{
MUID m;
ZCharacterManagerFindHookFunctor f(m);
// Pass the functor to a function, or store it in a data structure,
// or whatever
func(f);
return 0;
}