|
|
|
|
|
- Overview
- How to send faxes?
- Programming the sending of faxes
- Sending a fax from a WINDEV application or from a WEBDEV website
- Sending a fax created with the report editor
- Configuring the fax server programmatically
- Options of fax server
- Tips
Sending faxes with WINDEV and WEBDEV
To send faxes from an application or from a site, WINDEV and WEBDEV propose several functions allowing you to send faxes via the system fax server available in Windows XP and Windows 2000. Note: Under Windows Vista, fax management is only available with Windows Vista Professional and Windows Vista Ultimate. To send faxes from a WINDEV application or from a WEBDEV website, you must: Programming the sending of faxes Sending a fax from a WINDEV application or from a WEBDEV website To send a fax from a WINDEV application or from a WEBDEV website, you must: - Prepare the fax, which means the file that will be sent. A specific first page (called "Cover page") can also be attached to the fax. This cover page is a ".cov" file and it can be created from the fax server.
- Use the FaxConnect function. This function is used to connect the WINDEV application to the fax server installed on the current computer.
- Send the fax:
- with the FaxSend function. When sending the fax, you have the ability to specify the name of a WLanguage procedure. This procedure will be called whenever the status of the fax is modified by the fax server. The status of the fax is returned by FaxStatus. This function is used to fill the FaxCompleteStatus structure containing the characteristics of the fax.
- with iDestination and the print functions. This solution allows you to directly print a report created with the report editor. In this case, you can give a name to the fax sent. The status of the fax will be returned by FaxStatus. This function is used to fill the FaxCompleteStatus structure containing the characteristics of the fax.
Note: Only one fax can be sent at a time. However, it is possible to execute several FaxSend functions in succession: the various faxes will be placed in the fax send queue.. The WLanguage procedure combined with FaxStatus allows you to find out which fax is currently processed. This function is used to fill the FaxCompleteStatus structure containing the characteristics of the fax.
- When the faxes have been sent, all you have to do is disconnect the WINDEV application from the fax server with FaxDisconnect.
Sending a fax created with the report editor To send a fax created with the report editor, you can: - use only the iDestination function. The report printed by iPrintReport will be sent to the specified fax number. In this case, you cannot follow the progress of the fax.
iDestination(iFax, "0006050402")
iPrintReport(ETAT_FactureCli)
- use Fax functions and iDestination. iDestination establishes (if necessary) a connection to the fax server and returns the identifier of this connection. This identifier can be used by the Fax functions to follow the progress of the send operation.
IDConnect is int
IDConnect = iDestination(iFax, "0006050402", "MonFax","\\monFax\ImprimanteFax")
iPrintReport(ETAT_FactureCli)
Configuring the fax server programmatically Options of fax server The standard fax server of Windows proposes several options that can be configured directly from the interface of the fax server. These different options can be configured through programming via the registry. You have the ability to configure and find out: - information about the sending of faxes (Windows 2000):
The corresponding registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax:
| | Archive the outgoing faxes | ArchiveOutgoingFax | Directory of outgoing faxes | ArchiveDirectory | Forbid the custom cover pages | ServerCoverPageOnly | Number of attempts | Retries | Number of days before deleting the unsent faxes | Dirty Days | Number of minutes between two attempts | Retry Delay | Print the top header | Branding | Time when the economy rate ends | StopCheapTime | Time when the economy rate starts | StartCheapTime |
- information about the sender of the fax (Windows 2000):
The corresponding registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax\UserInfo:
| | Billing code | BillingCode | Business address | Office | Business phone | OfficePhone | Company | Company | Department | Department | Displays the status monitor when sending AND receiving faxes | VisualNotification | Full name | FullName | Home phone | HomePhone | Mailbox address | Mailbox | Number of the fax sender | FaxNumber | Sound notification | SoundNotification | Status monitor always on the top | AlwaysOnTop | Title | Title |
Tips To create a fax server and manage the redial, we advise you to specify the following options in the fax manager: - No retry for sending faxes:
RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax","Retries",0) - Timeout set to 0 mn between two attempts:
RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax","Retry Delay",0) - 0 day for keeping the unsent faxes:
RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax","Dirty Days",0)
It is possible to consider that a fax whose status changed from FaxStatusInit OR FaxStatusCall to FaxStatusInactive was attempted to be sent once. Then, this fax can be re-sent (it will not be automatically re-sent because "No retry for sending faxes" is set to True).
Related Examples:
|
Unit examples (WINDEV): Sending a fax
[ + ] Sending a fax with WINDEV. The fax can be sent via a fax server or via a modem properly installed and configured on the user computer.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|