hooking QuerryPerformanceCounter by import table - CS
I am learning about hacking and want to make a speed hack for cs , i understand that QuerryPerformanceCounter handles the speed the camera moves in most games , i look in the hl.exe with dependency walker and see this function being used, so i have got a dll ready and i inject it in to hl.exe but nothing comes up in the hook QuerryPerformanceCounter, it works fine on my own apps with MessageBoxA ,can anyone help?
can you only hook c++
32 functions by import table or is there away with the vtable?
Code:
//QueryPerformanceCounter //kernal32.dll
typedef BOOL (WINAPI* QueryPerformanceCounter_ptr)(LARGE_INTEGER*);
QueryPerformanceCounter_ptr QueryPerformanceCounter_orig = NULL;
static BOOL WINAPI MyQueryPerformanceCounter(LARGE_INTEGER* i)
{
MessageBox(NULL,"inside MyQueryPerformanceCounter","",0);
return QueryPerformanceCounter_orig(i);
}
32 functions by import table or is there away with the vtable?