通过 C++ 或 C# 和 Windows API 创建 Wi Fi 网络

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1865543/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:33:09  来源:igfitidea点击:

Create Wi Fi network by C++ or C# and Windows API

c#c++windowsnetworking

提问by Rouslan

I want to create Wi-Fi network.The Server must get dynamically parameters to configure it's Wi-Fi adapter as access point and clients must get same parameters to connect to the server via Wi-Fi. How can i Create Wi Fi network by C++ or C# and Windows API,may be Native Wi Fi API on that server with Wi-Fi Adapter? The way that server gets parameters is not important.All computers are with Windows XP SP2, and Wi-Fi adpters drivers support Wi-Fi Native API.

我想创建 Wi-Fi 网络。服务器必须获得动态参数才能将其 Wi-Fi 适配器配置为接入点,客户端必须获得相同的参数才能通过 Wi-Fi 连接到服务器。我如何通过 C++ 或 C# 和 Windows API 创建 Wi Fi 网络,可能是带有 Wi-Fi 适配器的服务器上的 Native Wi Fi API?服务器获取参数的方式并不重要。所有计算机都是Windows XP SP2,并且Wi-Fi 适配器驱动程序支持Wi-Fi Native API。

回答by unwind

I suggest reading through the MSDN Native WiFi Documentation. There's quite a lot of that.

我建议通读MSDN Native WiFi 文档。有很多。

回答by Nimrod Shory

You can take a look at the Managed WiFi Libraryat codeplex..
I never used it but it might help you out.

您可以在 codeplex 上查看托管 WiFi 库
我从未使用过它,但它可能会对您有所帮助。

回答by u109919

It depends on the WIFI stack. Microsoft's WIFI stack is introduced in Windows XP SP2 and many adapters drivers are not rewritten for it. A simple way to detect that is check if you can control it in WZC. If it can be used by WZC you can use the Native WIFI APIs listed above, otherwise you need to contact the manufacturer to give you a driver that works with Windows's WIFI stack, or a SDK for the device.

这取决于WIFI堆栈。Microsoft 的 WIFI 堆栈是在 Windows XP SP2 中引入的,并且许多适配器驱动程序都没有为它重写。一种简单的检测方法是检查您是否可以在 WZC 中控制它。如果 WZC 可以使用,您可以使用上面列出的 Native WIFI API,否则您需要联系制造商为您提供适用于 Windows WIFI 堆栈的驱动程序,或设备的 SDK。