Name Property for Resources

The Name property provides the name of the resource.

Quick Info

Type: Null-terminated Unicode string
Access: Read-only
Functions: ClusterResourceControl
SetClusterResourceName
Structure: CLUSPROP_SZ
Control Codes: CLUSCTL_RESOURCE_GET_RO_COMMON_PROPERTIES
CLUSCTL_RESOURCE_GET_NAME

Remarks

An application can retrieve the Name property of a resource by calling ClusterResourceControl with one of the following control codes:

With CLUSCTL_RESOURCE_GET_RO_COMMON_PROPERTIES, the Name property is an entry in a property list containing all of the read-only common resource properties. The property value portion of the entry contains a CLUSPROP_SZ structure that is set as follows:

CLUSPROP_SZ NameValue;
LPCWSTR NameData = L "My Application";
NameValue.Syntax = CLUSPROP_SYNTAX_LIST_VALUE_SZ;
NameValue.cbLength = sizeof(NameData);
lstrcpyW(NameValue.sz, NameData);
 

With CLUSCTL_RESOURCE_GET_NAME, the output is a single null-terminated string. Using this control code eliminates the need to parse through a property list to locate the name. Applications that need only the Name property should use the CLUSCTL_RESOURCE_GET_NAME control code to retrieve it.

Applications can change a resource's name only by calling SetClusterResourceName. Because the Name property is read-only, it cannot be changed using the CLUSCTL_RESOURCE_SET_COMMON_PROPERTIES control code.

QuickInfo

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