Partager via


CeFindFirstRegChange (Compact 2013)

3/26/2014

This function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified registry key or subkeys.

Syntax

HANDLE CeFindFirstRegChange (
  HKEY hKey,
  BOOL bWatchSubtree,
  DWORD dwNotifyFilter
);

Parameters

  • hKey
    [in] Handle to an open key. This handle is returned by the RegCreateKeyEx or the RegOpenKeyEx function, or it can be set to one of the following predefined keys:

    • HKEY_CLASSES_ROOT
    • HKEY_CURRENT_CONFIG
    • HKEY_CURRENT_USER
    • HKEY_LOCAL_MACHINE
    • HKEY_USERS
  • bWatchSubtree
    [in] If this parameter is set to TRUE, the function reports changes in the specified key and its subkeys. If the parameter is set to FALSE, the function reports changes only in the specified key.
  • dwNotifyFilter
    [in] Changes to be reported. This following table shows possible values.

    Value

    Description

    REG_NOTIFY_CHANGE_LAST_SET

    Notify the caller of changes to a value of the key. This can include adding or deleting a value or changing an existing value.

    REG_NOTIFY_CHANGE_NAME

    Notify the caller if a subkey is added or deleted.

Return Value

A handle to a find change notification object indicates success. INVALID_HANDLE_VALUE indicates failure. To get extended error information, call GetLastError.

Requirements

Header

winreg.h

Library

coredll.lib

See Also

Reference

Registry Notification Functions
RegCreateKeyEx
RegOpenKeyEx