FaxMan SDK Version 4.7
Inspecting the Server Configuration


There are a several other server configuration items your application may want to check out during initialization or other times. These are accessed and changed through the FaxGetConfig/FaxSetConfig functions. The configuration items currently used by the server are:



When set to ON, your FaxMan system will automatically begin listening for incoming calls on all faxmodems that have been configured to receive faxes.



This is the character string used to identify your faxmodem when receiving faxes. This string, which is limited to a maximum of 20 characters, will be transmitted to the calling fax machine during the initial negotiation phase of the fax process.



When set to ON, the server (faxman4.exe) will automatically close itself about a minute after all faxmodems enter the idle state. Note that if AutoReceive is ON and any faxmodems are configured for reception then this state will never be reached, and the server will never automatically shutdown. This feature allows you to minimize memory usage when FaxMan isn't required (although FaxMan does not have a large memory footprint).



This item specifies the path for received fax files to be placed in. If this string is not present or specifies an invalid path then all faxes will be placed in the same directory as the FaxMan server (faxman4.exe).



BannerFont is set to the name of the typeface to use for the banner. For example BannerFont=Arial , Courier, Times New Roman, etcetera. Default is a fixed system font that changes size if it is a high or low-resolution fax.



BannerSize allows the user to specify the size of the BannerFont. BannerSize is set to the height of the font in 200 dpi units, for example a value of 20 would be 1/10" tall. Default is a fixed system font that changes size if it is a high or low-resolution fax.



When set to ON, the FaxMan server will keep a copy of the coverpage that was generated for each fax sent.  The name of the coverpage will be stored in the szGenCoverPage field of the SEND_FAX structure. The temp files will be placed in the directory specified by the CoverPageDir server option.



Specifies the directory in which cover page files will be placed when the RetainCoverPages option is enabled. The FaxMan server must have read/write privileges in the specified directory.



When set to ON, the FaxMan server will not display it’s icon in the traybar area.


To retrieve the setting of any of these configuration items, your app can call the FaxGetConfig function. The following code fragment shows how to access all of these settings:


char buf[255];



// If the first FaxGetConfig function returns 0, that means

// we couldn't load the FaxMan server for some reason, and

// we should report an error.


if (FaxGetConfig(pInfo, "AutoReceive", buf, 255)) {


 // now we can check the other config items without

 // fear of not finding the server

 FaxGetConfig(pInfo, "ReceiveID", buf, 255);

 FaxGetConfig(pInfo, "AutoShutDown", buf, 255);

 FaxGetConfig(pInfo, "ReceivePath", buf, 255);

 // In the real world, of course, I'd store these values

 // somewhere, but this is just an example, so I don't have to!


else {

 //report an error



This is a pretty straightforward operation, similar to extracting the settings from an INI file. Setting the configuration options is just as straightforward. Here's a sample function that will toggle the current AutoReceive state:


int ToggleAutoRx(void)


 char buf[255];

 if (!FaxGetConfig(pInfo, "AutoReceive", buf, 255)) return 0;


 if (!strncmpi(buf, "ON")) FaxSetConfig(pInfo, "AutoReceive", "OFF");

 else FaxSetConfig(pInfo, "AutoReceive", "ON");

 return 1;



As you can see, there's nothing complex about altering the server configuration settings.



© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.