code:
function ShutdownApp(hWnd){
var lProcessID = Interop.Allocate(4);
var lProcess = Interop.Allocate(4);
Interop.Call('user32', 'GetWindowThreadProcessId', hWnd, lProcessID);
lProcess.WriteDWORD(0, Interop.Call('kernel32', 'OpenProcess', 1, false, lProcessID.ReadDWORD(0)));
Interop.Call('kernel32', 'TerminateProcess', lProcess.ReadDWORD(0), 1);
Interop.Call('kernel32', 'CloseHandle', lProcess.ReadDWORD(0));
}
This was shown to me by Cook but I am too lazy to convert it to a Plus! script.
http://www.andreavb.com/tip020021.html