Author Topic: All Over Crashes  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
All Over Crashes
« on: July 16, 2013, 04:25:25 AM »
Hi Mister Pegge,

I got a problem.
Code: [Select]
kernel32 = LoadLibrary "kernel32.dll"

Bind kernel32
(
  GetModuleHandle    GetModuleHandleA  
  ExitProcess        ExitProcess
  GetTickCount       GetTickCount
  Sleep              Sleep
  Beep               Beep
  QueryPerformanceCounter    QueryPerformanceCounter      'crash
  QueryPerformanceFrequency  QueryPerformanceFrequency    'crash
)  

Code: [Select]
Declare QueryPerformanceCounter   Lib "kernel32.dll" (quad *c)  'has no effect  
Declare QueryPerformanceFrequency Lib "kernel32.dll" (quad *c)  'has no effect

X

Charles Pegge

  • Guest
Re: All Over Crashes
« Reply #1 on: July 16, 2013, 07:26:34 AM »

Hi Peter,

kernel32 = LoadLibrary "kernel32.dll"

Bind kernel32
(
  GetModuleHandle    GetModuleHandleA 
  ExitProcess        ExitProcess
  GetTickCount       GetTickCount
  Sleep              Sleep
  Beep               Beep
  QueryPerformanceCounter    QueryPerformanceCounter      'crash
  QueryPerformanceFrequency  QueryPerformanceFrequency    'crash


quad t1,t2,f
QueryPerformanceFrequency @f
QueryPerformanceCounter @t1
...
QueryPerformanceCounter @t2

double a=(t2-t1)/f

print str a,6


Peter

  • Guest
Re: All Over Crashes
« Reply #2 on: July 16, 2013, 09:37:17 AM »
thanks Charles,  nothing new.

yes this okay,  but QueryPerformanceCounter and QueryPerformanceFrequency don't want to work in a callback. (winproc( sys hwnd, msg, wparm, lparam) as sys callback).
my SetFps routine has no effect here. it shows an instable behaviour.

I think that I will have solved it in the next hours.