Windows Dev Center

ClusterResourceTypeEnum function

Enumerates a resource type's possible owner nodes or resources, returning the name of one node or resource per call. The PCLUSAPI_CLUSTER_RESOURCE_TYPE_ENUM type defines a pointer to this function.

Syntax


DWORD WINAPI ClusterResourceTypeEnum(
  _In_    HRESTYPEENUM hResTypeEnum,
  _In_    DWORD        dwIndex,
  _Out_   LPDWORD      lpdwType,
  _Out_   LPWSTR       lpszName,
  _Inout_ LPDWORD      lpcchName
);

typedef DWORD (WINAPI *PCLUSAPI_CLUSTER_RESOURCE_TYPE_ENUM)(
    _In_    HRESTYPEENUM hResTypeEnum,
    _In_    DWORD        dwIndex,
    _Out_   LPDWORD      lpdwType,
    _Out_   LPWSTR       lpszName,
    _Inout_ LPDWORD      lpcchName
);

Parameters

hResTypeEnum [in]

Resource type enumeration handle returned from ClusterResourceTypeOpenEnum.

dwIndex [in]

Index of the resource or node object to return. This parameter should be zero for the first call to ClusterResourceTypeEnum and then incremented for subsequent calls.

lpdwType [out]

Type of object returned by ClusterResourceTypeEnum. The following values of the CLUSTER_RESOURCE_TYPE_ENUM enumeration are valid.

ValueMeaning
CLUSTER_RESOURCE_TYPE_ENUM_NODES
1

The object is a node that can be a possible owner of the resource type.

CLUSTER_RESOURCE_TYPE_ENUM_RESOURCES
2

The object is a resource that is an instance of the resource type.

 

lpszName [out]

Pointer to a null-terminated Unicode string containing the name of the returned object.

lpcchName [in, out]

Pointer to the size of the lpszName buffer as a count of characters. On input, specify the maximum number of characters the buffer can hold, including the terminating NULL. On output, specifies the number of characters in the resulting name, excluding the terminating NULL.

Return value

The function returns one of the following values.

Return code/valueDescription
ERROR_SUCCESS
0

The operation was successful.

ERROR_NO_MORE_ITEMS
259

There are no more objects to be returned.

ERROR_MORE_DATA
234

The buffer pointed to by lpszName is not big enough to hold the result. The lpcchName parameter returns the number of characters in the result, excluding the terminating NULL.

System error code

The operation failed.

 

Remarks

Note that lpcchName refers to a count of characters and not a count of bytes, and that the returned size does not include the terminating NULL in the count. For more information on sizing buffers, see Data Size Conventions.

Examples

See Enumerating Objects.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 Enterprise, Windows Server 2003 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

Resource Type Management Functions
CLUSTER_RESOURCE_TYPE_ENUM
ClusterResourceTypeOpenEnum
ClusterResourceTypeCloseEnum

 

 

Show:
© 2015 Microsoft