RtmGetListEnumRoutes function (rtmv2.h)

The RtmGetListEnumRoutes function enumerates a set of routes in a specified route list.

Syntax

DWORD RtmGetListEnumRoutes(
  [in]      RTM_ENTITY_HANDLE RtmRegHandle,
  [in]      RTM_ENUM_HANDLE   EnumHandle,
  [in, out] PUINT             NumRoutes,
  [out]     PRTM_ROUTE_HANDLE RouteHandles
);

Parameters

[in] RtmRegHandle

Handle to the client obtained from a previous call to RtmRegisterEntity.

[in] EnumHandle

Handle to the route list to enumerate.

[in, out] NumRoutes

On input, NumRoutes is a pointer to a UINT value that specifies the maximum number of routes that can be received by RouteHandles.

On output, NumRoutes receives the actual number of routes received by RouteHandles.

[out] RouteHandles

On input, DestInfo is a pointer to an array of RTM_DEST_INFO structures.

On output, DestInfo is filled with the requested destination information.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_INVALID_PARAMETER
The value pointed to by NumRoutes is larger than the maximum number of routes a client is allowed to retrieve with one call. Check RTM_REGN_PROFILE for the maximum number of routes that the client is allowed to retrieve with one call.
 
 

Remarks

Call this function repeatedly to retrieve all routes.

There are no more routes to enumerate when the routing table manager returns zero in NumRoutes.

For sample code using this function, see Use a Client-Specific Route List.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header rtmv2.h
Library Rtm.lib
DLL Rtm.dll

See also

RtmCreateRouteListEnum

RtmDeleteEnumHandle