|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
Join Date: Jul 2002
Location: University of California, Santa Barbara
Posts: 800
|
Shutdown windows
Is there an API call I can use from c++ or another laguage to shut down windows?
|
|
|
|
|
|
#2 |
|
Member (12 bit)
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
|
Yeah, just call the API function ExitWindowsEx(UINT uFlags, DWORD dwReserved);
I assume you have win32.hlp (WinAPI programmer's reference) if you're asking about API calls, that has more detailed info on ExitWindowsEx. In a NT/2K/XP version, you probably need to grant your process the ability to shut the computer down. Last edited by Paul Victorey; 11-21-2002 at 08:59 PM. |
|
|
|
|
|
#3 |
|
Professional gadfly
|
See this article for using the ExitWindowsEx API with Windows NT/2K/XP.
|
|
|
|
|
|
#4 |
|
Member (10 bit)
Join Date: Jul 2002
Location: University of California, Santa Barbara
Posts: 800
|
Thanks for the info guys.
This "win32.hlp," I'm not sure if I have it. Where would it be if I had it? Where can I get it if I don't? |
|
|
|
|
|
#5 |
|
Member (12 bit)
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
|
Any compiler capable of making Windows code should include it, MS has it hidden on their site somewhere, too. It's free, about 12 MB in size. Do a file search on your harddrive for win32.hlp.
If you want me to email it (keeping in mind it's 12 MB) I can. Or if you have an FTP or such that you want me to upload it to, I will. Edit: I think MS includes it with their platform SDK: http://www.microsoft.com/msdownload/...sdk/sdkupdate/ But that's probably much larger than 12 MB. If size is a problem, I can give you the 12 MB version. If it's for a short time, I should have enough webspace on an account of mine. Last edited by Paul Victorey; 11-21-2002 at 11:17 PM. |
|
|
|
|
|
#6 |
|
Member (10 bit)
Join Date: Jul 2002
Location: University of California, Santa Barbara
Posts: 800
|
Thanks Paul, I've got Visual c++, but after a recent windows reinstall, I haven't put the c++ back on it yet.
I'll install it now, and see if it has it. |
|
|
|
|
|
#7 |
|
Member (10 bit)
Join Date: Jul 2002
Location: University of California, Santa Barbara
Posts: 800
|
My visual c++ doesn't have win32.hlp, its just the student edition.
My yahoo mail has a 6mb limit, and I'm currently having trouble getting my mail server to work (it sends, but doesn't recieve), so that wouldn't work out. I could put an ftp server program on my server easily enough, maybe even by tonight. I'll get cracking on that. Edit: I set up an ftp account for you on my server that you can upload to. I'll pm you the domain name, user name, and password Paul. Thanks! Last edited by mattg2k4; 11-22-2002 at 10:05 PM. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|