PureBasic Forum
https://www.purebasic.fr/english/

Crtl+Alt+Del
https://www.purebasic.fr/english/viewtopic.php?f=13&t=4486
Page 1 of 1

Author:  BackupUser [ Thu Aug 29, 2002 3:42 pm ]
Post subject: 

Restored from previous forum. Originally posted by merendo.

Hi @ll.
How to protect a programme from being terminated by Crtl+Alt+Del?

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Author:  BackupUser [ Thu Aug 29, 2002 3:46 pm ]
Post subject: 

Restored from previous forum. Originally posted by Paul.

Use the SEARCH button :)

http://forums.purebasic.com/english/viewtopic.php?t=404

Author:  BackupUser [ Thu Aug 29, 2002 4:12 pm ]
Post subject: 

Restored from previous forum. Originally posted by merendo.

Thanks for reminding me (This is how, you remind me...) :wink:

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Author:  BackupUser [ Thu Aug 29, 2002 4:26 pm ]
Post subject: 

Restored from previous forum. Originally posted by merendo.

Hmm... Sorry none of the codes works. Always: Blah is not a command, an array or a linked list. Or: Assembly error. Please mail us this file!!!

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Author:  BackupUser [ Thu Aug 29, 2002 5:28 pm ]
Post subject: 

Restored from previous forum. Originally posted by Paul.

Did you read the link posted by PB in the above link??

Quote:
you can't do it on WinNT/Win2000/WinXP because of their
security settings. For a Visual Basic discussion about it, please see
this link:

http://groups.google.com/groups?as_q=ctrl%20alt%20del%202000&as_ugroup=comp.lang.basic.visual.misc&hl=en




And also when trying the above mentioned code, did you have INLINE ASM enabled?

Author:  BackupUser [ Thu Aug 29, 2002 5:59 pm ]
Post subject: 

Restored from previous forum. Originally posted by merendo.

Guess I have to change my signature. I AM using Win98SE but it doesn't work. Maybe an AMD K6-2 350MhZ is too slow?

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Author:  BackupUser [ Thu Aug 29, 2002 8:41 pm ]
Post subject: 

Restored from previous forum. Originally posted by PB.

> How to protect a programme from being terminated by Crtl+Alt+Del?

This has always worked for me:
Code:
; Hide app from the Win 9x/ME CTRL+ALT+DEL task list.
; Note: Does NOT work with NT/2K/XP for security reasons.
; Inline ASM does NOT need to be enabled in Compiler Options.
r=GetProcAddress_(GetModuleHandle_("kernel32.dll"),"RegisterServiceProcess")
If r : !push dword 1 : !push dword 0  : !call r : EndIf ; Change 1 to 0 to show.

Author:  BackupUser [ Fri Aug 30, 2002 1:25 pm ]
Post subject: 

Restored from previous forum. Originally posted by merendo.

Thanks. This also works fine for me. But I always had ASM Inline enabled and nothing worked. I guess I have to buy a new chest but no money...

Cu @ll, merendo
--
I've been hiding - What am I hiding from???

Author:  PB [ Tue Apr 06, 2004 8:25 am ]
Post subject: 

This code I posted above used to work, but not anymore. I had to
change it to separate lines like so, but now I get an error for the
"call" line. Anyone know how to bring it up to v3.81's expectations?

Code:
; Hide app from the Win 9x/ME CTRL+ALT+DEL task list.
; Note: Does NOT work with NT/2K/XP for security reasons.
; Inline ASM does NOT need to be enabled in Compiler Options.

r=GetProcAddress_(GetModuleHandle_("kernel32.dll"),"RegisterServiceProcess")
If r
  !push dword 1 ; 1 = Hide, 0 = Show.
  !push dword 0
  !call r
EndIf

Author:  Fred [ Tue Apr 06, 2004 9:12 am ]
Post subject: 

Dunno why it worked before as it's not a correct syntaxe (could work only of no '!' was used and enableinlineasm used. Here is the correct code snippet:

Code:
; Hide app from the Win 9x/ME CTRL+ALT+DEL task list.
; Note: Does NOT work with NT/2K/XP for security reasons.
; Inline ASM does NOT need to be enabled in Compiler Options.

r=GetProcAddress_(GetModuleHandle_("kernel32.dll"),"RegisterServiceProcess")
If r
  !push dword 1 ; 1 = Hide, 0 = Show.
  !push dword 0
  !call dword [v_r]
EndIf


BTW, it's easier to use CallFunctionFast for this kind of task:

Code:
; Hide app from the Win 9x/ME CTRL+ALT+DEL task list.
; Note: Does NOT work with NT/2K/XP for security reasons.
; Inline ASM does NOT need to be enabled in Compiler Options.

r=GetProcAddress_(GetModuleHandle_("kernel32.dll"),"RegisterServiceProcess")
If r
  CallFunctionFast(r, 0, 1)
EndIf

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/