-
Shutdown Pc Timer
Hi, i would like to make a program that shutdown my pc.
Like, i set 3hours timer, than it shutdown.
Would be like that:
I set the timer in a label, then press the button, then the timer starts, when its over it shutdown my pc.
I'm new with c++ programation, help me please.
-
Normally I would give this information out but since one of the most recent viruses exploited this info, I won't give it to you.
Check the Platform SDK and Win32 API reference.
Note that shut down might not be an issue on your system, but it would be an issue on a system that runs an entire assembly line or production facility as this would shut the line down. This is exactly what happened with the recent virus.
And while some of us might think that is cool, trust me, it's not.
-
i see your point!
But see..
I can do it trough DOS, "shutdown -s -t xx", but i would like to run it in a interface, like C and c++, but i'm new at programming.
May u help me?
-
No. I won't
Why don't you try some real C or C++ for starters. Shutting down Windows is very simple but Win32 is not where you need to be at this moment.
-
So i cant do it in a win32 app? Jut in console?
-
Just think for a second about what you said?
Where do you shutdown your PC now? Now does what you said make any sense at all?
Check the SDK.
-
I'm new :(
what's SDK, where i check it?
-
Exactly. Bubba sees a lot of questions on the forum - so he knows that people who ask questions like this are either going to cause problems because they're attempting to control processes they don't fully understand or because they're trying to write malicious software.
SDK stands for Software Development Kit - in this case, the libraries that windows programs can access to do windows-specific functions. MSDN is the best reference, at msdn.microsoft.com.
-
Ok, i'll check there, how do i use:
DWORD InitiateShutdown(
-
That's exactly what we're talking about. You need to start from the beginning of the Win32 API to understand what DWORDs are and how to use them. I recommend Forger's Tutorial (Google for it)
-
I've seen enough - closed.