FaxSetPortA function (winfax.h)
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 capability of the port, its priority, rings before answer, and the transmitting and called station identifiers..
Syntax
WINFAXAPI BOOL FaxSetPortA(
[in] HANDLE FaxPortHandle,
[in] const FAX_PORT_INFOA *PortInfo
);
Parameters
[in] FaxPortHandle
Type: HANDLE
Specifies a fax port handle returned by a call to the FaxOpenPort function.
[in] PortInfo
Type: const FAX_PORT_INFO*
Pointer to a FAX_PORT_INFO structure. The structure contains data to modify the configuration of the specified fax port.
Return value
Type: BOOL
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.
Return code | Description |
---|---|
|
Access is denied. FAX_PORT_SET access is required. |
|
The port indicated by the FaxPortHandle parameter is busy. |
|
One or both of the FaxPortHandle or PortInfo parameters are NULL. |
Remarks
The application must call the FaxOpenPort function and specify the PORT_OPEN_MODIFY access level before calling the FaxSetPort function.
Only the following members of the FAX_PORT_INFO structure can be set using this function: Flags, Rings, Priority, Tsid, and Csid
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.
Note
The winfax.h header defines FaxSetPort as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winfax.h |
Library | WinFax.lib |
See also
Fax Service Client API Functions