Using DirectShow it would not even be complex - could be done in just a few lines of code.
Using DirectShow it would not even be complex - could be done in just a few lines of code.
"You do realize that this is just an exercise, right?"
(There is no way to win this game by giving the best solution to it. The better you get, the worse you get.
In other words: the only way to win is not to play the game.)
rootkit and write your own display driver?
"setting their program as the screen saver, disabling the mouse and keyboard devices, and then invoking the screen saver on the secure desktop."
or
"enumerating all the processes on the system, attaching to each one with debug privilege, and suspending all the threads."
"will most likely lead apps to crash" - you're a developer who's attempting to hack somebody else's app so that yours stays on top. This is a regular topic on Raymond Chen's blog - the kind of developer who does this isn't normally worried about a bit of crashing.
And in the second part you're not paying attention to the constraints. If you want to simply kill all programs, that's easy in windows. The problem described above is to keep the system running, but become the topmost window. So a solution that causes crashes is not a solution.
Crashing a windows program is trivially easy, and it would "solve" the problem, but that's not the right kind of solution.
Because i could still just have my process kill your process and take over exclusive screen access... there's no winning this game.
Also, exclusive access to the screen does not guarantee your program will go uninterrupted. Retaining exclusivity is impossible, because you just might get an ALT+TAB, CTRL+ALT+DEL or a WM_KILLFOCUS from who knows where. There are custom techniques for getting around each of those, but they're all along the lines of what's described in the article. Attaining and retaining exclusive access to the screen is next to impossible.
If someone came ahead of time to prevent it from ever gaining screen access, then that would be a problem, but since the order of app launches are known and can be controlled, it would still work.