I need a way to "cut the power" of my WLan device.
Currently I use a PowerShell script to disable the network interface, but I'm not sure if this also really stops the device from scanning and so on. If its possible I'd like to implement this with C++ or C# via WinAPI/WMI.
Current PowerShell Script:
$WLanDeviceID = 11
$WLanAdapter = gwmi Win32_NetworkAdapter | Where-Object {$_.DeviceID -eq $WLanDeviceID}
if ($WLanAdapter.NetEnabled) {
$WLanAdapter.Disable()
} else {
$WLanAdapter.Enable()
}
Hardware and Software I'm using:
Windows 7
Visual Studio 2010
Dell Wireless 1397 WLAN Mini-Card (seems to be a Broadcom BCM94312HMG)