Главная страница | назад





Article #28473: How can I log off the current user from within my application?

QUESTION:


How can I log off the current user from within my application?


ANSWER:


You can accomplish this using the WindowsAPI call ExitWindows. To see how this works, drop a TButton component on a form and type in the following code:

procedure TForm1.Button1Click(Sender: TObject);
begin
ExitWindows(0, 0); //both parameters for this call are reserved and you must pass in zero's
end;

Last Modified: 28-FEB-02