1. Home
  2. Computing & Technology
  3. Delphi Programming

Programmatically Exit From Windows using Delphi code

By , About.com Guide

Here's how to exit from Windows using Delphi and Windows API

//reboot windows
ExitWindowsEx(EWX_REBOOT, 0) ;

//shut down windows
ExitWindowsEx(EWX_SHUTDOWN, 0) ;

// log off and prompt for login
ExitWindowsEx(EWX_LOGOFF, 0) ;
Delphi tips navigator:
» Empty Recycle Bin
« Get Memory Status
Explore Delphi Programming
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2001 Delphi Tips
  7. Programmatically Exit From Windows using Delphi code

©2010 About.com, a part of The New York Times Company.

All rights reserved.