Page 1 of 1

Posted: Thu Aug 29, 2002 3:42 pm
by BackupUser
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???

Posted: Thu Aug 29, 2002 3:46 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.

Use the SEARCH button :)

viewtopic.php?t=404

Posted: Thu Aug 29, 2002 4:12 pm
by BackupUser
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???

Posted: Thu Aug 29, 2002 4:26 pm
by BackupUser
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???

Posted: Thu Aug 29, 2002 5:28 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.

Did you read the link posted by PB in the above link??
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=ct ... misc&hl=en

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

Posted: Thu Aug 29, 2002 5:59 pm
by BackupUser
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???

Posted: Thu Aug 29, 2002 8:41 pm
by BackupUser
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: Select all

; 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.

Posted: Fri Aug 30, 2002 1:25 pm
by BackupUser
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???

Posted: Tue Apr 06, 2004 8:25 am
by PB
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: Select all

; 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

Posted: Tue Apr 06, 2004 9:12 am
by Fred
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: Select all

; 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: Select all

; 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