This function sets the batch time for transient notification requests.
HRESULT WINAPI RegistryBatchNotificaton( HREGNOTIFY hNotify, DWORD dwMillisecondsIdle, DWORD dwMillesecondsMax );
[in] Handle to a change notification request returned by RegistryNotifyWindow, RegistryNotifyCallback, or RegistryNotifyMsgQueue.
[in] Number of milliseconds that the value must be constant before notifications are sent. Notifications are sent only if a change in registry value occurs.
[in] Maximum number of milliseconds between the time the first change happens and the notification event.
Success indicates that new batch times are set. Failure does not cause any change.
You can use this function to track registry values that change frequently.
Whenever a specified value changes, the notification system waits for dwMillisecondsIdle before sending a notification. If the value changes during the waiting period, the notification system resets the timer to wait for another dwMillisecondsIdle. To prevent the notification system from waiting indefinitely, dwMillesecondsMax sets the limit for the waiting period. The dwMillesecondsMax value sets the maximum time period from the time the first notification arrives to the time the notification is sent. You can set dwMillesecondsMax to INFINITE to allow notifications to wait until the specified value is idle. However, you cannot set dwMillisecondsIdle to INFINITE