DECLARE INTEGER GetIpNetTable IN IPHlpAPI.DLL; STRING @lpIPNetTable, INTEGER @pdwSize,; SHORT bOrderNext, call it so that you can get the correct buffer size
liSize = 0 lcNetTable = SPACE(1) llorder = 0 * Should return 122 - ERROR_INSUFFICIENT_BUFFER ? GetIpNetTable(@lcNetTable, @liSize, llorder) lcNetTable = SPACE(liSize)Next you need to understand the structure being passed
typedef struct _MIB_IPNETTABLE { DWORD dwNumEntries; MIB_IPNETROW table[ANY_SIZE]; } MIB_IPNETTABLE, *PMIB_IPNETTABLE;The above means there's a 4 byte integer indicating the number of entries.
typedef struct _MIB_IPNETROW { DWORD dwIndex; DWORD dwPhysAddrLen; BYTE bPhysAddr[MAXLEN_PHYSADDR]; DWORD dwAddr; DWORD dwType; } MIB_IPNETROW, *PMIB_IPNETROW;The first 4 byte integer is index of the adapter. The next 4 bytes are the length of the byte array that follows. Immediately following those bytes is the actual IP address, followed by the type.