Export (0) Print
Expand All
Expand Minimize

3.1.4.1.23 ApiCreateResEnum (Opnum 22)

(Protocol Version 2) The ApiCreateResEnum method returns a collection of names of objects from the cluster state that are of the specified enumeration type and have a direct relationship to the resource designated by the hResource parameter. 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 SHOULD accept an ApiCreateResEnum request if its protocol server state is read-only and MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.

If the value specified by dwType includes CLUSTER_RESOURCE_ENUM_DEPENDS, the server MUST return the name of all resources on which the resource that is designated by hResource has a simple dependency.

error_status_t ApiCreateResEnum(
  [in] HRES_RPC hResource,
  [in] DWORD dwType,
  [out] PENUM_LIST* ReturnEnum
);

hResource: An HRES_RPC context handle that is obtained in a previous ApiOpenResource or ApiCreateResource method call.

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.

Value Meaning

CLUSTER_RESOURCE_ENUM_DEPENDS
0x00000001

Returns an enumeration of zero or more resource names on which the resource that is specified by hResource depends.

CLUSTER_RESOURCE_ENUM_PROVIDES
0x00000002

Returns an enumeration of zero or more resource names that depend on the resource specified by hResource.

CLUSTER_RESOURCE_ENUM_NODES
0x00000004

Returns an enumeration of zero or more node names that can host the resource specified by hResource.

ReturnEnum: A pointer to a PENUM_LIST (section 2.2.3.5) that 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 specified conditions.

Return value/code Description

0x00000000
ERROR_SUCCESS

Success.

0x00000057
ERROR_INVALID_PARAMETER

The parameter is incorrect.

For any other condition, this method 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. The client SHOULD treat errors specified in section 3.2.4.6 as recoverable errors and initiate the reconnect procedure as specified in section 3.2.4.6.

 
Show:
© 2014 Microsoft