In linux every adapter configuration has a file system path, for example the adapter eth0 has all configuration, in some text files located in “/sys/class/net/eth0/”. The file whose name is “address” contains a single line with the mac adrress value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
function GetLinuxMacAddress(device_name : String): string; const linux_path = '/sys/class/net/%s/address'; var f : textfile; device, path, addr : string; begin Result := ''; path := Format(linux_path,[device_name]); if (not FileExists(path)) then begin Result := ''; end else begin AssignFile(f, path); reset(f); readln(f, addr); closefile(f); Result := addr; end; end; |
In Synaptica la sostenibilità e il basso impatto ambientale sono dei valori fondamentali condivisi naturalmente da tutti noi. La passione per la natura, gli animali e l’ambiente ci hanno indotto sempre a mantenere un occhio di riguardo nei confronti dell’impatto ambientale causato dalle ns attività. Questa visione ci ha portato anche a fare scelte inizialmente…
Leggi tutto
1 2 3 4 5 6 7 8 9 |
TMiaStruttura = record case integer of 0 : (content : array[0..19] of char); 1 : ( primidue : array[0..1] of char; dalduealquattro : array[0..1] of char; cognome : array[0..15] of char; ) end; |
1 2 3 4 5 6 7 8 9 10 11 12 |
procedure TForm7.Button1Click(Sender: TObject); begin a.content := '0123456789ABCDEFGHIL'; ShowMessage(a.dalduealquattro); a.dalduealquattro := 'BB'; ShowMessage(a.content); end; |
thank’s to my self obviusly
Manage a System.string as buffer to copy content of string into a generic TStream:
1 |
Stream.Write(Str[1], StrLen * SizeOf(Str[1])); |
Unlike some multi-user environments most Ubuntu desktop users have the Operating System and drivers on their hard disks, SSDs or Live Boot USBs. There is a glitch where some users wait an extremely long time for network to come up during boot. In this case the recommendations is to set the maximum wait time to…
Leggi tutto
Elenco codici paese Locale Languagecode LCIDstring LCIDDecimal LCIDHexadecimal Codepage Afrikaans af af 1078 436 1252 Albanian sq sq 1052 1250 Amharic am am 1118 Arabic – Algeria ar ar-dz 5121 1401 1256 Arabic – Bahrain ar ar-bh 15361 1256 Arabic – Egypt ar ar-eg 3073 1256 Arabic – Iraq ar ar-iq 2049 801 1256 Arabic…
Leggi tutto