Solved

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

Posted on 1998-09-15
10
391 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

810 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