Share via


ClusResources.CreateItem method

[The CreateItem method is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Creates a resource and adds it to a ClusResources collection.

Syntax

ClusResources.CreateItem( _
  ByVal strResourceName, _
  ByVal strResourceType, _
  ByVal strGroupName, _
  ByVal lFlag _
)

Parameters

strResourceName

String containing the name of the resource to create.

strResourceType

String specifying the type of resource to create.

strGroupName

String containing the name of the group to which the new resource will belong.

lFlag

Value indicating how to create the resource. lFlag can be set to one of these 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

Object that receives contains the new ClusResource object representing the new resource.

Remarks

For information on making constants defined by the Cluster Automation Server type library (MsClus.tlb) available to scripts, see Creating a Cluster Automation Server Script.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Header
MsClus.h
IDL
MsClus.idl
Type library
MsClus.tlb
DLL
MsClus.dll
IID
IID_ISClusResources is defined as F2E6070C-2631-11D1-89F1-00A0C90D061E

See also

ClusResource

ClusResources

CLUSTER_RESOURCE_CREATE_FLAGS