Re: Shut Down using assembly

From: hBifTs (hBifTs_at_hotmail.com)
Date: 01/29/04


Date: Thu, 29 Jan 2004 20:14:40 +0000 (UTC)

Hello

> Hi.
> Does any one know what are the procedures to create a assembly code to power off the PC?, Do I have to go back to real mode? which int shoul I call?
>
> thanks Profetas
>
you can use windows api ExitWindowsEx(..)

The ExitWindowsEx function either logs off the current user, shuts down
the system, or shuts down and restarts the system. It sends the
WM_QUERYENDSESSION message to all applications to determine if they can
be terminated.

It defines as
BOOL ExitWindowsEx(
  UINT uFlags,
  DWORD dwReason
);
more info you can get from MSDN~

-- 
hBifTs <hBifTs@hotmail.com>