How to disable the screen-saver when running blitz

Blitz3D Forums/Blitz3D Programming/How to disable the screen-saver when running blitz

Here, I translated the routine:
;this program needs user32.decls in c:\program files\blitz3d\userlibs
;with the following function declaration:
;---------------
;api_SystemParametersInfo% (uAction%, uParam%, lpvParam*, fuWinIni%) : "SystemParametersInfoA"
;-------------

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()

;disable screensaver
EnableScreenSaver(False)

;test if screensaver is active
;this assumes the delay is set to 1 minute
starttime = MilliSecs()
Repeat

	tme = MilliSecs() - starttime
	Cls
	Text 0, 0, 60 - (tme / 1000)
	Flip
	
Until KeyHit(1)

;enable screensaver
EnableScreenSaver(True)

End

Function EnableScreenSaver(lActiveFlag%)

  bank = CreateBank(255)
  value = api_SystemParametersInfo(17, lActiveFlag, bank, 0)
  FreeBank bank
  return value

End Function