that I have since ages.
This brings me to the question about: which is the correct type
of data equivalent for boolean?
BOOL can be True or False, is'nt it? Sound like it needs only one Byte
or less...
So is the right PB equivalent for boolean Byte.b?
There is a fixed code below, to check if a screensave is activ
or not. It works also with Status.b as Byte. But the Purifier
recognize a corrupt stack after calling it.
Code: Select all
Procedure.L CheckIsScreenSaverActiv()
Protected Status.L, success.b, Bool.b
; Win32hlp: SPI_GETSCREENSAVEACTIVE Determines whether screen saving is enabled.
; The parameter must point To BOOL variable that receives TRUE If enabled,
; or FALSE otherwise.
SystemParametersInfo_( #SPI_GETSCREENSAVEACTIVE, #Null, @Status, #Null )
;SystemParametersInfo_( #SPI_GETSCREENSAVEACTIVE, #Null, @Bool, #Null )
ProcedureReturn Status
EndProcedure
Debug CheckIsScreenSaverActiv()