Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MarshalIpAddressCollection()

static InternalIPAddressCollection Interop.IpHlpApi.IpAdapterAddress.MarshalIpAddressCollection ( IntPtr ptr)
inlinestaticpackage

Definition at line 112 of file Interop.cs.

113 {
114 InternalIPAddressCollection internalIPAddressCollection = new InternalIPAddressCollection();
115 while (ptr != IntPtr.Zero)
116 {
117 IpAdapterAddress ipAdapterAddress = Marshal.PtrToStructure<IpAdapterAddress>(ptr);
118 IPAddress iPAddress = ipAdapterAddress.address.MarshalIPAddress();
119 internalIPAddressCollection.InternalAdd(iPAddress);
120 ptr = ipAdapterAddress.next;
121 }
122 return internalIPAddressCollection;
123 }
static ? object PtrToStructure(IntPtr ptr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type structureType)
Definition Marshal.cs:1164
static readonly IntPtr Zero
Definition IntPtr.cs:18

References Interop.IpHlpApi.IpAdapterAddress.address, System.Net.NetworkInformation.InternalIPAddressCollection.InternalAdd(), Interop.IpHlpApi.IpSocketAddress.MarshalIPAddress(), Interop.IpHlpApi.IpAdapterAddress.next, System.Runtime.InteropServices.Marshal.PtrToStructure(), and System.IntPtr.Zero.