Crtl+Alt+Del
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Paul.
Did you read the link posted by PB in the above link??
And also when trying the above mentioned code, did you have INLINE ASM enabled?
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?
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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:
> 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.
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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?
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
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:
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
!push dword 1 ; 1 = Hide, 0 = Show.
!push dword 0
!call dword [v_r]
EndIf
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