Switch WIFI Command

Enum CEDEVICE_POWER_STATE
PwrDeviceUnspecified = -1
D0 = 0
D1
D2
D3
D4
PwrDeviceMaximum
End Enum

Public Shared Function DevicePowerNotify(ByVal device As String, ByVal state As CEDEVICE_POWER_STATE, ByVal flags As Integer) As Integer
End Function

Public Shared Function SetDevicePower( _ ByVal pvDevice As String, _ ByVal df As Integer, _ ByVal ds As CEDEVICE_POWER_STATE) As Integer
End Function

Public Shared Sub wifi_power_on()
Try
DevicePowerNotify("{98C5250D-C29A-4985-AE5F-AFE5367E5006}\Jedi",CEDEVICE_POWER_STATE.D0, 1)
SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}\Jedi", 1,CEDEVICE_POWER_STATE.D0)
Application.DoEvents()
Catch
End Try
End Sub

Public Shared Sub wifi_power_off()
Try
DevicePowerNotify("{98C5250D-C29A-4985-AE5F-AFE5367E5006}\Jedi",CEDEVICE_POWER_STATE.D4, 1)
SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}\Jedi", 1,CEDEVICE_POWER_STATE.D4)
Application.DoEvents()
Catch
End Try
End Sub

留言

這個網誌中的熱門文章

使用VB讀取健保卡基本資料

使用VB讀取自然人評証卡號