예제 #1
0
        private ulong Detour_GetTickCount64()
        {
            SpeedHack This      = (SpeedHack)HookRuntimeInfo.Callback;
            var       tickCount = Interop.Kernel32.GetTickCount64();

            return((ulong)(This._baseTime64 + ((tickCount - This._baseTime64)) * This._acceleration));
        }
예제 #2
0
        private Interop.BOOL Detour_QueryPerformanceCounter(out long performanceCount)
        {
            SpeedHack This = (SpeedHack)HookRuntimeInfo.Callback;

            var result = Interop.Kernel32.QueryPerformanceCounter(out long realPerformanceCount);

            performanceCount = (long)(This._basePerformanceCount + ((realPerformanceCount - This._basePerformanceCount)) * This._acceleration);
            return(result);
        }
예제 #3
0
        private uint Detour_SleepEx(uint milliSeconds, Interop.BOOL alertable)
        {
            SpeedHack This = (SpeedHack)HookRuntimeInfo.Callback;

            return(Interop.Kernel32.SleepEx((uint)(milliSeconds / This._acceleration), alertable));
        }