whats new ¦  programming tips ¦  indy articles ¦  intraweb articles ¦  informations ¦  links ¦  interviews
 misc ¦  tutorials ¦  Add&Win Game

Tips (1541)

Database (90)
Files (137)
Forms (107)
Graphic (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Math (76)
Misc (126)
Multimedia (45)
Objects/
ActiveX (51)

OpenTools API (3)
Printing (35)
Strings (83)
System (266)
VCL (242)

Top15

Tips sort by
component


Search Tip

Add new Tip

Add&Win Game

Advertising

25 Visitors Online


 
...realize a Wake on Lan? (Magic Packet)
Autor: Jailbird
Homepage: http://tooldesign.ch
[ Print tip ]  

Tip Rating (21):  
     


{
What's a Magic Packet?
Was ist ein Magic Packet?

DESTINATION SOURCE MISC. FF FF FF FF FF FF 11 22 33 44 55 66 11 22 33 44
55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44
55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44
55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44
55 66 11 22 33 44 55 66 11 22 33 44 55 66 MISC. CRC.

Note: Destination, Source, Misc and CRC are normally added by our Socket-Component
Beachte: Destination, Source, Mis und CRC werden normalerweise von deiner
Socket-Komponente hinzugefügt
}

procedure TForm1.Button1Click(Sender: TObject);
var
  
Data, temp: string;
  k, n: integer;
begin
  
Data := '';
  for k := 0 to do
  begin
    
Data := Data + Chr(StrToInt('$FF'));  // 6x add a FF / 6x ein FF hinzufügen
  
end;
  temp := StringReplace(Edit1.Text, '-', '', [rfReplaceAll]);
  for k := 0 to 15 do
  begin
    
temp := StringReplace(Edit1.Text, '-', '', [rfReplaceAll]);
    for n := 0 to do
    begin
      
// 16x add Target-Mac-Adress / 16x die Ziel-Macadresse hinzufügen
      
Data := Data + Chr(StrToInt('$' + temp[1] + temp[2]));
      Delete(temp, 1, 2);
    end;
  end;
  
  //Example with TIdUDPClient of Indy
  //IdUDPClient1.Send('255.255.255.255', '80', Data);  // Send it / Verschick es
end;

 

Rate this tip:

poor
very good


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners