windev 7.5 et wifi

Le
eric
bonjour,
je chreche teindre et allumer le wifi sur un portable ,
systme windows 7 familial
windev 7.5

j'ai trouv ce bout de code sur un forum dotnet,


Private Declare Function DevicePowerNotify Lib "coredll.dll" (ByVal
name As String, ByVal state As PowerState, ByVal flags As Integer) As
Integer
Private Declare Function SetDevicePower Lib "coredll.dll" (ByVal
name As String, ByVal flags As Integer, ByVal state As PowerState) As
Integer


Private Enum PowerState
PwrDeviceUnspecified = -1
D0 = 0 'full on
D1 = 1 'low power
D2 = 2 'standby
D3 = 3 'sleep
D4 = 4 'off
PwrDeviceMaximum = 5
End Enum
Private Sub WifiOn()
DevicePowerNotify("{98C5250D-C29A-4985-AE5F-
AFE5367E5006}WLAGS46F1", PowerState.D0, 1)
SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}WLAGS46F1", 1,
PowerState.D0)
End Sub
Privaye Sub WifiOff()
DevicePowerNotify("{98C5250D-C29A-4985-AE5F-
AFE5367E5006}WLAGS46F1", PowerState.D4, 1)
SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}WLAGS46F1", 1,
PowerState.D4)
End Sub
Vos réponses
Gagnez chaque mois un abonnement Premium avec GNT : Inscrivez-vous !
Trier par : date / pertinence
eric
Le #24806912
On 24 sep, 11:05, eric
Quelqu'un peux t'il traduire cela en windev compréhensible
Merci
Eric

bonjour,
je chreche à éteindre et allumer le wifi sur un portable ,
systême windows 7 familial
windev 7.5

j'ai trouvé ce bout de code sur un forum dotnet,

   Private Declare Function DevicePowerNotify Lib "coredll.dll" (ByVa l
name As String, ByVal state As PowerState, ByVal flags As Integer) As
Integer
    Private Declare Function SetDevicePower Lib "coredll.dll" (ByVal
name As String, ByVal flags As Integer, ByVal state As PowerState) As
Integer

Private Enum PowerState
     PwrDeviceUnspecified = -1
     D0 = 0 'full on
     D1 = 1 'low power
     D2 = 2 'standby
     D3 = 3 'sleep
     D4 = 4 'off
     PwrDeviceMaximum = 5
End Enum
Private Sub WifiOn()
    DevicePowerNotify("{98C5250D-C29A-4985-AE5F-
AFE5367E5006}WLAGS46F1", PowerState.D0, 1)
SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}WLAGS46F1", 1,
PowerState.D0)
End Sub
Privaye Sub WifiOff()
    DevicePowerNotify("{98C5250D-C29A-4985-AE5F-
AFE5367E5006}WLAGS46F1", PowerState.D4, 1)
SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}WLAGS46F1", 1,
PowerState.D4)
End Sub
eric
Le #24806962
Finalement j'utiliserai la commande devcon

eric


On 24 sep, 11:06, eric
On 24 sep, 11:05, eric
Quelqu'un peux t'il traduire cela en windev compréhensible
Merci
Eric







> bonjour,
> je chreche à éteindre et allumer le wifi sur un portable ,
> systême windows 7 familial
> windev 7.5

> j'ai trouvé ce bout de code sur un forum dotnet,

>    Private Declare Function DevicePowerNotify Lib "coredll.dll" (By Val
> name As String, ByVal state As PowerState, ByVal flags As Integer) As
> Integer
>     Private Declare Function SetDevicePower Lib "coredll.dll" (ByVa l
> name As String, ByVal flags As Integer, ByVal state As PowerState) As
> Integer

> Private Enum PowerState
>      PwrDeviceUnspecified = -1
>      D0 = 0 'full on
>      D1 = 1 'low power
>      D2 = 2 'standby
>      D3 = 3 'sleep
>      D4 = 4 'off
>      PwrDeviceMaximum = 5
> End Enum
> Private Sub WifiOn()
>     DevicePowerNotify("{98C5250D-C29A-4985-AE5F-
> AFE5367E5006}WLAGS46F1", PowerState.D0, 1)
> SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}WLAGS46F1", 1,
> PowerState.D0)
> End Sub
> Privaye Sub WifiOff()
>     DevicePowerNotify("{98C5250D-C29A-4985-AE5F-
> AFE5367E5006}WLAGS46F1", PowerState.D4, 1)
> SetDevicePower("{98C5250D-C29A-4985-AE5F-AFE5367E5006}WLAGS46F1", 1,
> PowerState.D4)
> End Sub
Publicité
Poster une réponse
Anonyme