>>Hi,
>> I used to do so before using the following parameter:
>>#DEFINE EWX_LOGOFF 0
>>#DEFINE EWX_SHUTDOWN 1
>>#DEFINE EWX_REBOOT 2
>>#DEFINE EWX_FORCE 4
>>#DEFINE EWX_POWEROFF 8
>>
>>ExitWindowsEx(EWX_SHUTDOWN, 0)
>>
>>it do shutdown. !!!! However, if there are many running application while u issue ExitWindowsEx() it won shutdown ... (sometime) but it working last time in Win95..try it out.....!!!! if u can solve my problem please told me ...
>
>You need to use both the EWX_SHUTDOWN and EWX_FORCE flags to close all running apps that fail to respond to SendMessage() via TerminateProcess(). Instead of your existing coding, try:
>
>ExitWindowsEx(EWX_SHUTDOWN + EWX_FORCE, 0)
In addition, if you want to actually power down, you have to use the EWX_POWEROFF flag, and the machine's BIOS has to have soft power support, and a soft switched power supply (most ATX form factor power supplies have this, but not older AT form factor supplies), and you have to install APM support under Win9x.