RtmRegisterClient function
[This API has been superseded by the Routing Table Manager Version 2 API and will not be available beyond Windows Server 2003. Applications should use the Routing Table Manager Version 2 API.]
The RtmRegisterClient function registers a client as a handler of the specified protocol. It establishes a route change notification mechanism for the client, and sets protocol options.
Syntax
HANDLE RtmRegisterClient(
_In_ DWORD ProtocolFamily,
_In_ DWORD RoutingProtocol,
_In_ HANDLE ChangeEvent,
_In_ DWORD Flags
);
Parameters
-
ProtocolFamily [in]
-
Specifies the protocol family of the routing protocol to register.
-
RoutingProtocol [in]
-
Specifies the routing protocol identifier, the same as that used when registering with the router manager. See RegisterProtocol.
-
ChangeEvent [in]
-
Specifies that a best route to a network in the table has changed. The routing table manager signals this event after a change to the best route to any network in the table. See RtmDequeueRouteChangeMessage for more information about route-change notification.
This parameter is optional. If the caller specifies NULL for this parameter, the routing table manager does not notify the client of changes in best route status.
-
Flags [in]
-
Specifies miscellaneous options for special handling of the routing protocol. The following value is currently supported.
Flags Meaning - RTM_PROTOCOL_SINGLE_ROUTE
The routing table manager keeps only one route per destination network for the routing protocol. In other words, the routing table manager replaces route entries that have the same destination network numbers instead of adding new ones.
Return value
On successful return, a HANDLE value that identifies the client in subsequent calls to the routing table manager.
A NULL handle indicates that the routing table manager was unable to register the client. Call GetLastError to obtain the reason for the failure.
Value | Description |
---|---|
|
Another client has already registered to handle the specified protocol. |
|
The specified protocol family is not supported, or the Flags parameter is invalid. |
|
Insufficient resources to carry out the operation. |
|
Insufficient memory to allocate data structures for the client. |
Requirements
Requirement | Value |
---|---|
Minimum supported client |
None supported |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
End of server support |
Windows Server 2003 |
Header |
|
Library |
|
DLL |
|