The GetIfStackTable function retrieves a table of network interface stack row entries that specify the relationship of the network interfaces on an interface stack.
IPHLPAPI_DLL_LINKAGE _NETIOAPI_SUCCESS_ NETIOAPI_API GetIfStackTable( PMIB_IFSTACK_TABLE *Table );
A pointer to a buffer that receives the table of interface stack row entries in a MIB_IFSTACK_TABLE structure.
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
||An invalid parameter was passed to the function. This error is returned if a NULL pointer is passed in the Table parameter.|
||Insufficient memory resources are available to complete the operation.|
||No interface stack entries were found.|
||Use the FormatMessage function to obtain the message string for the returned error.|
The GetIfStackTable function is defined on Windows Vista and later.
GetIfStackTable function enumerates the physical and logical network interfaces on an interface stack on a local system and returns this information in a MIB_IFSTACK_TABLE structure.
Interface stack entries are returned in a MIB_IFSTACK_TABLE structure in the buffer pointed to by the Table parameter. The MIB_IFSTACK_TABLE structure contains an interface stack entry count and an array of MIB_IFSTACK_ROW structures for each interface stack entry.
The relationship between the interfaces in the interface stack is that the interface with index in the HigherLayerInterfaceIndex member of the MIB_IFSTACK_ROW structure is immediately above the interface with index in the LowerLayerInterfaceIndex member of the MIB_IFSTACK_ROW structure.
Memory is allocated by the GetIfStackTable function for the MIB_IFSTACK_TABLE structure and the MIB_IFSTACK_ROW entries in this structure. When these returned structures are no longer required, free the memory by calling the FreeMibTable.
Note that the returned MIB_IFSTACK_TABLE structure pointed to by the Table parameter may contain padding for alignment between the NumEntries member and the first MIB_IFSTACK_ROW array entry in the Table member of the MIB_IFSTACK_TABLE structure. Padding for alignment may also be present between the MIB_IFSTACK_ROW array entries. Any access to a MIB_IFSTACK_ROW array entry should assume padding may exist.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|
|Header||netioapi.h (include Iphlpapi.h)|