Introduction
How we can Shutdown a system OR Restart or Log Off or Hibernate or ....
This program is a good example for this Task.
I define Fuction as a Library , and then voice it into my program(Name my program is :TurnOffWindows ).
according to :
Merge Library TurnOffComputer to program.
#if !defined(AFX_TURNOFFWINDOWSDLG_H__1AA55971_5022_4C8B_9700_D0A6791694F2__INCLUDED_)
#define AFX_TURNOFFWINDOWSDLG_H__1AA55971_5022_4C8B_9700_D0A6791694F2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TurnOffComputer.h"
use from this Library into my program.
void CTurnOffWindowsDlg::OnButtonRun()
{
UpdateData(TRUE);
CTurnOffComputer MyTurnoff;
MyTurnoff.Active(m_radio);
}
Notice :
m_radio is a integer value .
if value m_radio is 0 ,So your computer will Shutdown .
Too :
<PRE> 1-->Restrat
2-->Log Off
3-->Stand by
4-->Hibernate
For give more information you can download files it in this first section.
I'm from Iran, and Live in Ardakan City.
I'm Computer engineering (HardWare-Software).
I'm Programmer . (VC++ , C++ , Assembly , Basic , C# , Web Programing [ ASP,Php ])