It is currently Sat Aug 24, 2019 5:33 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject:
PostPosted: Thu Aug 29, 2002 3:42 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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???


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 29, 2002 3:46 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Paul.

Use the SEARCH button :)

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 29, 2002 4:12 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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???


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 29, 2002 4:26 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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???


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 29, 2002 5:28 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 29, 2002 5:59 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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???


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 29, 2002 8:41 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 30, 2002 1:25 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
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???


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 06, 2004 8:25 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Fri Apr 25, 2003 5:24 pm
Posts: 7581
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 06, 2004 9:12 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13611
Location: France
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye