CreateClusterResource function

Creates a resource in a cluster. The PCLUSAPI_CREATE_CLUSTER_RESOURCE type defines a pointer to this function.

Syntax


HRESOURCE WINAPI CreateClusterResource(
  _In_ HGROUP  hGroup,
  _In_ LPCWSTR lpszResourceName,
  _In_ LPCWSTR lpszResourceType,
  _In_ DWORD   dwFlags
);

typedef HRESOURCE (WINAPI *PCLUSAPI_CREATE_CLUSTER_RESOURCE)(
    _In_ HGROUP  hGroup,
    _In_ LPCWSTR lpszResourceName,
    _In_ LPCWSTR lpszResourceType,
    _In_ DWORD   dwFlags
);

Parameters

hGroup [in]

Handle to the group that should receive the resource.

lpszResourceName [in]

Pointer to a null-terminated Unicode string containing the name of the new resource. The specified name must be unique within the cluster.

lpszResourceType [in]

Pointer to the type of new resource. The specified type must be installed in the cluster.

dwFlags [in]

Bitmask describing how the resource should be added to the cluster. The dwFlags parameter can be set to one of the following values enumerated from the CLUSTER_RESOURCE_CREATE_FLAGS enumeration.

CLUSTER_RESOURCE_DEFAULT_MONITOR (0)

The Cluster service determines the Resource Monitor to which the new resource will be assigned.

CLUSTER_RESOURCE_SEPARATE_MONITOR (1)

Causes the Cluster service to create a separate Resource Monitor dedicated exclusively to the new resource.

Return value

If the operation succeeds, the function returns a resource handle.

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

Remarks

Do not call CreateClusterResource from a resource DLL. For more information, see Function Calls to Avoid in Resource DLLs.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

Cluster Resource Management Functions
DeleteClusterResource
OpenClusterGroup
CLUSTER_RESOURCE_CREATE_FLAGS

 

 

Show: