3.1.4.2.163 ApiCreateNetInterfaceEnum (Opnum 181)

The ApiCreateNetInterfaceEnum method<150> returns a collection of cluster network interface names from the cluster state that is installed on the cluster network that are specified by hCluster.

The server MUST accept an ApiCreateNetInterfaceEnum request if its protocol server state is read-only, as specified in section 3.1.1.

The server MUST accept an ApiCreateNetInterfaceEnum request if the access level associated with the hCluster context handle is at least "Read" (section 3.1.4).

 error_status_t
 ApiCreateNetInterfaceEnum (
   [ in ] HCLUSTER_RPC hCluster,
   [ in, string ] LPCWSTR lpszNodeName,
   [ in, string ] LPCWSTR lpszNetworkName,
   [ out ] PENUM_LIST *ReturnEnum,
   [ out ] error_status_t *rpc_status
 );

hCluster: An HCLUSTER_RPC (section 2.2.1.1) context handle that is obtained in a previous ApiOpenCluster (section 3.1.4.2.1) or ApiOpenClusterEx (section 3.1.4.2.116) method call.

lpszNodeName: A null-terminated Unicode string that contains the name of the node on which to locate the cluster network interface.

lpszNetworkName: A null-terminated Unicode string that contains the name of the cluster network on which to locate the cluster network interface.

ReturnEnum: A pointer to a PENUM_LIST, as specified in 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.

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. 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 [C706].

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

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

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

0x000013B2

ERROR_CLUSTER_NODE_NOT_FOUND

A node that matches the name lpszNodeName was not found in the cluster configuration.

0x000013B5

ERROR_CLUSTER_NETWORK_NOT_FOUND

A cluster network that matches the name lpszNetworkName was not found in the cluster configuration.

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.