3.2.4.4 FAX_CloseConnection (Opnum 2)

The FAX_CloseConnection (Opnum 2) method is called by the fax server (acting as an RPC client for this call) when it needs to release the connection to the fax client (acting as an RPC server for this call). When the fax client calls FAX_EndServerNotification (section 3.1.4.1.17), the fax server MUST release the RPC connection to the fax client through this call.

In response, the fax client MUST validate the notification context in the FaxPortHandle argument that is sent by the fax server, to ensure that this is a valid notification context created with a successful FAX_OpenConnection (section 3.2.4.5) method call for which FAX_CloseConnection (section 3.2.4.4) was not already successfully called. If validation fails, the fax client MUST abort the operation and MUST return ERROR_SUCCESS. If the notification context is valid, the fax client MUST close the RPC connection that is identified by the argument.

 error_status_t FAX_CloseConnection(
   [in, out] PRPC_FAX_HANDLE FaxHandle
 );

FaxHandle: A pointer to an RPC_FAX_HANDLE that indicates a context handle to close. For more information about RPC_FAX_HANDLE, see FAX Data Types (section 2.2.74).

This method returns ERROR_SUCCESS (0x00000000) for success. The ERROR_SUCCESS code is also returned for failure when the fax handle specified by the FaxHandle argument indicates an invalid connection context with the intent to mask the failure for a malicious caller. Otherwise, if an unexpected failure happens for a valid fax handle, the method returns one of the standard errors that are defined in [MS-ERREF] section 2.2.

Exceptions Thrown: No exceptions are thrown except those that are thrown by the underlying RPC protocol, [MS-RPCE].