Send and Receive FAX with C API

To use the FAXCPP software package to send or receive faxes, the FAXCPP driver mechanism must be initialized first with calling the SetupFaxDriver function. Before the application terminates, the EndOfFaxDriver function must be called to remove all files from memory and to close the system. The parameter of this function can be the name of the fax manager DLL with full path name; if it is NULL then “faxmng.dll” name will be used. The “faxmng.dll” is the default DLL and it comes with the distribution diskette. WARNING the user supplied fax manager must be in a DLL.

It is necessary to create a fax port object for sending a fax. For creating a fax port the name of a fax driver and communication port have to be specified. The fax driver is described in the faxcpp1.ini file in the Windows directory. The name of the fax driver must be referred to in a section of this file. The name of the communication port can be specified in the well-known form; COM1, COM2, ... COMn.

For example:

if(!SetupFaxDriver(NULL) ) {

            FAXPORT FaxPort =  ConnectPort(”COM2”, ”Outgoing Faxes”);

            if(FaxPort) {

                       // We have connected the specified fax driver to a port.

                       }

            }