Sample code for 30+ languages & platforms
Visual FoxPro

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 Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loSocket
LOCAL lcSecureOnPassword

lnSuccess = 0

loSocket = CreateObject('Chilkat.Socket')

*  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.
lcSecureOnPassword = "AABBCCDDEEFF"
lnSuccess = loSocket.SendWakeOnLan2("000102030405",9,"255.255.255.255",lcSecureOnPassword)
IF (lnSuccess = 0) THEN
    ? loSocket.LastErrorText
    RELEASE loSocket
    CANCEL
ENDIF

? "Wake-on-LAN packet sent."

RELEASE loSocket