DataFlex
DataFlex
Send a Wake-on-LAN Packet with a SecureOn Password
See more Socket/SSL/TLS Examples
Demonstrates Socket.SendWakeOnLan2, which sends a Wake-on-LAN magic packet that includes a SecureOn password.
Background. The password is a hexadecimal string representing four or six bytes and should come from a secure source. This is otherwise the same as SendWakeOnLan.
Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoSocket
String sSecureOnPassword
String sTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatSocket)) To hoSocket
If (Not(IsComObjectCreated(hoSocket))) Begin
Send CreateComObject of hoSocket
End
// Send a Wake-on-LAN magic packet that includes a SecureOn password. The password is a hexadecimal
// string representing four or six bytes, and should come from a secure source rather than being
// hard-coded.
Move "AABBCCDDEEFF" To sSecureOnPassword
Get ComSendWakeOnLan2 Of hoSocket "000102030405" 9 "255.255.255.255" sSecureOnPassword To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoSocket To sTemp1
Showln sTemp1
Procedure_Return
End
Showln "Wake-on-LAN packet sent."
End_Procedure