RtmGetEnumNextHops function (rtmv2.h)

The RtmGetEnumNextHops function retrieves the next set of next hops in the specified enumeration.

Syntax

DWORD RtmGetEnumNextHops(
  [in]      RTM_ENTITY_HANDLE   RtmRegHandle,
  [in]      RTM_ENUM_HANDLE     EnumHandle,
  [in, out] PUINT               NumNextHops,
  [out]     PRTM_NEXTHOP_HANDLE NextHopHandles
);

Parameters

[in] RtmRegHandle

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

[in] EnumHandle

Handle to the next-hop enumeration.

[in, out] NumNextHops

On input, NumNextHops is a pointer to a UINT value specifying the maximum number of next hops that can be received by NextHopHandles.

On output, NumNextHops receives the actual number of next hops received by NextHopHandles.

[out] NextHopHandles

On input, NextHopHandles pointers to an RTM_NEXTHOP_INFO structure.

On output, NextHopHandles receives an array of handles to next hops.

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 next hops that the client is allowed to retrieve with one call.
ERROR_NO_MORE_ITEMS
There are no more next hops to enumerate.
 
 

Remarks

When the next hops are no longer required, release them by calling RtmReleaseNextHops.

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

RtmCreateNextHopEnum

RtmDeleteEnumHandle

RtmReleaseNextHops