Example #1
0
 private static extern int _RegNotifyChangeKeyValue(
     SafeHandle hKey,
     bool bWatchSubtree,
     RegNotifyChange dwNotifyFilter,
     SafeHandle hEvent,
     bool fAsynchronous
 );
Example #2
0
 private static extern int _RegNotifyChangeKeyValue(
     SafeHandle hKey,
     bool bWatchSubtree,
     RegNotifyChange dwNotifyFilter,
     SafeHandle hEvent,
     bool fAsynchronous
     );
Example #3
0
 private static extern int RegNotifyChangeKeyValue(
     IntPtr hKey,
     bool watchSubtree,
     RegNotifyChange notifyFilter,
     IntPtr hEvent,
     bool asynchronous
     );
Example #4
0
        public static void RegNotifyChangeKeyValue(
            RegistryKey key,
            WaitHandle notifyEvent,
            bool recursive = false,
            RegNotifyChange filter = RegNotifyChange.Value
        ) {
            int error = _RegNotifyChangeKeyValue(
                key.Handle,
                recursive,
                filter,
                notifyEvent.SafeWaitHandle,
                true);

            if (error != 0) {
                throw new Win32Exception(error);
            }
        }
Example #5
0
        public static void RegNotifyChangeKeyValue(
            RegistryKey key,
            WaitHandle notifyEvent,
            bool recursive         = false,
            RegNotifyChange filter = RegNotifyChange.Value
            )
        {
            int error = _RegNotifyChangeKeyValue(
                key.Handle,
                recursive,
                filter,
                notifyEvent.SafeWaitHandle,
                true);

            if (error != 0)
            {
                throw new Win32Exception(error);
            }
        }
Example #6
0
 public RegistryChangeMonitor(string registryPath, RegNotifyChange filter)
 {
     _registryPath = registryPath.ToUpper();
     _filter       = filter;
 }