SafetyHook: C:/M/B/src/safetyhook-0.6.5/include/safetyhook/easy.hpp File Reference

SafetyHook

Loading...
Searching...
No Matches
Functions
easy.hpp File Reference

Easy to use API for creating hooks. More...

`#include "safetyhook/common.hpp"`
`#include "safetyhook/inline_hook.hpp"`
`#include "safetyhook/mid_hook.hpp"`
`#include "safetyhook/utility.hpp"`
`#include "safetyhook/vmt_hook.hpp"`

Go to the source code of this file.

## Functions
InlineHook SAFETYHOOK_API | safetyhook::create_inline (void *target, void *destination, InlineHook::Flags flags=InlineHook::Default)
| Easy to use API for creating an InlineHook.
template<typename T, typename U>
InlineHook | safetyhook::create_inline (T target, U destination, InlineHook::Flags flags=InlineHook::Default)
| Easy to use API for creating an InlineHook.
MidHook SAFETYHOOK_API | safetyhook::create_mid (void *target, MidHookFn destination, MidHook::Flags flags=MidHook::Default)
| Easy to use API for creating a MidHook.
template<typename T>
MidHook | safetyhook::create_mid (T target, MidHookFn destination, MidHook::Flags flags=MidHook::Default)
| Easy to use API for creating a MidHook.
VmtHook SAFETYHOOK_API | safetyhook::create_vmt (void *object)
| Easy to use API for creating a VmtHook.
template<typename T>
VmHook | safetyhook::create_vm (VmtHook &vmt, size_t index, T destination)
| Easy to use API for creating a VmHook.

## Detailed Description

Easy to use API for creating hooks.

## Function Documentation

## ◆ create_inline() [1/2]

template<typename T, typename U>

InlineHook safetyhook::create_inline | ( | T | target,
|  | U | destination,
|  | InlineHook::Flags | flags = InlineHook::Default )
| nodiscard

Easy to use API for creating an InlineHook.

Parameters

  target | The address of the function to hook.
  destination | The address of the destination function.
  flags | The flags to use.

Returns
  The InlineHook object.

## ◆ create_inline() [2/2]

InlineHook SAFETYHOOK_API safetyhook::create_inline | ( | void * | target,
|  | void * | destination,
|  | InlineHook::Flags | flags = InlineHook::Default )
| nodiscard

Easy to use API for creating an InlineHook.

Parameters

  target | The address of the function to hook.
  destination | The address of the destination function.
  flags | The flags to use.

Returns
  The InlineHook object.

## ◆ create_mid() [1/2]

template<typename T>

MidHook safetyhook::create_mid | ( | T | target,
|  | MidHookFn | destination,
|  | MidHook::Flags | flags = MidHook::Default )
| nodiscard

Easy to use API for creating a MidHook.

Parameters

  target | the address of the function to hook.
  destination | The destination function.
  flags | The flags to use.

Returns
  The MidHook object.

## ◆ create_mid() [2/2]

MidHook SAFETYHOOK_API safetyhook::create_mid | ( | void * | target,
|  | MidHookFn | destination,
|  | MidHook::Flags | flags = MidHook::Default )
| nodiscard

Easy to use API for creating a MidHook.

Parameters

  target | the address of the function to hook.
  destination | The destination function.
  flags | The flags to use.

Returns
  The MidHook object.

## ◆ create_vm()

template<typename T>

VmHook safetyhook::create_vm | ( | VmtHook & | vmt,
|  | size_t | index,
|  | T | destination )
| nodiscard

Easy to use API for creating a VmHook.

Parameters

  vmt | The VmtHook to use to create the VmHook.
  index | The index of the method to hook.
  destination | The destination function.

Returns
  The VmHook object.

## ◆ create_vmt()

VmtHook SAFETYHOOK_API safetyhook::create_vmt | ( | void * | object | ) |
| nodiscard

Easy to use API for creating a VmtHook.

Parameters

  object | The object to hook.

Returns
  The VmtHook object.