clVirtualTable endSceneHook ; clVirtualTable 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 } ; endSceneHook . install ( hookAddress , 42 , & endSceneHooked ) resetHook . install ( hookAddress , 16 , & resetHooked ) ;