A hook class that allows for hooking a single method in a VMT.
More...
#include <vmt_hook.hpp>
|
|
| VmHook (const VmHook &)=delete |
| |
|
| VmHook (VmHook &&other) noexcept |
| |
|
VmHook & | operator= (const VmHook &)=delete |
| |
|
VmHook & | operator= (VmHook &&other) noexcept |
| |
|
void | reset () |
| | Removes the hook.
|
| |
|
template<typename T> |
| T | original () const |
| | Gets the original method pointer.
|
| |
| template<typename RetT = void, typename... Args> |
| RetT | call (Args... args) |
| | Calls the original method.
|
| |
| template<typename RetT = void, typename... Args> |
| RetT | ccall (Args... args) |
| | Calls the original method with the __cdecl calling convention.
|
| |
| template<typename RetT = void, typename... Args> |
| RetT | thiscall (Args... args) |
| | Calls the original method with the __thiscall calling convention.
|
| |
| template<typename RetT = void, typename... Args> |
| RetT | stdcall (Args... args) |
| | Calls the original method with the __stdcall calling convention.
|
| |
| template<typename RetT = void, typename... Args> |
| RetT | fastcall (Args... args) |
| | Calls the original method with the __fastcall calling convention.
|
| |
A hook class that allows for hooking a single method in a VMT.
◆ call()
template<typename RetT = void, typename... Args>
| RetT safetyhook::VmHook::call |
( |
Args... | args | ) |
|
|
inline |
Calls the original method.
- Template Parameters
-
| RetT | The return type of the method. |
| Args | The argument types of the method. |
- Parameters
-
| args | The arguments to pass to the method. |
- Returns
- The return value of the method.
- Note
- This will call the original method with the default calling convention.
◆ ccall()
template<typename RetT = void, typename... Args>
| RetT safetyhook::VmHook::ccall |
( |
Args... | args | ) |
|
|
inline |
Calls the original method with the __cdecl calling convention.
- Template Parameters
-
| RetT | The return type of the method. |
| Args | The argument types of the method. |
- Parameters
-
| args | The arguments to pass to the method. |
- Returns
- The return value of the method.
◆ fastcall()
template<typename RetT = void, typename... Args>
| RetT safetyhook::VmHook::fastcall |
( |
Args... | args | ) |
|
|
inline |
Calls the original method with the __fastcall calling convention.
- Template Parameters
-
| RetT | The return type of the method. |
| Args | The argument types of the method. |
- Parameters
-
| args | The arguments to pass to the method. |
- Returns
- The return value of the method.
◆ stdcall()
template<typename RetT = void, typename... Args>
| RetT safetyhook::VmHook::stdcall |
( |
Args... | args | ) |
|
|
inline |
Calls the original method with the __stdcall calling convention.
- Template Parameters
-
| RetT | The return type of the method. |
| Args | The argument types of the method. |
- Parameters
-
| args | The arguments to pass to the method. |
- Returns
- The return value of the method.
◆ thiscall()
template<typename RetT = void, typename... Args>
| RetT safetyhook::VmHook::thiscall |
( |
Args... | args | ) |
|
|
inline |
Calls the original method with the __thiscall calling convention.
- Template Parameters
-
| RetT | The return type of the method. |
| Args | The argument types of the method. |
- Parameters
-
| args | The arguments to pass to the method. |
- Returns
- The return value of the method.
The documentation for this class was generated from the following file: