NhpAllocateAndGetInterfaceInfoFromStack function (iphlpapi.h)

[This function is no longer available for use as of Windows Vista. Instead, use the GetAdaptersAddresses function and the associated IP_ADAPTER_ADDRESSES structure.]

The NhpAllocateAndGetInterfaceInfoFromStack function obtains adapter information about the local computer.

Syntax

IPHLPAPI_DLL_LINKAGE DWORD NhpAllocateAndGetInterfaceInfoFromStack(
  IP_INTERFACE_NAME_INFO **ppTable,
  PDWORD                 pdwCount,
  BOOL                   bOrder,
  HANDLE                 hHeap,
  DWORD                  dwFlags
);

Parameters

ppTable

An array of IP_INTERFACE_NAME_INFO structures that contains information about each adapter on the local system. The array contains one element for each adapter on the system.

pdwCount

The number of elements in the ppTable array.

bOrder

When TRUE, elements in the ppTable array are sorted by increasing index value.

hHeap

A handle that specifies the heap from which ppTable should be allocated. This parameter can be the process heap returned by a call to the GetProcessHeap function, or a private heap created by a call to the HeapCreate function.

dwFlags

A set of flags to be passed to the HeapAlloc function when allocating memory for ppTable. See the HeapAlloc function for more information.

Return value

Returns ERROR_SUCCESS upon successful completion.

Remarks

In the Microsoft Windows Software Development Kit (SDK), the NhpAllocateAndGetInterfaceInfoFromStack function is defined on Windows 2000 with Service Pack 1 (SP1) and later. When compiling an application, if the target platform is Windows 2000 with SP1 and later (NTDDI_VERSION >= NTDDI_WIN2KSP1, _WIN32_WINNT >= 0x0500, or WINVER >= 0x0500), the NhpAllocateAndGetInterfaceInfoFromStack is defined.

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional with SP1 [desktop apps only]
Minimum supported server Windows Server 2003, Windows 2000 Server with SP1 [desktop apps only]
Target Platform Windows
Header iphlpapi.h
Library Iphlpapi.lib
DLL Iphlpapi.dll

See also

GetAdaptersAddresses

GetProcessHeap

HeapCreate

IP Helper Function Reference

IP Helper Start Page

IP_INTERFACE_NAME_INFO