• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
DeemonLiang
博客园    首页    新随笔    联系   管理    订阅  订阅

自制无线共享工具C++源代码及创建过程

// wire.cpp : 定义控制台应用程序的入口点。
//

#include <iostream>
#include <string.h>
using namespace std;
int main()
{
for (;;)
{
cout << "1开启无线,2重新设置无线,3关闭无线:";
int n;
cin >> n;
if (n == 1)
system("netsh wlan start hostednetwork");
else if (n == 2)
{
char destination[100] = "netsh wlan set hostednetwork mode=allow ssid= ";
char ssid[100], key[100], keyh[100] = " key=", *k = " ";
cout << "请输入无线名字:";
cin >> ssid;
cout << endl;
cout << "请输入无线密码:";
cin >> key;
cout << endl;
strcat(destination, ssid);
strcat(destination, keyh);
strcat(destination, key);
system(destination);
system("netsh wlan start hostednetwork");
}
else
system("netsh wlan stop hostednetwork");
}
return 0;
}

 

posted @ 2015-10-13 12:17  DeemonLiang  阅读(429)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3