3.1.4.1.92 ApiOpenNetInterface (Opnum 92)

(Protocol Version 2) The ApiOpenNetInterface method establishes context on the server about the interaction of a client with the specified cluster network interface by using the current RPC connection. ApiOpenNetInterface returns a context handle so that the client can refer to the context that is created in subsequent method calls.

There are several ways by which the client can determine the name of the cluster network interface to specify for the lpszNetInterfaceName parameter. A cluster network interface can have a well-known name if the cluster network interface was configured as such by using implementation-specific methods between servers. Optionally, a client can use ApiCreateEnum with enumeration type CLUSTER_ENUM_NETINTERFACE, as specified in section 3.1.4.1.8. This method obtains a list of all cluster network interface names in the cluster state. The client can then examine names or open the cluster network interface to call additional methods in order to determine which cluster network interface to operate on. Finally, a client supplying the name of the node and cluster network to the ApiGetNetInterface method will get back the corresponding cluster network interface object name for that combination, which can then be provided to this method.

The server SHOULD accept an ApiOpenNetInterface request if its protocol server state is read-only, and the server MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.

 HNETINTERFACE_RPC ApiOpenNetInterface(
   [in, string] LPCWSTR lpszNetInterfaceName,
   [out] error_status_t *Status
 );

lpszNetInterfaceName: A null-terminated Unicode string that contains the name of the cluster network interface for which to establish context on the server.

Status: Indicates the status of this operation. The server MUST set Status to the following error codes for the specified conditions.

Value

Meaning

ERROR_SUCCESS

0x00000000

Success.

ERROR_CLUSTER_NETINTERFACE_NOT_FOUND

0x000013b7

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

For any other condition, the server MUST set Status to a value that is not one of the values listed in the preceding table. The client MUST treat all values that are not listed in the preceding table the same, except as specified in section 3.2.4.6.

Return Values: The method MUST return a valid HNETINTERFACE_RPC context handle, as specified in section 2.2.1.8, to indicate success; otherwise, it MUST return NULL.