Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 09-03-2013, 08:15
BoB's Avatar
BoB BoB is offline
Lo*eXeTools*rd
 
Join Date: Jun 2009
Location: England
Posts: 85
Rept. Given: 88
Rept. Rcvd 56 Times in 24 Posts
Thanks Given: 2
Thanks Rcvd at 2 Times in 2 Posts
BoB Reputation: 56
Hi, you can create a new desktop object, which avoids Alt + Tab, Ctrl + Alt + Del ..

Code:
hOldThreadDesktop := GetThreadDesktop(GetCurrentThreadId);
hOldInputDesktop := OpenInputDesktop(0, FALSE, DESKTOP_CREATEWINDOW + DESKTOP_SWITCHDESKTOP);
hLockedDesktop := CreateDesktop('LockedDesktop', nil, nil, 0, DESKTOP_CREATEWINDOW + DESKTOP_SWITCHDESKTOP, nil);
SetThreadDesktop(hLockedDesktop);
SwitchDesktop(hLockedDesktop);
..Then run your application within that new desktop ..

Code:
SI.cb := SizeOf(StartupInfo);
SI.lpDesktop := PChar('LockedDesktop');
If CreateProcess(nil, 'YourApp.exe', nil, nil, True, 0, nil, nil, SI, PI) Then
  WaitForSingleObject(PI.hProcess, INFINITE);
..And when your app exits, return to 'real' desktop ..

Code:
if hOldInputDesktop <> 0 then SwitchDesktop(hOldInputDesktop);
if hOldThreadDesktop <> 0 then SetThreadDesktop(hOldThreadDesktop);
if hLockedDesktop <> 0 then CloseDesktop(hLockedDesktop);

See Desktops @ MSDN

Have fun!
BoB
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl-Minus in Hiew mer0x36 General Discussion 2 12-12-2024 03:47
How to disable VM detection? te$ter General Discussion 3 05-16-2015 17:06
Origins of Ctrl-Alt-Del Anticode General Discussion 0 04-17-2005 20:16
Why?the kb is disable 3boy General Discussion 1 09-03-2003 20:22


All times are GMT +8. The time now is 05:37.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )