Just fumbling around with some of my likely-never-to-finish hobbiest projects and diving into the wonders of Win32 programming again.
It seems you can pretty much mess with any Window thats run from the same user account. Figure sending them a message to just kill the UI (in a rather kick-in-the-teeth way) - it works rather well closing every window including explorer.exe (eg the icons on your desktop and the start menu are gone). Code for doing this is rather simple:
I know that a evil program can and should be able to do alot of damage on an open system (its very much the point of an open system that you are rather unrestricted in your own user-turf), but this this is effectively messing with other processes which shouldnt be allowed!
Pretty much every window program expects some order in the way the windows are closed, this violates it - leading to leaks and processes that still run without UI but were never expected to do so (cause usually there are other notifications if windows are closed)
It seems you can pretty much mess with any Window thats run from the same user account. Figure sending them a message to just kill the UI (in a rather kick-in-the-teeth way) - it works rather well closing every window including explorer.exe (eg the icons on your desktop and the start menu are gone). Code for doing this is rather simple:
Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// just there to automatically link with user32.dll (if using MS Compiler)
#pragma comment(lib, "User32.lib")
int main() {
PostMessage(HWND_BROADCAST,WM_QUIT,0,0);
}
I know that a evil program can and should be able to do alot of damage on an open system (its very much the point of an open system that you are rather unrestricted in your own user-turf), but this this is effectively messing with other processes which shouldnt be allowed!
Pretty much every window program expects some order in the way the windows are closed, this violates it - leading to leaks and processes that still run without UI but were never expected to do so (cause usually there are other notifications if windows are closed)