| Platform SDK: RAS/Routing and RAS | 
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 ( RTM_ENTITY_HANDLE RtmRegHandle, HANDLE TargetHandle, UCHAR TargetType, DWORD BlockingFlag );
| Type | Description | 
|---|---|
| DEST_TYPE | TargetHandle is a destination. | 
| NEXTHOP_TYPE | TargetHandle is a next hop. | 
| ROUTE_TYPE | TargetHandle is a route. | 
| Constant | Description | 
|---|---|
| RTM_BLOCK_METHODS | Block methods for the specified target. | 
| RTM_RESUME_METHODS | Unblock methods for the specified target. | 
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. | 
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 will not return until methods are unblocked and the function call is completed.
  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Rtmv2.h.
  Library: Use Rtm.lib.