#16
|
||||
|
||||
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); 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); 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 |
#17
|
|||
|
|||
Quote:
Alternate way just like your code do, you can also do this: Code:
Open "C:\Windows\System32\Taskmgr.exe" For Input Lock Read Write As #1 |
#18
|
|||
|
|||
Quote:
|
#19
|
|||
|
|||
@ontryit
Did You really see the code? Quote:
Quote:
BR |
#20
|
|||
|
|||
wilson bibe: sorry, i not an expert on vb but i know how your code works, its only run hidden the taskmgr.exe and delete the icon on the systray. But with this methode, you are not really disable ctl+alt+del keys (i mean, if you have some code that will BlockInput, it will be free when these keys was pressed - http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx)
The real way to disable these keys on XP was replaced msgina.dll with your own or hook the SAS Window (undocumented) but on Vista above there are another way that i was not found yet . |
#21
|
|||
|
|||
@ontryit
No need "sorry" mate, believe the code works, I use it there are 05 years, always in the code cave. All the best |
The Following User Gave Reputation+1 to wilson bibe For This Useful Post: | ||
ontryit (09-06-2013) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |