Platform SDK: Fax Services |
A fax client application calls the FaxSetPort function to change the configuration of the fax port of interest. The configuration data can include, among other items, the permanent line identifier and name, the current status and capability of the port, and the transmitting and called station identifiers.
The application must call the FaxOpenPort function and specify the PORT_OPEN_MODIFY access level before calling the FaxSetPort function.
BOOL WINAPI FaxSetPort( HANDLE FaxPortHandle, // fax port handle CONST FAX_PORT_INFO *PortInfo // new port configuration data );
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError can return one of the following errors.
Error code | Description |
---|---|
ERROR_ACCESS_DENIED | Access is denied. FAX_PORT_SET access is required. |
ERROR_DEVICE_IN_USE | The port indicated by the FaxPortHandle parameter is busy. |
ERROR_INVALID_PARAMETER | One or both of the FaxPortHandle or PortInfo parameters are NULL. |
A fax administration application typically calls the FaxSetPort function to administer the fax devices associated with the fax server. To query the devices, call the FaxGetPort function.
To obtain a valid port handle to specify in the FaxPortHandle parameter of the FaxSetPort function, call the FaxOpenPort function. For more information, see Fax Device Management.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable with BackOffice Small Business Server.
Header: Declared in Winfax.h.
Library: Included as a resource in Winfax.dll.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxGetPort, FaxOpenPort, FaxEnumPorts, FAX_PORT_INFO