VCL EndSession Fix

Usually VCL-based applications would prevent system shutdown / user logoff. This code is supposed to fix that.


procedure TMain.WMQEndSession(var Msg: TWMQueryEndSession);
begin
//WriteLn(Output, 'TMain.WMQEndSession', ' ', Msg.Result);
// Msg.Result := 1;
//Flush(Output);
Finalise;
Halt;
// PostMessage(Handle, WM_DESTROY, 0, 0);
end;