CreateClusterNotifyPortV2 function (clusapi.h)

Creates or modifies a notification port. For information about notification ports, see Receiving Cluster Events.

Syntax

HCHANGE CreateClusterNotifyPortV2(
  [in] HCHANGE                hChange,
  [in] HCLUSTER               hCluster,
  [in] NOTIFY_FILTER_AND_TYPE *Filters,
  [in] DWORD                  dwFilterCount,
  [in] DWORD_PTR              dwNotifyKey
);

Parameters

[in] hChange

A handle to a notification port or INVALID_HANDLE_VALUE, indicating that a new handle should be created. If the hChange parameter is an existing handle, the events that are specified in the dwFilter parameter are added to the notification port.

[in] hCluster

A handle to the cluster to be associated with the notification port that is identified by the hChange parameter or INVALID_HANDLE_VALUE, indicating that the notification port should not be associated with a cluster. If the hChange parameter is not set to INVALID_HANDLE_VALUE, the hCluster parameter cannot be set to INVALID_HANDLE_VALUE.

[in] Filters

A pointer to the NOTIFY_FILTER_AND_TYPE structure that specifies the type of notifications that the port can accept.

[in] dwFilterCount

The number of filters that are specified by the Filters parameter.

[in] dwNotifyKey

A user-specified value to associate with the retrieval of notifications from the notification port. The dwNotifyKey parameter is returned from GetClusterNotifyV2 when an event of one of the types that are specified in Filters occurs.

Return value

If the operation succeeds, the function returns a notification port handle.

If the operation fails, the function returns NULL. For more information about the error, call GetLastError.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2012
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See also

Failover Cluster Management Function