Solved

How to disable Ctrl+Alt+Del for a screen saver ?

Posted on 1998-09-15
10
392 Views
Last Modified: 2010-04-02
Dear all,

I am developing my own screen saver using Visual C++ 5.0.
Does anyone know how to disable Ctrl+Alt+Del for a screen saver?

Thanks and best regards
0
Comment
Question by:essneo
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1172816
You can use SystemParametersInfo() with the SPI_SCREENSAVERRUNNING index

However, this will work only in windows 95.  Forget trying to dissable control-alt-delete in NT.  They aren't going to let that happen.  
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172817
Note, I believe the uiPrame should be a bool that indicates if the screen saver is running.  This isn't documented since you aren't supposed to be doing this.  (Something to consider?)
0
 
LVL 4

Expert Comment

by:agreen
ID: 1172818
I have a code (written by myself) that disables the Ctrl-Alt-Del under Windows NT. I'll release it soon.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:agreen
ID: 1172819
Also I plan to write the same code for Windows 95.
0
 
LVL 1

Expert Comment

by:dsch
ID: 1172820
//Put this in yiour header:

#define REGISTER 0
#define UNREGISTER 1  
typedef DWORD (WINAPI *fp_RegServProc) (DWORD, DWORD);
fp_RegServProc pRegisterServiceProcess = NULL;

//Then this in your program, (eg ONCREATE):
pRegisterServiceProcess = (fp_RegServProc) GetProcAddress (GetModuleHandle ("KERNEL32.dll"), "RegisterServiceProcess");
      pRegisterServiceProcess (0, UNREGISTER);
Please Try it.
This work for me. I got it from another experts-exchange question that I looked at.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172821
RegisterServiceProcess() has other effects as well.  It indicates the process is a service and should not be terminated when the user logs off.
0
 

Author Comment

by:essneo
ID: 1172822
Thanks for your answer, but it doesn't seem to work.

However, the comments provided by DSCH seems to work.
Special thanks to him for him valuable comments.

I would also like to thank those who have provided their comments.

Best regards,
Neo
0
 
LVL 1

Expert Comment

by:dsch
ID: 1172823
nietod
>>RegisterServiceProcess() has other effects as well.  It indicates the process is a service and should not be terminated when the user logs off.
Does this mean that if using RegisterServiceProcess(), and your program started each time a logon was made that a second copy of your program could be loaded if you log off and log on again?
 
0
 
LVL 1

Expert Comment

by:dsch
ID: 1172824
By the way,
Does anyone know where we can find more info about the functions in KERNEL32.dll?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1172825
>> Does this mean that if using RegisterServiceProcess(), and your
>> program started each time a logon was made that a second copy
>> of your program could be loaded if you log off and log on again?
Yes--but you could prevent that.   by detecting if a copy was already running.

RegisterServiceProcess() is really designed for programs that perform general services, like a print monitor.  I guess a screen saver could also fall into that category.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question