Wie schreibst du so schön in deiner Signatur?
Wurde doch oben alles erklärt.
Delphi-Quellcode:
PIP_ADAPTER_ADDRESSES = ^TIP_ADAPTER_ADDRESSES;
TIP_ADAPTER_ADDRESSES = packed record
case Integer of
1: (Alignment: ULONGLONG);
2: (Length: ULONG; IfIndex: DWORD; // <-- matches sizeof(ULONGLONG)
Next: PIP_ADAPTER_ADDRESSES; // <-- start of variant part
AdapterName: PChar;
FirstUnicastAddress: PIP_ADAPTER_UNICAST_ADDRESS;
FirstAnycastAddress: PIP_ADAPTER_ANYCAST_ADDRESS;
FirstMulticastAddress: PIP_ADAPTER_MULTICAST_ADDRESS;
FirstDnsServerAddress: PIP_ADAPTER_DNS_SERVER_ADDRESS;
DnsSuffix: PWCHAR;
Description: PWCHAR;
FriendlyName: PWCHAR;
PhysicalAddress: Byte[MAX_ADAPTER_ADDRESS_LENGTH];
PhysicalAddressLength: DWORD;
Flags: DWORD;
Mtu: DWORD;
IfType: DWORD;
OperStatus: IF_OPER_STATUS;
Ipv6Index: DWORD;
ZoneIndices: DWORD[16];
FirstPrefix: PIP_ADAPTER_PREFIX;
)
end;
So müßte es aussehen, was bei mir aber nicht kompiliert, wegen DWORD[16] und Byte[MAX_ADAPTER_ADDRESS_LENGTH]. Kann man umgehen, indem man dafür auch eigene Typen einführt.