<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/f40a3677-3138-4142-9e55-d61c7dfe4284" data-linktype="external">msdn link</a></p><p>(Protocol Version 3) The ApiCreateEnumEx method SHOULD<a id="Appendix_A_Target_104"></a><a aria-label="Product behavior note 104" href="1d58eff8-a042-478c-972c-8e9c76a3f978#Appendix_A_104" data-linktype="relative-path">&lt;104&gt;</a> return two <a href="3b8f47c7-f694-4841-9aea-afa77184bbfa" data-linktype="relative-path">ENUM_LIST</a> structures of
equal length containing the <b>ID</b> and <b>Name</b> attributes of the
requested objects of the specified enumeration type from the cluster state.
Each <b>Element</b> in the <b>ReturnIdEnum</b> parameter corresponds to the ID
of the element at the same offset in the <b>ReturnNameEnum</b> parameter.</p><p>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 <a href="fbc1bc18-45d4-4668-980d-ed639ea2f03e" data-linktype="relative-path">ENUM_ENTRY</a> data structure,
as specified in section 2.2.3.4.</p><p>The server SHOULD accept an ApiCreateEnumEx request if its <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_a93e2fea-3006-4a06-b48f-fdb36d9abac9" data-linktype="relative-path">protocol server state</a> is
read-only, as specified in section <a href="756547e7-ca64-4b7c-9f1b-2b1fbc6153d3" data-linktype="relative-path">3.1.1</a>, and the <i>dwType</i>
parameter is CLUSTER_ENUM_NODE. The server MUST accept an ApiCreateEnumEx
request if its protocol server state is read/write.</p><p>The server MUST fail this method with the
ERROR_INVALID_PARAMETER (0x00000057) return value if the <i>dwType</i>
parameter is not one of the specified values or if the <i>dwOptions</i>
parameter is not 0x00000000.</p><p>The server SHOULD accept an ApiCreateEnumEx request if the
access level associated with the hCluster context handle is at least
&#34;Read&#34; (section <a href="a249a463-3d3b-4058-abf6-3024d81806a0" data-linktype="relative-path">3.1.4</a>).</p><dl>
<dd>
<div><pre> error_status_t ApiCreateEnumEx(
   [in] HCLUSTER_RPC hCluster,
   [in] DWORD dwType,
   [in] DWORD dwOptions,
   [out] PENUM_LIST* ReturnIdEnum,
   [out] PENUM_LIST* ReturnNameEnum,
   [out] error_status_t* rpc_status
 );
