3.1.4.1.8 ApiCreateEnum (Opnum 7)

(Protocol Version 2) The ApiCreateEnum method returns a collection of names of objects from the cluster state that are of the specified enumeration type. If multiple enumeration types are indicated, the resulting ENUM_LIST contains zero or more entries of each type, and the type of each entry in the list is indicated by the ENUM_ENTRY data structure, as specified in section 2.2.3.4.

The server MUST accept an ApiCreateEnum request only when its protocol server state is read/write, as specified in section 3.1.1, except when the dwType parameter is CLUSTER_ENUM_NODE. If the dwType parameter is CLUSTER_ENUM_NODE, the server MUST accept an ApiCreateEnum request when the protocol server state is read/write, and the server SHOULD accept an ApiCreateEnum request when the protocol server state is read-only.

 error_status_t ApiCreateEnum(
   [in] DWORD dwType,
   [out] PENUM_LIST *ReturnEnum
 );

dwType: The type of enumeration to be returned by the server. This value MUST be set to the bitwise OR operator of one or more of the following values, except as noted for CLUSTER_ENUM_INTERNAL_NETWORK and CLUSTER_ENUM_SHARED_VOLUME_RESOURCE.

Value

Meaning

CLUSTER_ENUM_NODE

0x00000001

Returns an enumeration of names of cluster nodes.

CLUSTER_ENUM_RESTYPE

0x00000002

Returns an enumeration of names of resource types.

CLUSTER_ENUM_RESOURCE

0x00000004

Returns an enumeration of names of cluster resources.

CLUSTER_ENUM_GROUP

0x00000008

Returns an enumeration of names of cluster groups.

CLUSTER_ENUM_NETWORK

0x00000010

Returns an enumeration of names of cluster networks.

CLUSTER_ENUM_NETINTERFACE

0x00000020

Returns an enumeration of names of cluster network interfaces.

CLUSTER_ENUM_INTERNAL_NETWORK

0x80000000

Cannot be specified with any other value for this parameter. Returns an enumeration of names of cluster networks that can be used for internal communications. The list is ordered from highest to lowest priority order, as maintained by the server in the cluster internal network prioritization list.

ReturnEnum: A pointer to a PENUM_LIST, as specified in section 2.2.3.5. The pointer contains the data that matches the enumeration type that is indicated by the dwType parameter. The server MUST allocate as much memory as is required to return the enumeration data. If the method fails, this parameter MUST be ignored.

Return Values: The method MUST return the following error codes for the conditions that are specified as follows.

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

The server failed to allocate enough memory for the ReturnEnum parameter.

0x00000057

ERROR_INVALID_PARAMETER

The enumeration type that is specified by dwType is not valid.

For any other condition, the server MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table. However, the client SHOULD treat errors specified in 3.2.4.6 as recoverable errors and initiate the reconnect procedure as specified in section 3.2.4.6.

Show: