RtmBlockMethods function (rtmv2.h)

The RtmBlockMethods function blocks or unblocks the execution of methods for a specified destination, route, or next hop, or for all destinations, routes, and next hops.


DWORD RtmBlockMethods(
  [in] RTM_ENTITY_HANDLE RtmRegHandle,
  [in] HANDLE            TargetHandle,
  [in] UCHAR             TargetType,
  [in] DWORD             BlockingFlag


[in] RtmRegHandle

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

[in] TargetHandle

Handle to a destination, route, or next hop for which to block methods. This parameter is optional and can be set to NULL to block methods for all targets.

[in] TargetType

Specifies the type of the handle in TargetHandle. This parameter is optional and can be set to NULL to block methods for all targets. The following flags are used.

Type Meaning
TargetHandle is a destination.
TargetHandle is a next hop.
TargetHandle is a route.

[in] BlockingFlag

Specifies whether to block or unblock methods. The following flags are used.

Constant Meaning
Block methods for the specified target.
Unblock methods for the specified target.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is the following error code.

Value Meaning
The handle is invalid.


Currently, this function does not support blocking methods for a specific destination, route, or next hop.

Methods are typically blocked when client-specific data in the route is being changed; a client blocks methods, rearranges data, and then unblocks methods.

Clients should only block methods for a short period of time. If a second client calls RtmInvokeMethod and the first client's methods are blocked, RtmInvokeMethod does not return until methods are unblocked and the function call is completed.


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