</pre></div>
</dd></dl><p><b>hCluster: </b>An <a href="0102f475-9af8-45fa-83e6-22e57451570a" data-linktype="relative-path">HCLUSTER_RPC (section 2.2.1.1)</a>
context handle that was obtained in a previous <a href="19800483-bf86-42ec-8dcc-9af3ed8339e8" data-linktype="relative-path">ApiOpenCluster (section 3.1.4.2.1)</a>
or <a href="00ce494d-0c74-44fd-8276-c73665cf616b" data-linktype="relative-path">ApiOpenClusterEx (section 3.1.4.2.116)</a>
method call.</p><p><b>dwType: </b>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.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>CLUSTER_ENUM_NODE</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>The server MUST return an enumeration of names, in <i>ReturnNameEnum</i>,
  and an enumeration of IDs, in <i>ReturnIdEnum</i>, representing cluster nodes
  that are members of the cluster.</p>
  <p>Each element of <i>ReturnIdEnum</i> that sets <i>dwType</i>
  to CLUSTER_ENUM_NODE contains the ID of the cluster node as if the
  CLUSCTL_NODE_GET_ID control code is sent to the node with the name in the
  corresponding element of the <i>ReturnNameEnum</i>.</p>
  </td>
 </tr><tr>
  <td>
  <p>CLUSTER_ENUM_RESTYPE</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>The serer MUST return an enumeration of names
  representing the <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_597fe367-f504-4295-9ed9-92cd892796cd" data-linktype="relative-path">resource
  types</a> installed in the cluster as the <i>ReturnNameEnum</i> out
  parameter.</p>
  <p>The server MUST return an ENUM_LIST of equal length in
  the <i>ReturnIdEnum</i> out parameter with each element that sets <i>dwType</i>
  to CLUSTER_ENUM_RESTYPE a zero-length null-terminated <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_b069acb4-e364-453e-ac83-42d469bb339e" data-linktype="relative-path">Unicode string</a>.</p>
  </td>
 </tr><tr>
  <td>
  <p>CLUSTER_ENUM_RESOURCE</p>
  <p>0x00000004</p>
  </td>
  <td>
  <p>The server MUST return an enumeration of names, in <i>ReturnNameEnum</i>, 
  and an enumeration of IDs, in <i>ReturnIdEnum</i>,  representing the cluster
  resources.</p>
  <p>Each element of <i>ReturnIdEnum</i> that sets <i>dwType</i>
  to CLUSTER_ENUM_RESOURCE contains the ID of the cluster resource as if the
  CLUSCTL_RESOURCE_GET_ID control code is sent to the resource with the name in
  the corresponding element of the <i>ReturnNameEnum</i>.</p>
  </td>
 </tr><tr>
  <td>
  <p>CLUSTER_ENUM_GROUP</p>
  <p>0x00000008</p>
  </td>
  <td>
  <p>The server MUST return an enumeration of names, in <i>ReturnNameEnum</i>,
  and an enumeration of IDs, in <i>ReturnIdEnum</i>, of cluster groups.</p>
  <p>Each element of <i>ReturnIdEnum</i> that sets <i>dwType</i>
  to CLUSTER_ENUM_GROUP contains the ID of the cluster group as if the
  CLUSCTL_GROUP_GET_ID control code is sent to the group with the name in the
  corresponding element of the <i>ReturnNameEnum</i>.</p>
  </td>
 </tr><tr>
  <td>
  <p>CLUSTER_ENUM_NETWORK</p>
  <p>0x00000010</p>
  </td>
  <td>
  <p>The server MUST return an enumeration of names, in <i>ReturnNameEnum</i>,
  and an enumeration of IDs, in <i>ReturnIdEnum</i>, of <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_5d7cd0af-d5a4-4a59-bb13-9c57663c5ea7" data-linktype="relative-path">cluster networks</a>.</p>
  <p>Each element of <i>ReturnIdEnum</i> that sets <i>dwType</i>
  to CLUSTER_ENUM_NETWORK contains the ID of the cluster network as if the
  CLUSCTL_NETWORK_GET_ID control code is sent to the cluster network with the
  name in the corresponding element of the <i>ReturnNameEnum</i>.</p>
  </td>
 </tr><tr>
  <td>
  <p>CLUSTER_ENUM_NETINTERFACE</p>
  <p>0x00000020</p>
  </td>
  <td>
  <p>The server MUST return an enumeration of names, in <i>ReturnNameEnum</i>,
  and an enumeration of IDs, in <i>ReturnIdEnum</i>, of <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_1e84f613-804f-42bb-a523-658b8ab0df6a" data-linktype="relative-path">cluster network interfaces</a>.</p>
  <p>Each element of <i>ReturnIdEnum</i> that sets <i>dwType</i>
  to CLUSTER_ENUM_NETINTERFACE contains the ID of the cluster network interface
  as if the CLUSCTL_NETINTERFACE_GET_ID control code is sent to the cluster
  network interface with the name in the corresponding element of the <i>ReturnNameEnum</i>.</p>
  </td>
 </tr><tr>
  <td>
  <p>CLUSTER_ENUM_INTERNAL_NETWORK</p>
  <p>0x80000000</p>
  </td>
  <td>
  <p>Cannot be specified with any other value for this
  parameter.</p>
  <p>The server MUST return an enumeration of names, in <i>ReturnNameEnum</i>,
  and an enumeration of IDs, in <i>ReturnIdEnum</i>, of cluster networks that
  are used only for internal communications.</p>
  <p>Each element of <i>ReturnIdEnum</i> that sets <i>dwType</i>
  to CLUSTER_ENUM_INTERNAL_NETWORK contains the ID of the cluster network as if
  the CLUSCTL_NETWORK_GET_ID control code is sent to the cluster network with
  the name in the corresponding element of the <i>ReturnNameEnum</i>.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>dwOptions: </b>A 32-bit integer that specifies the
options on the type of elements to return. The client MUST set this value to
0x00000000. The server MUST fail the call if this parameter is not set to 0x00000000.</p><p><b>ReturnIdEnum: </b>A pointer to a
PENUM_LIST (section 2.2.3.5). The pointer contains the IDs of the
objects that match the enumeration type that is indicated by the <i>dwType</i>
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.</p><p><b>ReturnNameEnum: </b>A pointer to a
PENUM_LIST (section 2.2.3.5). The pointer contains the name of the
objects that match the enumeration type that is indicated by the <i>dwType</i>
parameter, except where noted above. The server MUST allocate as much memory as
is required to return the enumeration data. If the method fails, this parameter
MUST be ignored.</p><p><b>rpc_status: </b>A 32-bit integer used to indicate
success or failure. The <a href="694e5e7a-5833-4f3d-b47e-323ee1d452c2#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a>
runtime MUST indicate, by writing to this parameter, whether it succeeded in
executing this method on the server. The encoding of the value passed in this
parameter MUST conform to encoding for comm_status and fault_status, as
specified in Appendix E of <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a>.</p><p><b>Return Values: </b>The method MUST return the
following error codes for the conditions that are specified as follows.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>ERROR_SUCCESS</p>
  </td>
  <td>
  <p>Success.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000008</p>
  <p>ERROR_NOT_ENOUGH_MEMORY</p>
  </td>
  <td>
  <p>The server failed to allocate enough memory for the <i>ReturnEnum</i>
  parameter.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x000000057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>The enumeration type that is specified by <i>dwType</i>
  is not valid or <i>dwOptions</i> is not set to 0x00000000.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x000006D1</p>
  <p>RPC_S_PROCNUM_OUT_OF_RANGE</p>
  </td>
  <td>
  <p>The server does not support this method.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>For any other condition, the server returns 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 <a href="ca75805a-4b39-4074-8b5b-dbaae6e81b1f" data-linktype="relative-path">3.2.4.6</a> as recoverable
errors and initiate the reconnect procedure as specified in section 3.2.4.6.</p></div>