The information in this article applies to:
SUMMARY
In some cases, you may need to provide a FoxPro application with the
ability to restart the computer. FoxPro doesn't have the capability to do
this directly, so it needs to call functions at the operating system level.
MORE INFORMATIONMethod One
Method TwoYou can get similar performance from an XCMD or from an MLB that calls routines in the Shutdown Manager (in particular ShutDwnStart() to restart, and ShutDwnPower() to shut down the machine).The following C code can be used to create an MLB that can be called from within FoxPro:
Once this is created, placed in a Shared Library such as Restart.mlb, and
saved to the Extensions Folder in the System Folder, it can be called with
the following code in FoxPro:
NOTE: Under Windows, you can co this with the ExitWindows API as referenced
in the the following articles in the Microsoft Knowledge Base:
Q109607 How to Reboot the System from Within FoxPro Additional query words: VFoxMac FoxMac MAC shutdown shut down
Keywords : kbcode FxinteropGeneral |
Last Reviewed: December 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |