bool Disconnect(string)
Disconnects a wifi interface.
Security
Trust Level Required: Full Trust
Parameters
Name | Description |
interfaceGUID |
string The GUID of the interface to disconnect. This must match the GUID of one of the items returned by GetInterfaces(). |
Return
True if disconnect was successfully requested, false otherwise.
Remarks
This function is asynchronous, and will fire the OnConnectionRequestCompleted callback when the request has been completed.
Examples
// attempts to disconnect the first interface.
var interfaces = KioWiFi.GetInterfaces();
if (interfaces.length == 0) {
alert('No network interfaces were detected');
return;
}
var networks = KioWiFi.Disconnect(interfaces[0].guid);
function OnConnectionRequestCompleted(connChangedResult) {
if (!connChangedResult.result)
alert('Failed to disconnect');
else
alert('Disconnected ' + connChangedResult.iface.interfaceName);
}
Requirements
KioWare for Windows version 8.14 or greater.