How to make application disable/invoke the current screen-saver

How to make application disable/invoke the current screen-saver

Question:
I have a small application that monitors Windows’ resources GDI and users as well as controlling Windows’ exit/restart/reboot. I would like it to be able to disable/invoke the current screen-saver as well. I can’t find anything in the Windows SDK to help me.

Answer:
The API function to enable and disable the screen-saver underWindows is SystemParametersInfo, a function responsible for getting and setting most of the control panel settings such as double-click speed, mouse trails, screensaver timeout, icon title wrap and screen-saver active.

The format of the command is as follows:

BOOL SystemParametersInfo(      UINT uiAction, // system parameter to query or set      UINT uiParam,  // depends on action to be taken      PVOID pvParam, // depends on action to be taken      UINT fWinIni   // user profile update flag     ); 
You will need to use the SPI_GETSCREENSAVEACTIVE action, which is decimal16, to get the current setting, and SPI_SETSCREENSAVEACTIVE action, whichis decimal 17. The uiParam should be set to the value TRUE/FALSE for the newsetting, and a Boolean passed by reference in pvParam to receive thecurrent setting.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across