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

◆ UnsafeNotifyStableUnicastIpAddressTable()

static unsafe bool System.Net.NetworkInformation.TeredoHelper.UnsafeNotifyStableUnicastIpAddressTable ( Action< object > callback,
object state )
inlinestatic

Definition at line 27 of file TeredoHelper.cs.

28 {
29 TeredoHelper teredoHelper = new TeredoHelper(callback, state);
30 try
31 {
32 SafeFreeMibTable table;
33 uint num = global::Interop.IpHlpApi.NotifyStableUnicastIpAddressTable(AddressFamily.Unspecified, out table, (delegate* unmanaged<IntPtr, IntPtr, void>)(delegate*<IntPtr, IntPtr, void>)(&OnStabilized), GCHandle.ToIntPtr(teredoHelper._gcHandle), out teredoHelper._cancelHandle);
34 table.Dispose();
35 switch (num)
36 {
37 case 997u:
38 teredoHelper = null;
39 return false;
40 default:
41 throw new Win32Exception((int)num);
42 case 0u:
43 return true;
44 }
45 }
46 finally
47 {
48 teredoHelper?.Dispose();
49 }
50 }
TeredoHelper(Action< object > callback, object state)
static void OnStabilized(IntPtr context, IntPtr table)
static IntPtr ToIntPtr(GCHandle value)
Definition GCHandle.cs:138

References System.Net.NetworkInformation.TeredoHelper.TeredoHelper(), System.Net.NetworkInformation.TeredoHelper._cancelHandle, System.Net.NetworkInformation.TeredoHelper._gcHandle, System.Net.NetworkInformation.TeredoHelper.Dispose(), System.Runtime.InteropServices.SafeHandle.Dispose(), System.Net.NetworkInformation.TeredoHelper.OnStabilized(), System.state, and System.Runtime.InteropServices.GCHandle.ToIntPtr().

Referenced by System.Net.NetworkInformation.SystemIPGlobalProperties.GetUnicastAddressesAsync().