Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Retcheck::init(); // call this once before anything...to initialise it
- // Use Retcheck::call to call your functions like
- // normal; just make sure to supply its Calling convention
- auto r_lua_newthread = reinterpret_cast<void*>(aslr(0x13D8FB0)); // or cast it to its typedef
- auto new_rL = std::get<0>(Retcheck::call(r_lua_newthread, "cdecl", { rL }));
- // explanation:
- auto return_data = Retcheck::call(function, convention, { arg1, arg2, arg3 . . . });
- // if the function returns a 32-bit value(byte/short/int/dword/float/etc.) do:
- auto small_value = std::get<0>(return_data); // cast it to whatever you need
- // if it returns a 64-bit value(__int64/double) do:
- auto large_value = std::get<1>(return_data);
- // yes ik could've made this part much fancier
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement