RtmDeleteRouteToDest function (rtmv2.h)

The RtmDeleteRouteToDest function deletes a route from the routing table and updates the best-route information for the corresponding destination, if the best route changed. If the best route changes, a change notification is generated.

Syntax

DWORD RtmDeleteRouteToDest(
  [in]  RTM_ENTITY_HANDLE       RtmRegHandle,
  [in]  RTM_ROUTE_HANDLE        RouteHandle,
  [out] PRTM_ROUTE_CHANGE_FLAGS ChangeFlags
);

Parameters

[in] RtmRegHandle

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

[in] RouteHandle

Handle to the route to delete.

[out] ChangeFlags

On input, ChangeFlags is a pointer to RTM_ROUTE_CHANGE_FLAGS data type.

On output, ChangeFlags receives RTM_ROUTE_CHANGE_BEST flag if the best route was changed.

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_ACCESS_DENIED
The calling client does not own this route.
ERROR_INVALID_HANDLE
The handle is invalid.
ERROR_NOT_FOUND
The specified route was not found.
 
 

Remarks

The RouteHandle should not subsequently be released by a client if the client has already called RtmDeleteRouteToDest using that handle. The RtmDeleteRouteToDest function deletes the route and releases the handle.

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

RtmAddRouteToDest

RtmGetRoutePointer

RtmHoldDestination

RtmLockRoute

RtmUpdateAndUnlockRoute