Moin Gregor,
das Problem ist, dass in der Originalstruktur die Union am Anfang steht, die kannst Du jetzt also nicht einfach an das Ende setzen.
Ich denke mal so müsste es gehen:
Code:
PIP_ADAPTER_ADDRESSES = ^TIP_ADAPTER_ADDRESSES;
TIP_ADAPTER_ADDRESSES = packed record
case byte of
0 : (Alignment : int64;
Next : P_IP_ADAPTER_ADDRESSES;
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: [color=red]array [0..MAX_ADAPTER_ADDRESS_LENGTH-1] of byte;[/color]
PhysicalAddressLength: DWord;
Flags: DWord;
Mtu: DWord;
IfType: DWord;
OperStatus: IF_OPER_STATUS;
Ipv6Index: DWord;
ZoneIndices: [color=red]array [0..15] of DWORD;[/color]
FirstPrefix: PIP_ADAPTER_PREFIX;);
1 : (length : DWORD;
IfIndex : DWORD;)
end;
Nicht zu vergessen die Arrays auch in Delphi-Konvention einzubauen. (rot markiert)