#include #include "radhook/radhook.h" static int fn() { return 42; } static int detour() { return 1337; } using Fn = int(*)(); int main() { RadHookHandle h = nullptr; auto r = RadHookCreate((void*)fn, (void*)detour, &h); assert(r == RadHookResult::Success); assert(RadHookIsValid(h)); RadHookDestroy(h); return 0; }