Open Hpmason opened 1 year ago
When hooking libraries with C++ code, it can be helpful to organize hooks inside an impl block, which can make use of Self
struct FfiType; #[hook_impl("Foo.dll")] impl FfiType { #[hook(extern "C" BarHook, offset = 0xDEAD)] fn bar(this: *mut Self) {} #[hook(extern "C" CtorHook, offset = 0xBEEF)] fn new() -> *mut Self {} }
When hooking libraries with C++ code, it can be helpful to organize hooks inside an impl block, which can make use of Self