RtmGetEnumRoutes function (rtmv2.h)

The RtmGetEnumRoutes function retrieves the next set of routes in the specified enumeration.

Syntax

DWORD RtmGetEnumRoutes(
  [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 enumeration.

[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, RouteHandles is a pointer to an RTM_ROUTE_INFO structure.

On output, RouteHandles receives an array of handles to routes.

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.
ERROR_NO_MORE_ITEMS
There are no more routes to enumerate.
ERROR_NOT_ENOUGH_MEMORY
There is not enough memory to complete this operation.
 
 

Remarks

When the routes are no longer required, release them by calling RtmReleaseRoutes.

For sample code using this function, see Enumerate All Routes.

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

RtmCreateRouteEnum

RtmDeleteEnumHandle

RtmReleaseRoutes