ActiveXperts Network Component Wol (Wake-on-LAN) Object

A Wake-On-LAN utility has the ability to "power on" a PC remotely. This is accomplished by the generation of a 'Magic Packet' to remotely power on PCs attached to networks. When the remote network adapter hears a 'Magic Packet' created for its unique MAC address the network adapter alerts the computer to power on. If Wake-On-Lan has been enabled in the computers BIOS settings, the system will power on as if the power button had been pressed.

To accomplish this you will first need to ensure your PC is configured to accept a Wake-On-LAN remote command. You must also identify the IP Address and MAC Address of the remote device. When the device shuts down, it's Network Interface Card (NIC card) is still receiving power, and keeps listening on the network for a 'magic' packet to arrive. Network Component has the ability to send such a "Magic Packet" to power on PCs.

The Wake-on-LAN object is part of the Network Component. Overview of all Network Component objects:

DnsServer & DnsRecord - Ftp & FtpFile - Http - Icmp - IPtoCountry - Msn - Ntp - Radius - Rsh - Scp - SFtp - Ssh - SnmpManager - SnmpTrapManager - SnmpMibBrowser - Tcp - Tftp - TraceRoute - Udp - Xen - Wake-on-LAN - Xen (Citrix)


Wake-on-LAN sample code

VBScript sample: Remote power-up a PC

  Set wObj = CreateObject("AxNetwork.WOL")

  wObj.WakeUp "00-10-4B-BA-7A-51"
  WScript.Echo "WakeUp: result = " & wObj.LastError

Visual C# .NET sample: Remote power-up a PC

Imports AxNetwork
   Module WakeOnLanDemo
     Sub Main()
       Dim objWol As WOL = New WOL()
       Dim objConstants As SocketConstants = New SocketConstants()
       objWol.WakeUp("00-10-4B-BA-7A-51")
       Console.WriteLine( "Result: " & objWol.LastError.ToString() )
     End Sub
   End Module

On ftp.activexperts-labs.com, you can find a lot of Network Component samples. These samples are also part of the Network Component installation.

Visit ftp.activexperts-labs.com