FaxMan SDK Version 4.7
Working with Modems

Before faxes can be sent or received the FaxMan engine must be configured with the list of modems to use. The FaxMan control's Modems collection is used to manage the modems used by the FaxMan engine. The modem collection is bindable and can be bound to databinding aware controls such as the Datagrid.


Adding Modems to FaxMan

Modems can be added to the FaxMan engine in two ways, first the AutoDetect method can be called which will cause the FaxMan engine to look at the comm ports on a system and add all the modems it can locate to its pool of usable devices. The AddModem method can also be used to add a specific modem to the FaxMan modem pool.


Once modems are added to the FaxMan modem pool they will remain until they are removed using the Remove method.  Applications only need to call AutoDetect or AddModem if new modems have been added to a system or the first time an application starts up. Applications can look at the Modems.Count property to determine how many modems are in the FaxMan pool. If it's zero then the application may wish to call the AutoDetect method as without modems FaxMan will not be able to send or receive faxes.


Configuring Individual Modems

Individual modems can be configured using the properties in the Modem object for the given modem. To get a Modem object for a modem on a specific port use the Port method of the Modems collection. This method takes the comm port id of the modem and returns the Modem object for that device, if no modem is found for that port the property will return null. The Modems collection also supports the IEnumerable interface allowing you to use the ForEach construct to iterate thru all the configured modems.


Modem Methods



Call the Update method after changing one or more of the properties of the Modem object. Changes to the properties are not committed until you call this method.

Modem Properties



If true this modem will be used to send faxes.



If true this modem will be used to receive faxes. The AutoReceive server option must also be enabled for FaxMan to receive faxes.



Returns the comm port id of this modem



Sets or returns the id of the queue associated with this modem. The default value is zero which specifies the general system queue. Queues can be used to create logical groups of modems which can be specified when sending faxes.


IsClass1, IsClass2, IsClass20, IsClass21

These boolean properties specify which modem classes FaxMan should use when interacting with a modem. When a modem is added to FaxMan using the AutoDetect method the appropriate IsClass properties will be set based on the capabilities of the modem. These properties will generally only need to be changed to force FaxMan to use a different class when using a particular modem in the event of firmware or compatibility issues.



Specifies the initialization string FaxMan will send to the modem at the beginning of each send or receive session.



Specifies the reset string used by FaxMan to reset the modem at the beginning of each fax send or receive session prior to sending the initialization string. The default is ATZ which causes a soft modem reset.







© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.