SetClusterResourceName function (clusapi.h)

Sets the name for a resource. The PCLUSAPI_SET_CLUSTER_RESOURCE_NAME type defines a pointer to this function.

Syntax

DWORD SetClusterResourceName(
  [in] HRESOURCE hResource,
  [in] LPCWSTR   lpszResourceName
);

Parameters

[in] hResource

Handle to a resource to rename.

[in] lpszResourceName

Pointer to the new name for the resource identified by hResource. Resource names are not case sensitive. A resource name must be unique within the cluster.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code.

Remarks

SetClusterResourceName changes the Name common property of the resource identified by hResource. This is the only way that Name, a read-only property, can be changed.

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

Requirements

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

See also

Name

OpenClusterResource