delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback



Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi








Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (5)


Reboot Windows 98 and Log Off Windows 2000/XPFormat this article printer-friendly!Bookmark function is only available for registered users!
Product:
Delphi 5.x (or higher)
Category:
Win API
Skill Level:
Scoring:
Last Update:
12/14/2001
Search Keys:
delphi delphi3000 article borland vcl code-snippet windows-98 windows-2000 windows-xp reboot log-off
Times Scored:
8
Visits:
9421
Uploader: David Cardeiro
Company:
Reference: http://www.cronoassiste.pt/delphi
 
Question/Problem/Abstract:
How can i reboot my windows?
Answer:



To Reboot your computer you just have to insert the next code:

    ExitWindowsEx(EWX_FORCE and EWX_REBOOT);

This line of code while cause a LogOff in Windows 2000 and Windows XP.

If you need to ShutDown the line of code is:

    ExitWindowsEx(EWX_FORCE and EWX_SHUTDOWN);

For more informaction about this, just write ExitWindowsEx in your program and then press F1 and will appear the help related with this function.





Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment
rah dovom - way tow
    payam ahmadvand (Sep 1 2005 3:30PM)

shoma mitavanid file shutdown.exe ra az shakhe windows ajra konid
you can run shutdown.exe in the Dirctory Windows
Respond

hi
    ss (Jul 29 2004 8:42AM)

printf($pass + "::" + $username);
Respond

baraye iraniha
    Mehrdad farrokhmanesh (Jul 26 2004 12:12PM)

yek mesal baraye delphi baraye irani ha
biroon raftan az delphi
1-close;
2-application.terminate;
3-halt;
Respond

for all windows platforms
    Sean Aulason (May 18 2002 4:15PM)

just try ExitWindowEx.

you can find all parameters and valid values in sdk help.

HTH,
Sean

Respond

Hack
Dr Saeed (Aug 24 2003 2:58PM)

Windows 2000 Advance
Listen Port:  112
Please hack this Bad Operation System
Respond














 
Sign up to consume product discounts for Bronze memberships !

read more


   


  Community Ad of
L. Rosenstein
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)