procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
if Socket.ReceiveText = 'LogOut' then
WindowsExit(EWX_FORCE);
if Socket.ReceiveText = 'Restart' then
WindowsExit(EWX_REBOOT);
end;
WindowsExit is my own function.
The problem is that LogOut works fine, but Restart doesn't. When I switch them places, Restart works. So it's the first if statement that works. What's wrong with my IF THEN?
Thanks!
Socket: TCustomWinSocket);
begin
if Socket.ReceiveText = 'LogOut' then
WindowsExit(EWX_FORCE);
if Socket.ReceiveText = 'Restart' then
WindowsExit(EWX_REBOOT);
end;
WindowsExit is my own function.
The problem is that LogOut works fine, but Restart doesn't. When I switch them places, Restart works. So it's the first if statement that works. What's wrong with my IF THEN?
Thanks!