GetNumberOfInterfaces function (iphlpapi.h)
The GetNumberOfInterfaces functions retrieves the number of interfaces on the local computer.
IPHLPAPI_DLL_LINKAGE DWORD GetNumberOfInterfaces(
[out] PDWORD pdwNumIf
);
[out] pdwNumIf
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.
If the function fails, use FormatMessage to obtain the message string for the returned error.
The GetNumberOfInterfaces function returns the number of interfaces on the local computer, including the loopback interface. This number is one more than the number of adapters returned by the GetAdaptersInfo and GetInterfaceInfo functions because these functions do not return information about the loopback interface.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | iphlpapi.h |
Library | Iphlpapi.lib |
DLL | Iphlpapi.dll |