|
-
March 29th, 1999, 10:08 PM
#1
Restart a computer
I have a problem : You see my ISP gives me an IP addressfor three hours and then it changes it. But sometimes I amdoing stuff on my computer or I am just leaving it on standby and it blocks the IP changing request so what I wanted to do was to just make a nice little timer that will tell me to restart my computer or do it itself if I am not there. But I need to know if there is a code that makes a programm reboot the computer....
-
March 29th, 1999, 10:14 PM
#2
Re: Restart a computer
Hi,
you can use the function
ExitWindowsEx (EWX_REBOOT ,0)
Raphael
-
April 5th, 1999, 06:56 AM
#3
Re: Restart a computer
Just call int 19h in some way
asm int 0x19
or get a far pointer to its function and then call it
See the Assembler Help for the exact memory areas
-
November 7th, 1999, 07:38 PM
#4
Re: Restart a computer
There is an Api that make this and is called ExitWindowsEx the sintax is
BOOL ExitWindowsEx(UINT uFlags, DWORD dwReserved);
the argumen uFlags can take this constants:
For exit windows EWX_SHUT_DOWN
For Reboot the system EWX_REBOOT
the second param is reserved for future used and is ignored
Exampled
void CShutWindow::OnBottonShutDown()
{ if(!ExitWindowsEx(EWX_SHUTDOWN, 0))
AfxMessageBox("Can´t shut the system");
}
If you have any problem please contact with me.
I have another problem and if you can help me I agree you.
This is that I want to capture the entire screen using Visual C++
and change the resolution of the bitmap for save this in the minium
space in the disk. If know how to do it or where can I find Help please
write me. Thenk you
-
April 30th, 2000, 12:55 PM
#5
Re: Restart a computer
The following line will restart the computer ::-->
ExitWindowsEx(EWX_REBOOT,NULL)
Webmaster of (Code Master)
-
September 4th, 2001, 10:09 AM
#6
Re: Restart a computer
If you want to restart a computer, I think you must be administrator on your machine. Pay attention to this.
-
September 4th, 2001, 10:12 AM
#7
Re: Restart a computer
Can you tell me how to get a far pointer to the function "asm int 0x19"? Because I don't get how to include this line into my VC++ program.
Regards
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
|