Group: IP Helper - Library: iphlpapi
DWORD GetNumberOfInterfaces(
PDWORD pdwNumIf // pointer to number of interfaces
);
DECLARE INTEGER GetNumberOfInterfaces IN iphlpapi;
INTEGER @ pdwNumIf
pdwNumIf [out] Pointer to a DWORD variable that receives the number of interfaces on the local computer.
If the function succeeds, the return value is NO_ERROR (0). If the function fails, use FormatMessage to obtain the message string for the returned error.
The number of network interfaces returned by this function is one more ( that is the loopback interface ) than the number of adapters returned by the GetAdaptersInfo and GetInterfaceInfo functions.
See also: if_indextoname, if_nametoindex.