RtmRegisterForChangeNotification function (rtmv2.h)
The RtmRegisterForChangeNotification function informs the routing table manager that the client should receive change notifications for the specified types of changes. The routing table manager returns a change notification handle, which the client must use when requesting change information after receiving a change notification message.
Syntax
DWORD RtmRegisterForChangeNotification(
[in] RTM_ENTITY_HANDLE RtmRegHandle,
[in] RTM_VIEW_SET TargetViews,
[in] RTM_NOTIFY_FLAGS NotifyFlags,
[in] PVOID NotifyContext,
[out] PRTM_NOTIFY_HANDLE NotifyHandle
);
Parameters
[in] RtmRegHandle
Handle to the client obtained from a previous call to RtmRegisterEntity.
[in] TargetViews
Specifies the views in which to register for change notification.
[in] NotifyFlags
Specifies the flags that indicate the type of changes for which the client requests notification. The following flags are used. (The flags are to be joined using a logical OR.)
[in] NotifyContext
Specifies the notification context that the RTM_EVENT_CALLBACK uses to indicate new changes. The notification context is the Context2 parameter of the RTM_EVENT_CALLBACK callback.
[out] NotifyHandle
Receives a handle to a change notification. The handle must be used when calling RtmGetChangedDests.
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 |
---|---|
|
A parameter contains incorrect information. |
|
There are not enough available system resources to complete this operation. The routing table manager has exceeded the maximum number of change notifications that can be cached. |
|
There is not enough memory to complete this operation. |
|
One or more of the specified views is not supported. |
Remarks
A client calls RtmMarkDestForChangeNotification when it is registering for changes to a specific destination.
The routing table manager uses the RTM_EVENT_CALLBACK callback, specified when the client called RtmRegisterEntity, to notify the client when changes have occurred; the client must call RtmGetChangedDests to receive the actual change information.
For sample code using this function, see Register For Change Notification.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for