Skip to content

receiver1/re_virtualtable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

re_virtualtable

Description:

Virtual Table Hooker. Tested only with DirectX 9.

Example of usage:

clVirtualTable<HRESULT, LPDIRECT3DDEVICE9> endSceneHook;
clVirtualTable<HRESULT, LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*> resetHook;

HRESULT __stdcall endSceneHooked(LPDIRECT3DDEVICE9 pDevice)
{
    // Some actions...
    return endSceneHook.call(eConvention::stdcall, pDevice);
}

HRESULT __stdcall resetHooked(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pParams)
{
    // Some actions...
    return resetHook.call(eConvention::stdcall, pDevice, pParams); 
}

// Entry point
const UINT hookAddress{ 0xC97C28U }; // GTA:SA device
endSceneHook.install(hookAddress, 42, &endSceneHooked)
resetHook.install(hookAddress, 16, &resetHooked);

About

virtual table hooker

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages