FaxMan SDK Version 4.7
FaxAddDevice

int FaxAddDevice(PAPPINFO pApp, int nPort)

 

Prompts the FaxMan server to attempt to configure a given port, or all ports, for use with the system.

 

Parameter

Type/Description

pApp

PAPPINFO Returned from FaxRegisterApp

int

int Port number to add to the FaxServer or 0 to Autoconfigure

 

Return Value

Returns FAX_ERR_NOSERVER (-2) if the Fax Server could not be located/loaded, otherwise returns FAX_OK (0).

 

Comments

This function will cause the server to interrogate the port specified by nPort and determine if it can be used for faxing operations. If the nPort parameter is 0, the server will attempt to configure all installed ports simultaneously.

 

Setting nPort to 0 is the preferred method for initially configuring the FaxMan system; this would usually be done during application installation, but can be done at any time.

 

NOTE

When a port is successfully configured, it defaults to being a send and receive port. If you wish to change this, your app should reconfigure the port using the FaxConfigureDevicefunction.

 

In general, your app will want to FaxAddDevice faxmodems rarely; certainly, you will not want to use a timer, or even every time your application starts up. FaxMan keeps a record of which faxmodems currently installed, and doesn't need to have this refreshed unless a device is added or removed. For this reason, you may want to add an option to your application to allow the user to perform FaxAddDevice at their discretion, since hopefully the user will have some idea when faxmodems are altered.

 

 


© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.