Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Turn off the computer
Message
From
16/12/1999 21:35:06
 
 
To
16/12/1999 21:07:05
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00305053
Message ID:
00305071
Views:
24
>Hi, is there a way to turn off my computer from inside a Visual Foxpro 6 aplication?
>
>Thanks for your help

It depends on if the machine is configured turn itself off when you shutdown windows. There is an API call that you can use to shut windows down, but that's all you can do. Also, with NT or Win2K there are security issues that will prevent your process from shutting down the system completely because it doesn;t inherently have the right. I understand that there are ways around that, but I don't know them...

DECLARE INTEGER ExitWindowsEx IN WIN32API INTEGER Flags, INTEGER
=ExitWindowsEx(5,0)

(5 is the flag for force)
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform