The information in this article applies to:
SUMMARY
You can restart Windows from inside a FoxPro for Windows application by
using the Windows API function ExitWindows(). With this function, you can restart Windows without rebooting the entire system, as explained below. MORE INFORMATION
By using FOXTOOLS.FLL and the Windows API function ExitWindows(), you can restart Windows. The following code illustrates this concept.
The ExitWindows() function requires two numeric values to be passed in and returns a single integer. The significance of the first integer (66) is that it is the decimal equivalent of 0x42 hexadecimal or EW_RESTARTWINDOWS, which is a low-order word in the C++ language. The second integer is reserved and is always zero. When the ExitWindows() function is called, it sends a message to all active applications that a request has been made to restart Windows. If all applications "agree" to be terminated, the WM_ENDSESSION message will be sent to all applications before Windows is restarted.
REFERENCESVisual C++ Help file Additional query words: VFoxWin FoxWin 2.50 quit restart exit 3.00 2.50a
Keywords : kbcode FxprgFoxtools |
Last Reviewed: December 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |