How to determine if a network is hidden?

时间:2019-03-19 15:08:38

标签: c# .net network-programming

My application allows users to connect to various networks. A network may be hidden and so they would have to manually add the SSID field of the network they wish to connect to. The problem is that when I connect to this network I have to add nonBroadcast=true to the profile xml. But this connection occurs downstream away from the ui layer and it does not know if the network it is connecting to is hidden or not. So is there a relatively painless way for me to check if network A is hidden or not (downstream away from ui) so I can toggle that configuration in the profile xml for hidden networks and not toggle it for non-hidden networks.

See https://docs.microsoft.com/en-us/windows/desktop/nativewifi/non-broadcast-profile-sample

0 个答案:

没有答案