[DllImport("wlanapi.dll")]public static extern int WlanConnect([In] IntPtr clientHandle,[In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,[In] ref WlanConnectionParameters connectionParameters,IntPtr pReserved);你的那个WlanConnect()函数怎么调用成功的?这个是不是来连接指定的wifi?
1 回答
慕田峪9158850
TA贡献1794条经验 获得超7个赞
是的调用是这样的WLAN_CONNECTION_PARAMETERS wlanConnectionParameters = new WLAN_CONNECTION_PARAMETERS();
wlanConnectionParameters.dot11BssType = DOT11_BSS_TYPE.dot11_BSS_type_any;
wlanConnectionParameters.dwFlags = 0;
wlanConnectionParameters.strProfile = "dlink";
wlanConnectionParameters.wlanConnectionMode = WLAN_CONNECTION_MODE.wlan_connection_mode_profile;
WlanConnect(ClientHandle,ref pInterfaceGuid,ref wlanConnectionParameters ,new IntPtr());
添加回答
举报
0/150
提交
取消