
Developing a Fax Application
BT_ZERO(args_fax);
args_fax.fname = "memo.txt"; args_fax.fmt = DATA_ASCII; BfvFaxSendFile(lp, &args_fax);
Sends the ASCII text file, memo.txt the only file on the second page, to the driver.
BfvFaxEndOfDocument(lp, &args_fax);
Indicates to the driver that the second page is the last page of the transmission.
BT_ZERO(args_admin);
BfvLineDetach (lp, &args_admin);
Frees all the memory for the attached line and closes the device.
Receiving a Fax Using Function Calls for
One way to receive a fax using function calls for
This example receives fax data into a buffer only and does not include instructions for further processing the contents of the buffer.
BT_ZERO(args_admin); args_admin.unit = unit;
lp = BfvLineAttach(&args_admin);
Attaches to a free channel and gets a BTLINE pointer.
args_admin.config_file_name = "usrcnfig.cfg"; BfvLineReset(lp,&args_admin);
Resets the channel and sets the
BT_ZERO(args_tel); args_tel.timeout = 0L; BfvLineWaitForCall (lp, &args_tel);
Waits for the detection of an incoming call.
BfvLineAnswer (lp, &args_tel);
Answers the phone line by going
November 2009 | 73 |