Share via


GetNumberOfInterfaces (Compact 2013)

3/26/2014

This function retrieves the number of interfaces on the local device.

Syntax

DWORD GetNumberOfInterfaces(
  PDWORD pdwNumIf
);

Parameters

  • pdwNumIf
    [out] Pointer to the number of interfaces on the local device.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, use FormatMessage to obtain the message string for the returned error.

Remarks

The GetNumberOfInterfaces function returns the number of interfaces on the local device. This includes the loopback interface. This number is one more than the number of adapters returned by the GetInterfaceInfo function because this function does not return information about the loopback interface.

Requirements

Header

iphlpapi.h

Library

Iphlpapi.lib

See Also

Reference

IP Helper Functions
GetIfEntry
GetInterfaceInfo

Other Resources

IP Helper