Поделиться через


GetIpAddrTable (Compact 2013)

3/26/2014

This function retrieves the interface-to-IP address mapping table.

Syntax

DWORD GetIpAddrTable(
  PMIB_IPADDRTABLE pIpAddrTable, 
  PULONG pdwSize, 
  BOOL bOrder 
);

Parameters

  • pIpAddrTable
    [out] Pointer to a buffer that contains the interface-to-IP address mapping table as a MIB_IPADDRTABLE structure.
  • pdwSize
    [in, out] On input, specifies the size in bytes of the buffer pointed to by the pIpAddrTable parameter.

    On output, if the buffer is not large enough to hold the returned mapping table, the function sets this parameter equal to the required buffer size in bytes.

  • bOrder
    [in] A Boolean value that specifies whether the returned mapping table should be sorted in ascending order by IPv4 address. If this parameter is TRUE, the table is sorted.

Return Value

Return code

Description

NO_ERROR

The function succeeds.

ERROR_INSUFFICIENT_BUFFER

The buffer pointed to by the pIpAddrTable parameter is not large enough. The required size is returned in the DWORD variable pointed to by the pdwSize parameter.

ERROR_INVALID_PARAMETER

The pdwSize parameter is NULL, or GetIpAddrTable is unable to write to the memory pointed to by the pdwSize parameter.

ERROR_NOT_SUPPORTED

This function is not supported on the operating system that is used on the local system.

Other

Use FormatMessage to obtain the message string for the returned error.

Requirements

Header

iphlpapi.h

Library

Iphlpapi.lib

See Also

Reference

IP Helper Functions
AddIPAddress
MIB_IPADDRROW
MIB_IPADDRTABLE

Other Resources

IP Helper