RegisterClusterNotify

The RegisterClusterNotify function adds an event type to the list of events stored for a notification port.

DWORD WINAPI RegisterClusterNotify(
  HCHANGE hChange,  
  DWORD dwFilter,   
  HANDLE hObject,   
  DWORD dwNotifyKey 
);
 

Parameters

hChange
[in] Handle to a notification port created with the CreateClusterNotifyPort function.
dwFilter
[in] Bitmask of flags that describes the event to be added to the set of events currently being monitored by the notification port. For more information about these event types, see CreateClusterNotifyPort. The dwFilter parameter can be set to one of the following flags:
CLUSTER_CHANGE_GROUP_DELETED
Indicates that a notification should be issued when an existing resource group is deleted.
CLUSTER_CHANGE_GROUP_PROPERTY
Indicates that a notification should be issued when the properties of an existing resource group change.
CLUSTER_CHANGE_GROUP_STATE
Indicates that a notification should be issued when a resource group changes state.
CLUSTER_CHANGE_HANDLE_CLOSE
Indicates that a notification should be issued when a handle to a cluster object has closed.
CLUSTER_CHANGE_NODE_DELETED
Indicates that a notification should be issued when a node is permanently removed from a cluster.
CLUSTER_CHANGE_NODE_PROPERTY
This notification is reserved for future use.
CLUSTER_CHANGE_NODE_STATE
Indicates that a notification should be issued when a node changes state.
CLUSTER_CHANGE_REGISTRY_ATTRIBUTES
Indicates that a notification should be issued when a cluster database key's attributes are changed.
CLUSTER_CHANGE_REGISTRY_NAME
Indicates that a notification should be issued when a change to a name is made in the cluster database.
CLUSTER_CHANGE_REGISTRY_SUBTREE
Indicates that the other CLUSTER_CHANGE_REGISTRY events apply to the root of the cluster database and to all of the subkeys. If CLUSTER_CHANGE_REGISTRY_SUBTREE is not specified, the notifications apply only to the root.
CLUSTER_CHANGE_REGISTRY_VALUE
Indicates that a notification should be issued when a value of the specified cluster database key is changed or deleted.
CLUSTER_CHANGE_RESOURCE_DELETED
Indicates that a notification should be issued when a resource is deleted.
CLUSTER_CHANGE_RESOURCE_PROPERTY
Indicates that a notification should be issued when the properties of a resource change.
CLUSTER_CHANGE_RESOURCE_STATE
Indicates that a notification should be issued when a resource changes state.
hObject
[in] Handle to the object affected by the event specified in the dwFilter parameter. The type of handle depends on the value of dwFilter as is described in the following table:
Value of dwFilter Value of hObject
CLUSTER_CHANGE_GROUP_DELETED HGROUP
CLUSTER_CHANGE_GROUP_PROPERTY HGROUP
CLUSTER_CHANGE_GROUP_STATE HGROUP
CLUSTER_CHANGE_NODE_DELETED HNODE
CLUSTER_CHANGE_NODE_PROPERTY HNODE
CLUSTER_CHANGE_NODE_STATE HNODE
CLUSTER_CHANGE_REGISTRY_ATTRIBUTES HKEY
CLUSTER_CHANGE_REGISTRY_NAME HKEY
CLUSTER_CHANGE_REGISTRY_SUBTREE HKEY
CLUSTER_CHANGE_REGISTRY_VALUE HKEY
CLUSTER_CHANGE_RESOURCE_DELETED HRESOURCE
CLUSTER_CHANGE_RESOURCE_PROPERTY HRESOURCE
CLUSTER_CHANGE_RESOURCE_STATE HRESOURCE

The cluster database functions return a valid cluster database key that can be used to set hObject when dwFilter is set to an event type affecting the cluster database.

dwNotifyKey
[in] Notification key that will be returned from GetClusterNotify when the requested event occurs.

Return Values

ERROR_SUCCESS
The operation was successful.

If the operation was unsuccessful, RegisterClusterNotify returns a Win32 error value.

Remarks

The RegisterClusterNotify function enables an application that has already created a notification port with CreateClusterNotifyPort to register for an additional event that affects a node, resource, or group.

To receive notifications of cluster database changes, one or more of the flags applicable to the database must be set in the dwFilter parameter. Applicable flags start with the prefix CLUSTER_CHANGE_REGISTRY. Making manual changes to the cluster database through the registry editor, REGEDT32, will not cause notifications to be generated.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.