Solved

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

Posted on 1998-09-15
10
394 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

738 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