3.1.4.1.88 FAX_SetPort (Opnum 12)

A fax client application uses the FAX_SetPort (Opnum 12) method to set fax device information. The function sets extension configuration properties that are stored at the device level, such as enabling or disabling sending and receiving, and the auto or manual answering of calls.

In response, the server MUST validate whether the FaxPortHandle argument that is passed by the client refers to a port handle that is obtained by a call to FAX_OpenPort (section 3.1.4.1.65) with the PORT_OPEN_MODIFY port access mode flag specified with the Flags argument. The server MUST validate whether the client's fax user account has access to modify the properties of this port. On success, the server MUST modify the properties of the port as specified by the client.<165>

 error_status_t FAX_SetPort(
   [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
   [in] const FAX_PORT_INFO* PortInfo
 );

FaxPortHandle: An RPC context handle that references a specified fax port.

PortInfo: A pointer to a FAX_PORT_INFO (section 2.2.7) structure. The structure (except the State field, which has no purpose for this call and which the fax server SHOULD ignore) contains data to modify the configuration of the specified fax port. The client MUST set the SizeofStruct member of this structure to the correct size described in section 2.2.7 before it calls the FAX_SetPort.

Return Values: This method MUST return 0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the following error codes, 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.

Return value/code

Description

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The client's fax user account does not have the FAX_ACCESS_MANAGE_CONFIG fax access right.

ERROR_INVALID_DATA

0x0000000D

The handle specified by the FaxPortHandle argument is not a valid fax port handle obtained by a call to FAX_OpenPort.<166>

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. This error code is returned if any of the following conditions are met:

§ The pointer specified by the PortInfo argument is NULL.

§ The handle specified by the FaxPortHandle argument is NULL.

§ The requested value of the Priority member of the PortInfo parameter is 0, or is greater than the total number of installed fax devices.

§ The size of the PortInfo argument specified in the SizeOfStruct field is not the correct size, in bytes, for the FAX_PORT_INFO.

§ When FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED is to be returned, but the fax client does not support this error code (the fax client API version described in section 3.1.4.1.10 is FAX_API_VERSION_0).

FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED

0x00001B62

The fax server cannot complete the operation because all of the following conditions are true:

If the fax server has an implementation-dependent maximum number of supported devices set<167> and the number of fax devices currently connected to the server is equal to or exceeds this maximum number of supported devices.

The device is not send, receive, or manual-receive enabled.

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