RtmGetNetworkCount

[This is preliminary documentation and subject to change.]

The RtmGetNetworkCount function retrieves the number of networks that the Router Table Manager (RTM) has routes to.

ULONG RtmGetNetworkCount(
  DWORD ProtocolFamily    // type of network (IP or IPX)
);
 

Parameters

ProtocolFamily
Specifies which type of network (for example IP or IPX) to obtain route information for.

Return Values

Network count
The number of networks known to the routing protocols of the specified protocol family.

If the return value is zero, either no routes are available, or the operation failed. Call GetLastError to obtain more information:

NO_ERROR
The operation succeeded, but no routes are available.
ERROR_INVALID_PARAMETER
The value of the ProtocolFamily parameter doesn't correspond to any installed protocol family.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in rtm.h.
  Import Library: Link with rtm.lib.

See Also

GetLastError, RTM Protocol Family Identifiers