PowerBuilder
PowerBuilder
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 PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_Socket
string ls_SecureOnPassword
li_Success = 0
loo_Socket = create oleobject
li_rc = loo_Socket.ConnectToNewObject("Chilkat.Socket")
if li_rc < 0 then
destroy loo_Socket
MessageBox("Error","Connecting to COM object failed")
return
end if
// 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.
ls_SecureOnPassword = "AABBCCDDEEFF"
li_Success = loo_Socket.SendWakeOnLan2("000102030405",9,"255.255.255.255",ls_SecureOnPassword)
if li_Success = 0 then
Write-Debug loo_Socket.LastErrorText
destroy loo_Socket
return
end if
Write-Debug "Wake-on-LAN packet sent."
destroy loo_Socket