Share via


GetIpNetTable (Compact 2013)

3/26/2014

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

Syntax

DWORD GetIpNetTable(
  PMIB_IPNETTABLE pIpNetTable,
  PULONG pdwSize, 
  BOOL bOrder 
);

Parameters

  • pIpNetTable
    [out] Pointer to a buffer that contains the IP-to-physical address mapping table as a MIB_IPNETTABLE structure.
  • pdwSize
    [in, out] The size of the buffer indicated by the pIpNetTable parameter. If pIpNetTable is set to NULL, this parameter is set to the required buffer size. If pIpNetTable is not set to NULL and the buffer is not large enough to hold the returned mapping table, the function sets this parameter to the required buffer size.
  • bOrder
    [in] TRUE if the retrieved mapping table should be sorted in ascending order by IP address, and FALSE otherwise.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Return code

Description

ERROR_INSUFFICIENT_BUFFER

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

ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function. This error is returned if the pdwSize parameter is NULL, or GetIpNetTable is unable to write to the memory pointed to by the pdwSize parameter.

ERROR_NOT_SUPPORTED

The IPv4 transport is not configured on the local device.

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
CreateIpNetEntry
DeleteIpNetEntry
FlushIpNetTable
MIB_IPNETTABLE
SetIpNetEntry

Other Resources

IP Helper