3.1.4.2.2 FaxObs_ConnectionRefCount (Opnum 0)

The FaxObs_ConnectionRefCount (Opnum 0) method is called by the client to connect to or disconnect from the server.

In response the server MUST connect to or disconnect from the client.

If this call is successfully made with a Connect argument value of Connect (0x00000001), the client SHOULD retain the RPC binding handle used for the hBinding argument and reuse it as the RPC binding handle input argument for all subsequent fax server calls made, until the connection with the server is disconnected.

 error_status_t FaxObs_ConnectionRefCount(
   [in] handle_t hBinding,
   [in, out] PRPC_FAX_SVC_HANDLE Handle,
   [in] DWORD Connect,
   [out] LPDWORD CanShare
 );

hBinding: The RPC binding handle that is provided by the client RPC layer when the RPC call is made. If Connect is set to Disconnect (0x00000000), the client SHOULD reuse the RPC binding handle used for the FaxObs_ConnectionRefCount call used to connect to the fax server.

Handle: The connection handle that references a connection between the client and the server. If Connect is set to 0x00000001 (Connect), a new handle is returned in this parameter. Otherwise, this parameter MUST be set to a handle returned from a previous call to this method.

Connect: A DWORD ([MS-DTYP] section 2.2.9) value that specifies connection information.

Value/code

Meaning

Disconnect

0x00000000

Close the Fax Server connection.

The handle specified in Handle MUST have been returned by a previous call to FaxObs_ConnectionRefCount with a Connect value of 0x00000001 (Connect). After this call, the handle in Handle will be invalid and MUST NOT be used in any subsequent calls.

Connect

0x00000001

Connect to the Fax Server.

CanShare: The fax server MUST return a nonzero value in the DWORD referenced by this parameter if the fax print queues can be shared as described in section 3.1.1, and a zero value otherwise.<183>

Return Values: This method MUST return 0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the fax-specific errors that are defined in section 2.2.52 or one of the other standard errors defined in [MS-ERREF] section 2.2. There are no predefined specific error codes to be returned by this method.

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