RtmReferenceHandles function (rtmv2.h)

The RtmReferenceHandles function increases the reference count for objects pointed to by one or more handles that the routing manager used to access those objects. A client should use this function when the client must keep a handle but release the rest of the information structure associated with the handle.

Syntax

DWORD RtmReferenceHandles(
  [in] RTM_ENTITY_HANDLE RtmRegHandle,
  [in] UINT              NumHandles,
  [in] HANDLE            *RtmHandles
);

Parameters

[in] RtmRegHandle

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

[in] NumHandles

Specifies the number of handles in RtmHandles.

[in] RtmHandles

Array of handles to increase the reference count for.

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_HANDLE
The handle is invalid.
 
 

Remarks

A client must always call this function when caching a handle returned by the routing table manager. This notifies the routing table manager that it should not destroy the object the handle refers to until the handle is released by the client.

When a client must release the handle, the client must call the appropriate release function, based on the type of handle. For example, to release a route, call RtmReleaseRoutes.

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

RtmDeleteEnumHandle

RtmReleaseChangedDests

RtmReleaseDestInfo

RtmReleaseEntityInfo

RtmReleaseNextHopInfo

RtmReleaseRouteInfo