Title: Dimke Kill Screensaver
Picture: Dimke Kill Screensaver Screenshot
Explanation: - This utility is for educational purposes only -

It shows how to to write a program that runs as a hidden process, waits for a given amount of seconds and then searches for the screensaver process and terminates it, even if it is password protected.

How it works:

On program start the command line which is passed to the program and which contains the timeout value, is stored in a variable and a timer is set.
Every 1000ms one timer event is created by the operating system and these events are counted.
When the timeout value is reached the program determines the handle of the active window, because when a screensaver is running then this is the active window.
If the active window is belonging to a screensaver process then its classname is by definition "WindowsScreenSaverClass". So, if this condition is true, Dimke Kill Screensaver simply kicks this process out of the memory and so the screensaver is terminated.

Important, read this:
If someone calls the screensaver's password dialogue while Dimke Kill Screensaver gets a timeout and consequently tries to find the screensaver process, then the active window is the mentioned password dialogue window, which does not belong to the "WindowsScreenSaverClass" and so the screensaver process will not be found.

How to use: Calling convention: killscsv.exe [number of seconds to wait].
E.g., killscsv.exe 30
Download Exe: exe_w16.zip
Download Src: src.zip
[Developer Root] [Main Page]