78
Programming Information
CompuFax provides two facilit ies to customize its user interfac e:
Database Interface
Callable Command Interface.

10.1 User-Written Database Applications

CompuFax supports an interface to a database lookup app licatio n , wh ich allows d atabase keys to be t r an s lated
into fax phone numbers. It also allows mail-merge operations on documents to be done automatically, using
data from database records.
A simple database lookup program, FAX_DB.EXE, has been provided with CompuFax, but you may wish to
write your own application, using the supplied library of functions. The library functions allow you to
interface CompuF ax t o you r o wn database progr am s.
Developing an interface between Com puFax and you r own d atabase ap plication is relatively easy. An object
library of callable functions has been provided to take care of most of the overhead of communications and
other CompuFax internal considerations.
This allows the user t o easily interface to their existing datab ase without the necessity of maintaining a
separate database fo r Co mpuFax. It is also p o ssible to allow each user to h ave his own database.
It is not necessary that the database application respond to requests in the order that they are received. It is up
to the implementor whether to respond to requests one at a time or to implement processing that may
complete a later request before an earlier one.
Before writ ing a Co mpu Fax dat abase a pplicat ion, yo u may want to cons ider t he p ossib ility of usin g your
existing database to create a file compatible with FAX_D B. In som e cases the existing repo rt generation
capabilities o f a datab a s e ca n be used a n d the o ver head of wr iting an ap p lication sa ve d .

10.1.1 Working With CompuFax

The CompuFax datab ase application is a detached pro cess. I t wakes up wh enever it receives a req uest fr om
the CompuFax ser ver or th e comm and pr ocesso r. T h ese req uest s are ser viced and th e resu lts ret ur ned to t he
requestor. The mechanics of communications are handled by the FDB (CompuFax database) interface
10