3.1.4.2.113 ApiCreateBatchPort (Opnum 114)

(Protocol Version 3) The ApiCreateBatchPort method establishes context on the server about client interaction with a cluster registry batch update notification port by means of the current RPC connection. ApiCreateBatchPort returns a context handle so that the client can refer to the context that is created in subsequent method invocations.

The server SHOULD accept an ApiCreateBatchPort request if the client's access level is at least "Read" (section 3.1.4).

 error_status_t ApiCreateBatchPort(
   [in] HKEY_RPC hKey,
   [out] HBATCH_PORT_RPC * phBatchPort,
   [out] error_status_t *rpc_status
 );

hKey: The HKEY_RPC RPC context handle for a key that was previously obtained by a call to ApiGetRootKey, ApiCreateKey, or ApiOpenKey.

phBatchPort: If the method succeeds, the server MUST write a valid HBATCH_PORT_RPC context handle, as specified in section 2.2.1.9, to the address supplied by this parameter. Otherwise, the value at this address 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 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 [C706].

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

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000006

ERROR_INVALID_HANDLE

The data that is pointed to by the hKey parameter does not represent a valid HKEY_RPC context handle.

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