Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to shut down Window98 within a foxpro program?
Message
From
05/09/2000 16:46:33
 
 
To
05/09/2000 16:29:15
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00409053
Message ID:
00412647
Views:
21
>>>> Can anyone tell me the way to shut down window98 on quiting foxpro program? I am using Visual foxpro 6.0.
>>>
>>>Use
>>>
>>>RUN RUNDLL32.EXE user.exe,exitwindows
>>
>>A better way is to use the ExitWindowsEx() API call; it's documented in the FAQ and the Windows API section.
>
>How can API call exit Windows better than a RUN command?

You have more available options through ExitWindowsEx() (the code you give forces a powerdown if APPC is enabled), it doesn't pop up a DOS box, you don't rely on having an intact Windows search path, and it works on other platforms, defaulting the behavior to logging out the current user if the user does have adequate privileges to force a restart of Windows. The code you list doesn't work under Win2K, for example. YMMV.
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
Reply
Map
View

Click here to load this message in the networking platform