FaxMan SDK Version 4.7
Installing Fax Devices and Auto Configuration

When FaxMan is initially installed, there will be no devices configured for its use. Your application can fix this little problem quite easily, though, through the use of the FaxAddDevice function. FaxAddDevice is used to add a faxmodem to the FaxMan system. Your application calls this function and passes it the port number you wish to add the device on. FaxMan will then query the faxmodem on that port and configure it for future use; this process normally takes about 1 to 2 seconds to complete. If the device on the specified port is not a valid faxmodem, or if some other condition causes FaxMan to be unable to configure the port, then FaxMan is smart enough to exclude the port from use. This means that your application can attempt to add faxmodems on any port it wishes without fear of adding an invalid device for FaxMan's use.

 

As an added bonus, the FaxAddDevice function can also be used to cause the FaxMan server to automatically detect and configure all installed faxmodems. This is accomplished by passing a 0 as the port number to add. Doing this causes the server to inspect each installed comm port to detect any faxmodems. FaxMan configures each port sequentially, so it could potentially be several seconds before this function has completed, depending, of course, on your particular hardware setup.

 

As FaxMan adds each port to the system, it will notify your application with a FAXMODEMMSG for the port. When it has completed enumerating the ports, and completed the notification of your application for each available faxmodem, FaxMan notifies your application by sending a FAXMODEMDONE message. Unlike the FaxEnumDevices function call, however, the configuration process will continue after the FaxAddDevice function returns; in other words, after calling the FaxAddDevice function, you'll have to wait until configuration is completed to be sure that all devices have been reported to your application.

 

 


© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.