Wire.cpp: Defines the entry point of the console application.
//
#include <iostream>
#include <string.h>
using namespace Std;
int main ()
{
for (;;)
{
cout << "1 Turn on wireless, 2 reset wireless, 3 off wireless:";
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 << "Please enter wireless name:";
CIN >> SSID;
cout << Endl;
cout << "Please enter the wireless password:";
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;
}
Self-made wireless sharing tool C + + source code and creation process