Solved

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

Posted on 1998-09-15
10
389 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
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 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 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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now