Forgot to save it, keep it yourself.
Void TwakeUponlanForm :: WakeremoteComputer (ANSISTRING ipaddress, unsigned char * macaddress) {unsigned char sendbuf [102]; for (int i = 0; i <102; i ) {sendbuf [i] = (i <6)? 0xff : Macaddress [i% 6];} TMEMORYSTREAM * MEMORYSTREAM = New TMEMORYSTREAM ();
MemoryStream -> Clear (); MemoryStream -> Write (Sendbuf, 102); nmudp1 -> transotehost = ipaddress; // Remove the IP segment after the network number 5055 //, such as 210.45.234.255 nmudp1-> sendstream (MemoryStream); Delete memorystream;
}