ApiCreateResEnum (Opnum 22)

(Protocol Version 3) 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

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 either a simple or a complex dependency.

The server SHOULD accept an ApiCreateResEnum request if the access level associated with the hResource context handle is at least "Read" (section 3.1.4).

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

hResource: An HRES_RPC context handle that is obtained in a previous ApiOpenResource, ApiOpenResourceEx, 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.





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



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



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 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.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether the runtime succeeded in executing this method on the server. A value of 0x00000000 indicates that the method call was successfully transported to the server, executed with no faults, and returned control to the client without encountering any communication faults. This value is separate from the value returned by the method and does not represent the success of the method. The client MUST treat all nonzero values the same, except as specified in section

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code







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 as recoverable errors and initiate the reconnect procedure as specified in section