|
-
September 9th, 1999, 12:50 PM
#1
How to call shutdown from within Visual C++?
I have a program in which I want to provide shutdown facility so that the user can shutdown the computer from my program without going to the start menu. How to perform this task? Can anybody help!!!!
m.v. suresh
-
September 9th, 1999, 01:56 PM
#2
Re: How to call shutdown from within Visual C++?
You should learn to find answers to your question by using the VisualStudio help.
In Visual Studio 6.0, goto menu help->search..
In the MSDN search dialogbox, click on the "Contents" tab. Go to
-->Platform SDK->Reference->Win32 functions by category->System shut down functions. And there you can find all you need to shut down the system.
I hate fat programs as much as I hate being fat myself. I am lean and mean and so is my program.
-
September 9th, 1999, 05:05 PM
#3
Re: How to call shutdown from within Visual C++?
Use this function ExitWindowsEx
-
September 9th, 1999, 05:15 PM
#4
Re: How to call shutdown from within Visual C++?
What parametes are need in that function(ExitWindowsEx)? How do I use it in my code?
-
September 10th, 1999, 11:55 AM
#5
Re: How to call shutdown from within Visual C++?
Thanx steve, Your suggestion has solved my problem.
m.v. suresh
-
September 10th, 1999, 11:43 PM
#6
Re: How to call shutdown from within Visual C++?
Call the windows API ExitWindows or ExitWindowEx for shutting down windows.
A sample is
[ccode]
::ExitWindowsEx(EWX_LOGOFF,0) will logoff the computer;.
::ExitWindowsEx(EWX_SHUTDOWN,0) will shutdown the computer.
See the MSDN for more details about the ExitWindows and ExitWindowsEx.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|