Remote awakening source code

zhaozj2021-02-16  66

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;

}

转载请注明原文地址:https://www.9cbs.com/read-18378.html

New Post(0)