Notice Of Closure

Please note that this website is due to close down on 15th June 2020.

In the interim I will try to move as much content as possible over to my GitHub account. Thanks to everyone who has supported the site over the years.

» Help

Programatically log users off

   

You may be thinking how can I use this procedure. Well I used it in a program where I could send commands to a remote machine.

procedure LogOff;
begin
  ExitWindowsEx(EWX_LOGOFF, 0);
end;
Note
No "reason" code was passed to the second parameter of the ExitWindowsExfunction. This is not recommended by Microsoft – See the MSDN entry for ExitWindowsEx.
Author: Shlomo Abuisak
Contributor: Shlomo Abuisak
Added: 2009-11-05
Last updated: 2009-11-05

« Return to contents »