#include <cHookJump.h>
|
static const BYTE | k_I_NULL = 0x00 |
|
static const int | k_LEN_J = 1 |
| size of the jump instruction. 0xe9 = k_JUMP_I More...
|
|
static const int | k_LEN_P = 4 |
| size of the relative pointer. NOT same as sizeof(FARPROC) or INT_PTR More...
|
|
static const int | k_LEN_A = 8 |
| k_LEN_D aligned to 8 (for 32 bit code) More...
|
|
static const int | k_LEN_D = k_LEN_J + k_LEN_P |
| ( k_LEN_J+k_LEN_P ) = size of actual instruction More...
|
|
◆ cHookJump()
Gray::cHookJump::cHookJump |
( |
| ) |
|
|
inlinenoexcept |
◆ ~cHookJump()
Gray::cHookJump::~cHookJump |
( |
| ) |
|
|
inline |
◆ GetChainFunc()
FARPROC Gray::cHookJump::GetChainFunc |
( |
| ) |
const |
◆ InstallHook()
bool Gray::cHookJump::InstallHook |
( |
FARPROC |
pFuncOrig, |
|
|
FARPROC |
pFuncNew |
|
) |
| |
- Note
- X86 ONLY!! 32 or 64 bit.
◆ isChainable()
bool Gray::cHookJump::isChainable |
( |
| ) |
const |
|
inlinenoexcept |
◆ isHookInstalled()
bool Gray::cHookJump::isHookInstalled |
( |
| ) |
const |
|
inlinenoexcept |
◆ isHookValid()
bool Gray::cHookJump::isHookValid |
( |
| ) |
const |
|
inlinenoexcept |
- Note
- sometimes DLLs' can reload themselves and destroy our hook behind our backs.
◆ RemoveHook()
void Gray::cHookJump::RemoveHook |
( |
| ) |
|
◆ SwapOld()
bool Gray::cHookJump::SwapOld |
( |
| ) |
|
|
inlineprotectednoexcept |
put back saved code fragment. temporary to call previous version of the function. ASSUME use of cHookSwapLock m_Lock
◆ SwapReset()
void Gray::cHookJump::SwapReset |
( |
| ) |
|
|
inlineprotectednoexcept |
put back original JMP instruction again ASSUME use of cHookSwapLock m_Lock
◆ cHookJumpTests
friend class cHookJumpTests |
|
friend |
◆ cHookSwapChain
◆ cHookSwapLock
◆ k_I_NULL
const BYTE Gray::cHookJump::k_I_NULL = 0x00 |
|
static |
◆ k_LEN_A
const int Gray::cHookJump::k_LEN_A = 8 |
|
static |
k_LEN_D aligned to 8 (for 32 bit code)
◆ k_LEN_D
( k_LEN_J+k_LEN_P ) = size of actual instruction
◆ k_LEN_J
const int Gray::cHookJump::k_LEN_J = 1 |
|
static |
size of the jump instruction. 0xe9 = k_JUMP_I
◆ k_LEN_P
const int Gray::cHookJump::k_LEN_P = 4 |
|
static |
size of the relative pointer. NOT same as sizeof(FARPROC) or INT_PTR
◆ m_Jump
BYTE Gray::cHookJump::m_Jump[k_LEN_D] |
|
protected |
what do i want to replace m_pFuncOrig with. jump to pFuncNew
◆ m_Lock
prevent multiple threads from using this at the same time.
◆ m_OldCode
BYTE Gray::cHookJump::m_OldCode[k_LEN_D] |
|
protected |
what was at m_pFuncOrig previously. NOTE: What if this uses k_LEN_J the m_Lock isn't needed ?!!!
◆ m_pFuncOrig
FARPROC Gray::cHookJump::m_pFuncOrig |
|
protected |
Pointer to the original/old function. The one i will replace. Inject code here.
The documentation for this class was generated from the following files: