请教c++高手,在有局域网连接的情况下,如何让对方电脑关机(远程控制),请发整套程序(dev,c++)模式。

如题所述

用socket建立连接,收到指令后调用Shutdown执行关机。追问

可否麻烦发一下c++的程序内容

追答

没有代码

温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-12-04
#include<stdio.h>
#include<dos.h>
#include<stdlib.h>

int main()
{
char shut[8];
char b[81];
char choose;
printf("Hello, Welcome to the automatic shutdown procedures\n");
printf("Your Choose:\n");
printf("Y\tN\n");
scanf("%c",&choose);

if(choose=='Y')
{
printf("Please enter your desired automatic shutdown of time:");
scanf("%s",shut);
sprintf(b,"at %s shutdown -s",shut);
system(b);
}

return 0;
}本回答被提问者和网友采纳
第2个回答  2012-12-09
已经有了啊

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网