Share via


RegistryBatchNotification

Send Feedback

This function sets the batch time for transient notification requests.

HRESULT WINAPI RegistryBatchNotificaton(
  HREGNOTIFY hNotify,
  DWORD dwMillisecondsIdle,
  DWORD dwMillesecondsMax
);

Parameters

  • hNotify
    [in] Handle to a change notification request returned by RegistryNotifyWindow, RegistryNotifyCallback, or RegistryNotifyMsgQueue.
  • dwMillisecondsIdle
    [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.
  • dwMillesecondsMax
    [in] Maximum number of milliseconds between the time the first change happens and the notification event.

Return Values

The following table shows the return values for this function.

Value Description
S_OK Batch times for the specified notification request are changed.
E_INVALIDARG Invalid hNotify or dwMillisecondsIdle is set to INFINITE.

Remarks

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

Requirements

Pocket PC: Windows Mobile 5.0 and later.
Smartphone: Windows Mobile 5.0 and later.
OS Versions: Windows CE 5.01 and later.
Header: Regext.h
Link Library: Aygshell.lib

See Also

State and Notifications Broker Functions | State and Notifications Broker Reference | State and Notifications Broker

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.