BlackBone
Windows memory hacking library
 All Classes Functions
blackbone::DetourBase Class Reference
Inheritance diagram for blackbone::DetourBase:
blackbone::HookHandler< R(*)(Args...), C > blackbone::HookHandler< R(__fastcall *)(Args...), C > blackbone::HookHandler< R(__stdcall *)(Args...), C > blackbone::HookHandler< R(__thiscall *)(Args...), C >

Protected Member Functions

BLACKBONE_API bool DisableHook ()
 Temporarily disable hook More...
 
BLACKBONE_API bool EnableHook ()
 Enable disabled hook More...
 
BLACKBONE_API bool ToggleHBP (int index, bool enable)
 Toggle hardware breakpoint for current thread More...
 
BLACKBONE_API void CopyOldCode (uint8_t *Ptr)
 Copy original function bytes More...
 

Static Protected Member Functions

static BLACKBONE_API LONG NTAPI VectoredHandler (PEXCEPTION_POINTERS excpt)
 Exception handlers More...
 
static BLACKBONE_API LONG NTAPI Int3Handler (PEXCEPTION_POINTERS excpt)
 Int3 exception handler More...
 
static BLACKBONE_API LONG NTAPI AVHandler (PEXCEPTION_POINTERS excpt)
 Access violation handler More...
 
static BLACKBONE_API LONG NTAPI StepHandler (PEXCEPTION_POINTERS excpt)
 Single step exception handler More...
 

Protected Attributes

bool _hooked = false
 
void * _callback = nullptr
 
void * _callbackClass = nullptr
 
void * _original = nullptr
 
void * _internalHandler = nullptr
 
void * _callOriginal = nullptr
 
mapIdx _hwbpIdx
 
size_t _origSize = 0
 
uint8_t * _buf = nullptr
 
uint8_t * _origCode = nullptr
 
uint8_t * _newCode = nullptr
 
HookType::e _type = HookType::Inline
 
CallOrder::e _order = CallOrder::HookFirst
 
ReturnMethod::e _retType = ReturnMethod::UseOriginal
 

Static Protected Attributes

static BLACKBONE_API
std::unordered_map< void
*, DetourBase * > 
_breakpoints
 
static BLACKBONE_API void * _vecHandler = nullptr
 

Member Function Documentation

LONG NTAPI blackbone::DetourBase::AVHandler ( PEXCEPTION_POINTERS  excpt)
staticprotected

Access violation handler

Parameters
excptException information
Returns
Exception disposition
void blackbone::DetourBase::CopyOldCode ( uint8_t *  ptr)
protected

Copy original function bytes

Parameters
PtrOrigianl function address
bool blackbone::DetourBase::DisableHook ( )
protected

Temporarily disable hook

Returns
true on success
bool blackbone::DetourBase::EnableHook ( )
protected

Enable disabled hook

Returns
true on success
LONG NTAPI blackbone::DetourBase::Int3Handler ( PEXCEPTION_POINTERS  excpt)
staticprotected

Int3 exception handler

Parameters
excptException information
Returns
Exception disposition
LONG NTAPI blackbone::DetourBase::StepHandler ( PEXCEPTION_POINTERS  excpt)
staticprotected

Single step exception handler

Parameters
excptException information
Returns
Exception disposition
bool blackbone::DetourBase::ToggleHBP ( int  index,
bool  enable 
)
protected

Toggle hardware breakpoint for current thread

Parameters
indexBreakpoint index ( 0-4 )
enabletrue to enable, false to disable
Returns
true on success
LONG NTAPI blackbone::DetourBase::VectoredHandler ( PEXCEPTION_POINTERS  excpt)
staticprotected

Exception handlers

Exception handler

Parameters
excptException information
Returns
Exception disposition

The documentation for this class was generated from the following files: