Files
libradhook/tests/test_stress_churn.cpp
nexusverypro 3192afe07d initial commit
2026-07-03 02:00:27 +01:00

19 lines
400 B
C++

#include <cassert>
#include "radhook/radhook.h"
static int fn() { return 42; }
static int detour() { return 1337; }
int main() {
for (int i = 0; i < 1000; i++) {
RadHookHandle h = nullptr;
auto r = RadHookCreate((void*)fn, (void*)detour, &h);
assert(r == RadHookResult::Success);
RadHookEnable(h);
RadHookDisable(h);
RadHookDestroy(h);
}
}