See mskb #
Q251310 HOWTO: Exit Windows from Visual FoxPro (Q251310).
>Hi,
>
>I need to ShutDown the computer from VFP. OS is Windows 2000. I tried the following code, but the reboot option (Value 2) does not work. (Pasing a Value of 4 seems to work fine)
>
>Declare integer ExitWindowsEx in USER32.DLL integer uFlags, integer dwReserved
>#define EWX_FORCE 4
>#define EWX_LOGOFF 0
>#define EWX_REBOOT 2
>#define EWX_SHUTDOWN 1
>
>ExitWindowsEx(2,0) && 2 does not work
>
>
>Can anyone help?
>TIA
--sb--