GetIpNetTable
C# Signature:
[DllImport("iphlpapi.dll", EntryPoint="GetIpNetTable")]
static extern int GetIpNetTable(IntPtr pIpNetTable, ref int pdwSize, bool bOrder);VB.NET Signature:
<DllImport("IpHlpApi.dll")>
Private Shared Function GetIpNetTable(pIpNetTable As IntPtr, <MarshalAs(UnmanagedType.U4)> ByRef pdwSize As Integer, bOrder As Boolean) As <MarshalAs(UnmanagedType.U4)> Integer
End FunctionC# User-Defined Types:
// Define the MIB_IPNETROW structure.
[StructLayout(LayoutKind.Sequential)]
struct MIB_IPNETROW
{
[MarshalAs(UnmanagedType.U4)]
public uint dwIndex;
[MarshalAs(UnmanagedType.U4)]
public uint dwPhysAddrLen;
[MarshalAs(UnmanagedType.U1)]
public byte mac0;
[MarshalAs(UnmanagedType.U1)]
public byte mac1;
[MarshalAs(UnmanagedType.U1)]
public byte mac2;
[MarshalAs(UnmanagedType.U1)]
public byte mac3;
[MarshalAs(UnmanagedType.U1)]
public byte mac4;
[MarshalAs(UnmanagedType.U1)]
public byte mac5;
[MarshalAs(UnmanagedType.U1)]
public byte mac6;
[MarshalAs(UnmanagedType.U1)]
public byte mac7;
[MarshalAs(UnmanagedType.U4)]
public uint dwAddr;
[MarshalAs(UnmanagedType.U4)]
public uint dwType;
}VB.NET User-Defined Types:
VB.NET User-Defined Types:
VB.NET User-Defined Types:
C# Sample Code:
VB.NET Sample Code:
Última actualización