Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExitWindowsEx always reboot but not off!
Message
From
06/02/1999 01:45:00
 
 
To
05/02/1999 20:54:21
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00184610
Message ID:
00184656
Views:
21
>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)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform