home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR11 / C3FAXDEM.ZIP / C3FAX.DOC next >
Text File  |  1993-08-28  |  79KB  |  2,453 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                               C3Fax
  27.          CAS Fax Library for Clarion Database Developer
  28.                    1993, C3 Development, Inc.
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.                  (c) 1993, C3 Development, Inc.
  54.                          (Revision 1.1)
  55.                      C3Fax Table of Contents
  56.  
  57. Copyright  . . . . . . . . . . . . . . . . . . . . . . . . . .iii
  58.  
  59. FAXInstalled . . . . . . . . . . . . . . . . . . . . . . . . .  1
  60.  
  61. FAXQCreate . . . . . . . . . . . . . . . . . . . . . . . . . .  2
  62.  
  63. FAXQFile . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  64.  
  65. FAXQRemove . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  66.  
  67. FAXQSubmit . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  68.  
  69. FAXCurrentEvent. . . . . . . . . . . . . . . . . . . . . . . .  8
  70.  
  71. FAXAbortCEvent . . . . . . . . . . . . . . . . . . . . . . . .  9
  72.  
  73. FAXSetRes. . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  74.  
  75. FAXSetSize . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  76.  
  77. FAXSetEvent. . . . . . . . . . . . . . . . . . . . . . . . . . 12
  78.  
  79. FAXSetCvrPage. . . . . . . . . . . . . . . . . . . . . . . . . 13
  80.  
  81. FAXSendOneFile . . . . . . . . . . . . . . . . . . . . . . . . 14
  82.  
  83. FAXFindFirst . . . . . . . . . . . . . . . . . . . . . . . . . 15
  84.  
  85. FAXFindNext. . . . . . . . . . . . . . . . . . . . . . . . . . 17
  86.  
  87. FAXOpen. . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
  88.  
  89. FAXRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
  90.  
  91. FAXClose . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
  92.  
  93. FAXDeleteOne . . . . . . . . . . . . . . . . . . . . . . . . . 23
  94.  
  95. FAXDeleteAll . . . . . . . . . . . . . . . . . . . . . . . . . 25
  96.  
  97. FAXGetEventD . . . . . . . . . . . . . . . . . . . . . . . . . 26
  98.  
  99. FAXSetEventD . . . . . . . . . . . . . . . . . . . . . . . . . 27
  100.  
  101. FAXGetEventT . . . . . . . . . . . . . . . . . . . . . . . . . 28
  102.  
  103. FAXSetEventT . . . . . . . . . . . . . . . . . . . . . . . . . 29
  104.  
  105. FAXGetEDB. . . . . . . . . . . . . . . . . . . . . . . . . . . 30
  106.  
  107. FAXRecState. . . . . . . . . . . . . . . . . . . . . . . . . . 32
  108.  
  109. FAXQStatus . . . . . . . . . . . . . . . . . . . . . . . . . . 33
  110.  
  111. FAXGetHwStat . . . . . . . . . . . . . . . . . . . . . . . . . 35
  112.  
  113. FAXDiags . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
  114.  
  115. FAXMoveFile. . . . . . . . . . . . . . . . . . . . . . . . . . 37
  116.  
  117. FAXSetCvrStat. . . . . . . . . . . . . . . . . . . . . . . . . 38
  118.  
  119. CvtHex2Num . . . . . . . . . . . . . . . . . . . . . . . . . . 39
  120.  
  121. CvtNum2Hex . . . . . . . . . . . . . . . . . . . . . . . . . . 40
  122.  
  123. Long2DosD. . . . . . . . . . . . . . . . . . . . . . . . . . . 41
  124.  
  125. Long2DosT. . . . . . . . . . . . . . . . . . . . . . . . . . . 42
  126.  
  127. Control File Structure . . . . . . . . . . . . . . . . . . . .A.1
  128.  
  129. Control File Structure . . . . . . . . . . . . . . . . . . . .A.1
  130.  
  131. Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . .B.1
  132.  
  133. Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.1
  134.  
  135. Events and Control Files . . . . . . . . . . . . . . . . . . .D.1
  136.  
  137. The following is the copyright notice contained in the CAS
  138. specification:
  139.  
  140. Copyright  1988, 1989, 1990.  All rights reserved.
  141.  
  142. Digital Communications Associates, Inc.
  143. 1000 Alderman Drive
  144. Alpharetta, GA 30201-4199
  145.  
  146. Intel Corporation
  147. 5200 N.E. Elam Young Pkwy.
  148. Hillsboro, OR 97124-6497
  149.  
  150. Intel Part Number:  301812-004
  151.  
  152. This specification was jointly developed by Digital
  153. Communications Associates, Incorporated and Intel Corporation. 
  154. Although it has been released into the public domain and is not
  155. confidential or proprietary, the specification is still the
  156. copyright and property of Digital Communications Associates,
  157. Incorporated and Intel Corporation.
  158.  
  159.  
  160. C3Fax is a Clarion Database Developer library based on the CAS
  161. Specification. 
  162.  
  163. Clarion Database Developer and Clarion are Trademarks of Clarion
  164. Software, Inc.
  165.  
  166. FAXInstalled( )                           (get installed state)
  167.  
  168.  
  169.                          FAXInstalled( )
  170.  
  171. The FAXInstalled function returns the current state of a CAS
  172. compliant FAX manager.
  173.  
  174. Return Data Type: BYTE
  175.  
  176. Return Values:  TRUE  (0) - No CAS compliant FAX Manager
  177.                            installed.
  178.                 FALSE (1) - CAS compliant FAX Manager installed.
  179.  
  180. Example:
  181.  
  182.           IF FAXInstalled()
  183.                DO SendFax
  184.           ELSE
  185.                DO FaxNotAvail
  186.           END
  187.  
  188. FAXQCreate( )                            (create new FAX Queue)
  189.  
  190.  
  191.                    FAXQCreate( <Sender Name>,
  192.                                 <Receiver Name>,
  193.                                 <Logo File> )
  194.  
  195. The FAXQCreate function resets all FAX values to defaults and
  196. prepares for sending multiple FAX files to be submitted with
  197. FAXQSubmit.
  198.  
  199. Sender Name         Optional - a string value to appear in the
  200.                               FROM: field of the FAX.
  201.  
  202.                     Default Value - Blank
  203.  
  204. Receiver Name       Optional - a string value to appear in the
  205.                               TO: field of the FAX.
  206.  
  207.                     Default Value - Blank
  208.  
  209. Logo File           Optional - Path and name of a PCX logo file. 
  210.  
  211.                     NOTE: Logo File Must include drive and
  212.                           directory qualifier.
  213.  
  214.                     Default Value - Blank
  215.  
  216. Return Data Type:   BYTE
  217.  
  218. Return Values:      Always TRUE (1) in this implementation.
  219.  
  220. Example:
  221.  
  222.           FromName = 'Todd Carlson'
  223.           ToName = 'C3 Development, Inc.'
  224.           LogoFile = 'C:\FAX\C3LOGO.PCX'
  225.           x# = FAXQCreate( FromName, ToName, LogoFile )
  226.  
  227. See Also: FAXQFile, FAXQSubmit, FAXQRemove, FAXSetCvrPge,
  228.           FAXSetRes, FAXSetEvent
  229.  
  230. FAXQFile( )                             (add file to FAX Queue)
  231.  
  232.  
  233.                       FAXQFile( File Name,
  234.                                  <File Type>,
  235.                                  <Text Size>,
  236.                                  <Page Length>,
  237.                                  <Page Increments> )
  238.  
  239. The FAXQFile function adds a file to the FAX Queue created with
  240. FAXQCreate and submitted with FAXQSubmit.  Up to 32,767 files may
  241. be sent at once.
  242.  
  243. File Name      Required - Name of an ASCII, PCX or DCX file to be
  244.                          added to the Queue of files.  May
  245.                          contain a drive and/or directory
  246.                          qualifier.
  247.  
  248. File Type      Optional - Specifies whether File Name is an
  249.                          ASCII, PCX or DCX type file.  
  250.  
  251.                Valid values -  ASCIIFile (0),
  252.                               PCXFile (1) or 
  253.                               DCXFile (2).
  254.  
  255.                Default Value - ASCIIFile
  256.  
  257. NOTE: Some CAS managers support Values between 16 and 31 to
  258.      specify files with embedded printer controls (i.e. Epson or
  259.      PCL).  There are no equates for these values, but they are
  260.      legal if the CAS manager supports them.
  261.  
  262. Text Size      Optional - Specify whether the file is Column80
  263.                          (80) or Column132 (132) columns wide. 
  264.                          This only affects ASCIIFiles.
  265.  
  266.                Default Value - Column80 (80 Columns)
  267.  
  268. Page Length    Optional - Specify the length of the page in 1/8
  269.                          inch increments.
  270.  
  271.                Valid values -  FormFeed (-1) ASCII Pages end with
  272.                               Form feed only
  273.  
  274.                               Page11 (0) Standard 11 Inch page
  275.                               length
  276.  
  277.                               1-127 User defined length
  278.  
  279.                Default value - Page11 Standard 11 Inch page.
  280.  
  281. Page Increments     Optional - If page length is in the value of
  282.                     1-127 this value specifies the number of
  283.                     additional 1/8 inch increments in page
  284.                     length.
  285.  
  286.                     Default Value - 0
  287.  
  288. Return Data Type:   SHORT
  289.  
  290. Return Values:      TRUE (0) - Success
  291.                     < 0 - Clarion errorcode() - 700
  292.  
  293. Example:
  294.           FromName = 'Todd Carlson'
  295.           ToName = 'C3 Development, Inc.'
  296.           LogoFile = 'C:\FAX\C3LOGO.PCX'
  297.           x# = FAXQCreate( FromName, ToName, LogoFile )
  298.  
  299.           IF FAXQFile( 'REPORT.FAX' ) < 0
  300.                ErrorMessage
  301.           END
  302.           IF FAXQFile( 'EXAMPLE.PCX', PCXFile, , Page11, 0 ) < 0
  303.                ErrorMessage
  304.           END
  305.  
  306. See Also:      FAXQCreate, FAXQSubmit, FAXQRemove
  307.  
  308. FAXQRemove( )                         (remove File from Queue)
  309.  
  310.  
  311.                      FAXQRemove( File Name )
  312.  
  313. The FAXQRemove function removes a file that was added with
  314. FAXQFile from the FAX Queue.  It is only valid before a
  315. FAXQSubmit.
  316.  
  317. File Name      Required - Name of the file to remove from the
  318.                          Queue.  Must be specified EXACTLY as it
  319.                          was in the FAXQFile.
  320.  
  321. Return Data Type:   SHORT
  322.  
  323. Return Value:  TRUE (1) - Success
  324.                < 0 - Clarion errorcode() + 700
  325.  
  326. Example:
  327.  
  328.      IF FAXQFile( 'REPORT.FAX' ) < 0
  329.           IF ErrorAction()
  330.                IF FAXQRemove( 'REPORT.FAX' ) < 0
  331.                     STOP( 'Error Removing File' )
  332.                END
  333.           END
  334.      END
  335.           
  336. See Also: FAXQFile
  337.  
  338. FAXQSubmit( )                                  (submit FAX Queue)
  339.  
  340.  
  341.                      FAXQSubmit( File Name,
  342.                                   Phone Number,
  343.                                   <Header Flag> )
  344.  
  345. The FAXQSubmit function submits all files currently queued to the
  346. CAS manager for sending.  Only valid after a FAXQCreate and at
  347. least one FAXQFile.
  348.  
  349. File Name      Required - Name of non-existent file to be used as
  350.                          a temporary CAS file.
  351.  
  352. Phone Number   Required - FAX Phone number to send the queued
  353.                          files to.
  354.  
  355. Header Flag    Optional - Toggle page headers on and off.
  356.  
  357.                Valid Values - TRUE (1) Send page headers.
  358.  
  359.                              FALSE (0) Do not send page headers.
  360.  
  361.                Default Value - TRUE Send page headers.
  362.  
  363. Return Data Type:   SHORT
  364.  
  365. Return Value:       > 0 - Success, event handle for event just
  366.                     submitted.
  367.  
  368.                     < 0 - Error, -1 to -700 CAS Error code, -700
  369.                     down Clarion errorcode() (-700).
  370.  
  371. Example:
  372.           FromName = 'Todd Carlson'
  373.           ToName = 'C3 Development, Inc.'
  374.           LogoFile = 'C:\FAX\C3LOGO.PCX'
  375.           x# = FAXQCreate( FromName, ToName, LogoFile )
  376.           IF FAXQFile( 'REPORT.FAX' ) < 0
  377.                ErrorMessage
  378.           END
  379.           IF FAXQFile( 'EXAMPLE.PCX', PCXFile, , Page11, 0 ) < 0
  380.                ErrorMessage
  381.           END
  382.           IF FAXQSubmit( 'TEMP.$$$', '1-414-275-5349', TRUE ) < 0
  383.                ErrorMessage
  384.           END
  385.  
  386. See Also: FAXQFile, FAXQCreate, FAXQRemove
  387.  
  388. FAXCurrentEvent( )              (report status of Current Event)
  389.  
  390.  
  391.                  FAXCurrentEvent( Status Group )
  392.  
  393. The FAXCurrentEvent fills the status group with information
  394. pertaining to the currently executing event.
  395.  
  396. Status Group   Required - Group  in which to place status
  397.                information.  Must follow the group format
  398.                specified in appendix A.
  399.  
  400. Return Data Type:   SHORT
  401.  
  402. Return Values: > 0 Event handle for current event.
  403.                < 0 CAS Error
  404.  
  405. Example:
  406.  
  407.      Event = FAXCurrentEvent( G_Control )
  408.      IF gct:EventType = 1
  409.           type( 'Currently Sending to :' & gct:PhoneNum  )
  410.      END
  411.  
  412. See Also: FAXAbortEvent
  413.  
  414. FAXAbortCEvent( )                         (abort Current Event)
  415.  
  416.  
  417.                         FAXAbortCEvent( )
  418.  
  419. The FAXAbortCEvent function aborts the currently executing
  420. event.  
  421.  
  422. Note: Terminating an event is not instantaneous.  It might take
  423. up to 30 seconds.
  424.  
  425. Return Data Type:   LONG
  426.  
  427. Return Values:      > 0 Event handle for cancelled event.
  428.                     < 0 CAS Error.
  429.  
  430. Example:
  431.  
  432.      Event = FAXAbortCEvent( )
  433.      IF Event < 0
  434.           type( 'Could not abort event.  Error:' & |
  435.                  CvtNum2Hex( abs( Event ) ) )
  436.      END
  437.  
  438. See Also: FAXCurrentEvent
  439.  
  440. FAXSetRes( )                          (set resolution of file)
  441.  
  442.  
  443.                    FAXSetRes( FAX Resolution )
  444.  
  445. The FAXSetRes function sets the resolution of either a
  446. FAXSendOneFile or the current file in a FAXQFile.
  447.  
  448. FAX Resolution      200 x 200 Hi-Resolution HiRes (0)
  449.                     100 x 200 Standard Resolution StandardRes (1)
  450.  
  451.                     Default Value - HiRes (0)
  452.  
  453. Return Data Type:   BYTE
  454.  
  455. Return Values:      0 Error Setting FAX Resolution, Reset to
  456.                       DEFAULT (HiRes)
  457.                     1 FAX Resolution set to specified value
  458.  
  459. Example:
  460.  
  461.      IF ~FAXSetRes( StandardRes )
  462.           type( 'Could not set resolution.  Sending as Hi-Res. )
  463.      END
  464.  
  465.  
  466. FAXSetSize( )                                 (set page width)
  467.  
  468.  
  469.                      FAXSetSize( Text Size )
  470.  
  471. The FAXSetSize function sets the page width of either a
  472. FAXSendOneFile or the current file in a FAXQFile.
  473.  
  474. NOTE: Only applicable to ASCIIFile(s).
  475.  
  476. Text Size      Specify whether the file is Column80 (0) (80
  477.                Columns) or Column132 (1) (132 Columns) columns
  478.                wide.  This only affects ASCIIFile(s).
  479.  
  480.                Default Value - Column80 (0)
  481.  
  482. Return Data Type:   BYTE
  483.  
  484. Return Values:      0 Error Setting FAX Size, Reset to DEFAULT
  485.                     Column80)
  486.                     1 FAX Size set to specified value
  487.  
  488. Example:
  489.  
  490.      IF ~FAXSetSize( Column132 )
  491.           type( 'Could not set size.  Sending as 80 column. )
  492.      END
  493.  
  494.  
  495. FAXSetEvent( )                      (set event date and time)
  496.  
  497.  
  498.                    FAXSetEvent( <Event Date> 
  499.                                  <Event Time> )
  500.  
  501. The FAXSetEvent function sets the execution date and time (send
  502. date and time) of either a FAXSendOneFile or the queue of file(s)
  503. in a FAXQSubmit.
  504.  
  505.  
  506. Event Date     Optional - Clarion Date (LONG) for event to occur.
  507.  
  508.                Default Value - Today()
  509.  
  510. Event Time     Optional - Clarion time (LONG) for event to occur.
  511.  
  512.                Default Value - Clock()
  513.  
  514. Return Data Type:   BYTE
  515.  
  516. Return Values:      Always One (1) in this implementation.
  517.  
  518. Example:
  519.  
  520.      ! Send today at 11:01 pm (after rates drop)
  521.      x# = FAXSetEvent( Today(), deformat( '23:01', @T1 ) )
  522.  
  523.  
  524. FAXSetCvrPage( )                                (set cover page)
  525.  
  526.  
  527.                     FAXSetEvent( Cover Flag 
  528.                                   <Cover Text> )
  529.  
  530. The FAXSetCvrPage function turns the cover page on or off and
  531. places up to 36 lines of 80 characters as the cover page text.
  532.  
  533. Cover Flag     Required - TRUE Send cover page.
  534.                           FALSE Do not send cover page.
  535.  
  536.                Default Value - FALSE Do not Send cover page.
  537.  
  538. Cover Text     Optional - Group of no more that 36 lines of 80
  539.                          characters each, to be sent as text on
  540.                          the cover page.
  541.  
  542. NOTE: 36 Lines of 80 Characters each is the maximum size of the
  543.      cover page that Intel recommends.
  544.  
  545.                Default Value - FALSE (No cover page sent)
  546.  
  547. Return Data Type:   BYTE
  548.  
  549. Return Values:      0 - requested status not set.
  550.                     1 - requested status set.
  551.  
  552. Example:
  553.  
  554.      cvr:CvrLine[1] = ' From: Todd Carlson'
  555.      cvr:CvrLine[2] = ' Subject: Weekly sales report'
  556.      cvr:CvrLine[3] = ''
  557.      cvr:CvrLine[4] = ' Let me know if you have any questions.'
  558.      IF ~FAXSetCvrPage( TRUE, G_Cover )
  559.           type( 'Cover Page not Set, Sending without Cover.' )
  560.      END
  561.  
  562. FAXSendOneFile( )                 (send a single file as a FAX)
  563.  
  564.  
  565.                    FAXSendOneFile( File Name 
  566.                                     Phone Number 
  567.                                     <Receiver Name> )
  568.  
  569. The FAXSendOneFile function sends a single file as a FAX.  It
  570. provides a quick, easy method of sending information through the
  571. FAX.
  572.  
  573. File Name      Required - File Name to send as a FAX.
  574.  
  575. NOTE: The file sent using this function must be in ASCII, PCX, or
  576.       DCX format.
  577.  
  578. Phone Number   Required - FAX Phone number for where to send the
  579.                          queued files.
  580.  
  581. Receiver Name  Optional - a string value to appear in the TO:
  582.                          field of the FAX.
  583.  
  584.                Default Value - Blank
  585.  
  586. Return Data Type:   SHORT
  587.  
  588. Return Value:       > 0 - Success, event handle for event just
  589.                     submitted.
  590.  
  591.                     < 0 - Error, -1 to -700 CAS Error code, -700
  592.                     down Clarion errorcode() - 700.
  593.  
  594. Example:
  595.  
  596.      Event = FAXSendOneFile( 'C:\C3FAX\SAMPLE.TXT', | 
  597.                '1-414-275-5349', 'Todd Carlson' )
  598.      IF Event < 0
  599.           TYPE( 'FAX Not submitted. Error: ' & CvtNum2Hex( abs( |
  600.                Event ) ) )
  601.      ELSE
  602.           TYPE( 'FAX Submitted Successfully' )
  603.      END
  604.  
  605. See Also: FAXSetCvrPge, FAXSetEvent, FAXSetSize, FAXSetRes
  606.  
  607. FAXFindFirst( )            (find first entry in a task queue)
  608.  
  609.  
  610.                    FAXFindFirst( <FAX Status>
  611.                                   <Direction>
  612.                                   <Task Queue> )
  613.  
  614. The FAXFindFirst function searches the queue you specify in Task
  615. Queue for an event whose status matches the one you specify in
  616. FAX Status.  Entries in queues are ordered by the date and time
  617. in which the corresponding events occurred or are scheduled to
  618. occur.  Depending on the value you specify in Direction, the
  619. function searches for the earliest or latest such event.
  620.  
  621. Once you use this function to obtain an event handle, you can
  622. access the file associated with that event by calling the FAXOpen
  623. function.
  624.  
  625. Use the FAXFindNext function to find subsequent entries in the
  626. queue.
  627.  
  628. FAX Status     Optional - Status of event to find.  
  629.  
  630.                Valid Status:
  631.  
  632.                EvntComplete (0) - Event has successfully
  633.                                   completed.
  634.                EvntWait     (1) - Event is waiting to be
  635.                                   processed.
  636.                EvntInProg   (2) - Number dialed or event in
  637.                                   progress.
  638.                EvntSend     (3) - Connection has been made --
  639.                                   sending.
  640.                EvntRecv     (4) - Connection has been made --
  641.                                   receiving.
  642.                EvntAbort    (5) - Event was aborted.
  643.  
  644.                EvntAny     (-1) - Chooses an event without regard
  645.                                   to status.  This value will
  646.                                   probably be used most often.
  647.  
  648.                Other negative values - Matches error codes in
  649.                                      Control File.
  650.  
  651.                Default Value - EvntAny
  652.  
  653.  
  654.  
  655.  
  656.  
  657. Direction      Optional - Direction to search for event, forward
  658.                (Oldest first) or backward (Newest first).
  659.  
  660.                Valid Directions:
  661.  
  662.                SearchFwd (0) - Search forward chronologically
  663.                                (from the first occurring event to
  664.                                the last occurring event).
  665.                SearchBak (1) - Search backward chronologically
  666.                                (from the last occurring event to
  667.                                the first occurring event).
  668.  
  669.                Default Value - SearchFwd
  670.  
  671. Task Queue     Optional - Queue to search.  Valid Queues:
  672.                TaskQueue (0) - Find first Control File in Task
  673.                                Queue.
  674.                RecvQueue (1) - Find first Control File in Receive
  675.                                Queue.
  676.                LogQueue  (2) - Find first Control File in Log
  677.                                Queue. (Send Queue)
  678.  
  679.                Default Value - TaskQueue
  680.  
  681. Return Data Type:   SHORT
  682.  
  683. Return Value:       > 0 - Success, event handle for event just
  684.                     found.
  685.  
  686.                     < 0 - Error, CAS Error code.
  687.  
  688. Example:
  689.  
  690.      Event = FAXFindFirst( )
  691.      IF Event < 0
  692.           TYPE( 'Error Finding FAX Event: ' & CvtNum2Hex( abs( |
  693.                Event ) ) )
  694.      END
  695.  
  696. See Also: FAXFindNext, FAXOpen, FAXRead, FAXGetEventD,
  697.           FAXSetEventD, FAXGetEventT, FAXSetEventT
  698.  
  699. FAXFindNext( )                (find next entry in a task queue)
  700.  
  701.  
  702.                    FAXFindNext( <Task Queue> )
  703.  
  704. After a call to the FAXFindFirst function, you can step
  705. chronologically through a queue using the FAXFindNext.  Each
  706. subsequent call to Find Next Entry in Queue returns the event
  707. handle of the next event chronologically (as set by FAXFindFirst)
  708. in the specified Queue.  For example, if you set the FAXFindFirst
  709. function to search forward chronologically, the FAXFindNext
  710. function searches forward for the next entry that matches the
  711. specifications set with FAXFindFirst.  If you set FAXFindFirst to
  712. search backwards chronologically, FAXFindNext searches backwards.
  713.  
  714. You must invoke the FAXFindFirst function prior to using the
  715. FAXFindNext function.  Once you use this function to obtain an
  716. event handle, you can access the file associated with that event
  717. by calling the FAXOpen function.
  718.  
  719. Task Queue     Optional - Queue to search.
  720.  
  721.                Valid Queues:
  722.  
  723.                TaskQueue (0) - Find first Control File in Task
  724.                                Queue.
  725.                RecvQueue (1) - Find first Control File in
  726.                                Receive Queue.
  727.                LogQueue  (2) - Find first Control File in Log
  728.                                Queue. (Send Queue)
  729.  
  730.                Default Value - TaskQueue
  731.  
  732. Return Data Type:   SHORT
  733.  
  734. Return Value:       > 0 - Success, event handle for event just
  735.                     found.
  736.  
  737.                     < 0 - Error, CAS Error code.
  738.  
  739. Example:
  740.  
  741.      Event = FAXFindNext( )
  742.      IF Event < 0
  743.           TYPE( 'Error Finding Next FAX Event: ' & |
  744.                 CvtNum2Hex( abs( Event ) ) )
  745.      END
  746.  
  747. See Also: FAXFindFirst, FAXOpen, FAXRead, FAXGetEventD,
  748.           FAXSetEventD, FAXGetEventT, FAXSetEventT
  749. FAXOpen( )                      (opens a FAX event for reading)
  750.  
  751.  
  752.                      FAXOpen( <Event Handle>
  753.                               <Task Queue>
  754.                               <Receive File Number> )
  755.  
  756. After you obtain an event handle either by scanning a Queue using
  757. the FAXFindFirst and FAXFindNext functions or by creating an
  758. event using the FAXQSubmit function, you can use the FAXOpen
  759. function to access the DOS file corresponding to the event.  For
  760. events in the Task and Log Queues, this function opens the
  761. Control File for the event.  For events in the Receive Queue,
  762. this function opens either the Control File or one of the
  763. received data files.
  764.  
  765. This function opens the desired file in read-only mode and
  766. returns an ordinary DOS file handle.  The application should use
  767. the normal DOS function (3EH) of FAXClose to close that handle
  768. when it is finished with it.
  769.  
  770. Event Handle   Required - Valid Event handle to open.
  771.  
  772. Task Queue     Optional - Queue to search.
  773.  
  774.                Valid Queues:
  775.  
  776.                TaskQueue (0) - Find first Control File in Task
  777.                                Queue.
  778.                RecvQueue  (1) - Find first Control File in
  779.                                Receive Queue.
  780.                LogQueue  (2) - Find first Control File in Log
  781.                                Queue. (Send Queue)
  782.  
  783.                Default Value - TaskQueue
  784.  
  785. Receive File Number Optional - This file number specifies which
  786.                               file to open among those associated
  787.                               with a receive event.  This number
  788.                               applies only to events in the
  789.                               Receive Queue and is ignored for
  790.                               events in the Task and Log Queues.
  791.                               The number is interpreted as
  792.                               follows:
  793.  
  794.                     0  -  The Control File. The format of this
  795.                           file is described earlier in this
  796.                           document.
  797.                     1  -  First received file. Corresponds to the
  798.                           first file in the list of received
  799.                           file names (file transfer record 0).
  800.                     2  -  Second received file.
  801.                     3  -  Third received file.
  802.                     n  -  nth received file.
  803.  
  804. Default Value:  0 - The Control File.
  805.  
  806. Return Data Type:   LONG
  807.  
  808. Return Value:       > 0 - Success, file handle for DOS file just
  809.                     opened.
  810.  
  811.                     < 0 - Error, CAS Error code.
  812.  
  813. Example:
  814.  
  815.      Event = FAXFindNext( )
  816.      IF Event < 0
  817.           TYPE( 'Error Finding Next FAX Event: ' & |
  818.                 CvtNum2Hex( abs( Event ) ) )
  819.      END
  820.      FileHand = FAXOpen( Event )
  821.      IF FileHand < 0
  822.           TYPE( 'Error Opening FAX Event: ' & |
  823.                 CvtNum2Hex( abs( FileHand ) ) )
  824.      END
  825.  
  826. See Also: FAXFindFirst, FAXFindNext, FAXRead, FAXGetEventD,
  827.           FAXSetEventD, FAXGetEventT, FAXSetEventT, FAXQSubmit
  828.  
  829. FAXRead( )                             (read a FAX event file)
  830.  
  831.  
  832.                      FAXRead( <File Handle>
  833.                                <Destination>
  834.                                <Byte Count> )
  835.  
  836. After you open a FAX Event using FAXOpen, the FAXRead function
  837. allows you to read the information contained in the control file.
  838.  
  839. File Handle    Required - Valid File handle obtained with
  840.                          FAXOpen.
  841.  
  842. Destination    Required - String variable in which to place the
  843.                          read information in.
  844.  
  845. Byte Count     Optional - The number of bytes to read into
  846.                          Destination.
  847.  
  848. Default Value: SIZE( Destination )
  849.  
  850. NOTE: If the Byte Count is greater than SIZE( Destination ), Byte
  851.       Count will be reset to SIZE( Destination ).  The
  852.       information read will conform to the specification laid out
  853.       in appendix A.
  854.  
  855.  
  856. Return Data Type:   uLONG
  857.  
  858. Return Value:       Number of bytes actually read.
  859.  
  860. Example:
  861.  
  862.      Event = FAXFindNext( )
  863.      IF Event < 0
  864.           TYPE( 'Error Finding Next FAX Event: ' & |
  865.                 CvtNum2Hex( abs( Event ) ) )
  866.      END
  867.      FileHand = FAXOpen( Event )
  868.      IF FileHand < 0
  869.           TYPE( 'Error Opening FAX Event: ' & |
  870.                 CvtNum2Hex( abs( FileHand ) ) )
  871.      END
  872.      Bytes# = FAXRead( FileHand, FAXBuff )
  873.      TYPE( 'Event Status: ' & sub( FAXBuff, 3, 1 ) )
  874.  
  875. See Also: FAXOpen, FAXClose
  876.  
  877. FAXClose( )                            (close a FAX event file)
  878.  
  879.  
  880.                     FAXClose( <File Handle> )
  881.  
  882. The FAXClose function closes a file opend with FAXOpen.
  883.  
  884. File Handle    Required - Valid File handle obtained with
  885.                FAXOpen.
  886.  
  887. Return Data Type:   uLONG
  888.  
  889. Return Value:       0 - Success.
  890.                     Other - DOS Errorcode.
  891.  
  892. Example:
  893.  
  894.      Event = FAXFindNext( )
  895.      IF Event < 0
  896.           TYPE( 'Error Finding Next FAX Event: ' & |
  897.                 CvtNum2Hex( abs( Event ) ) )
  898.      END
  899.      FileHand = FAXOpen( Event )
  900.      IF FileHand < 0
  901.           TYPE( 'Error Opening FAX Event: ' & |
  902.                 CvtNum2Hex( abs( FileHand ) ) )
  903.      END
  904.      Bytes# = FAXRead( FileHand, FAXBuff )
  905.      TYPE( 'Event Status: ' & sub( FAXBuff, 3, 1 ) )
  906.      Close# = FAXClose( FileHand )
  907.      If ~Close# = 0
  908.           Do ErrMsg
  909.      .
  910.  
  911. See Also: FAXOpen
  912.  
  913. FAXDeleteOne( )                 (delete a FILE from event Queue)
  914.  
  915.  
  916.                    FAXDeleteOne( Event Handle
  917.                                  <Task Queu> 
  918.                                  <Receive File Number> )
  919.  
  920. The FAXDeleteOne() function deletes one or more files in a
  921. specific Queue.
  922.  
  923. Note: The delete files flag (gct:Delete_Flag) in the G_Control
  924. group for an event can cause the Resident Manager to
  925. automatically delete all the files associated with the event
  926. after the event has been successfully completed (flag set to 1)
  927. or after the event has been attempted (flag set to 2).
  928.  
  929. Event Handle   Required - Event handle.
  930.  
  931. Task Queue     Optional - Task Queue to access.  Interpreted as
  932.                          follows:
  933.  
  934.                TaskQueue (0) - Delete Control File in Task
  935.                                Queue and corresponding Group
  936.                                File, if it exists.
  937.                RecvQueue (1) - Delete a file or files
  938.                                associated with an event in the
  939.                                Receive Queue.
  940.                LogQueue  (2) - Delete Control File in Log Queue
  941.                                and corresponding Group Log File
  942.                                if it exists.
  943.  
  944.                Default Value - TaskQueue (0)
  945.  
  946. Receive File Number Optional - This number specifies which file
  947.                                to delete among those associated
  948.                                with a receive event.  This number
  949.                                applies only to events in the
  950.                                Receive Queue and is ignored for
  951.                                events in the Task and Log Queues. 
  952.                                The number is interpreted as
  953.                                follows:
  954.  
  955.                0 - Delete all files associated with the specified
  956.                    Control File (including the Control File).
  957.                1 - Delete the first received file associated with
  958.                    the event handle.
  959.                2 - Delete the second received file associated
  960.                    with the event handle.
  961.                n - Delete the nth received file associated with
  962.                    the event handle.
  963.  
  964.                Default Value - 0 - Delete all files.
  965.  
  966.  
  967. Return Data Type:   LONG
  968.  
  969. Return Value:       0 - Success.
  970.                     < 0 - CAS Errorcode.
  971.  
  972. Example:
  973.  
  974.      Event = FAXFindNext( )
  975.      IF Event < 0
  976.           TYPE( 'Error Finding Next FAX Event: ' & |
  977.                 CvtNum2Hex( abs( Event ) ) )
  978.      END
  979.      FileHand = FAXOpen( Event )
  980.      IF FileHand < 0
  981.           TYPE( 'Error Opening FAX Event: ' & |
  982.                 CvtNum2Hex( abs( FileHand ) ) )
  983.      END
  984.      Bytes# = FAXRead( FileHand, FAXBuff )
  985.      TYPE( 'Event Status: ' & sub( FAXBuff, 3, 1 ) )
  986.      Close# = FAXClose( FileHand )
  987.      If ~Close# = 0
  988.           Do ErrMsg
  989.      .
  990.      Status# = FAXDeleteOne( Event, TaskQueue, 0 )
  991.      If Status# < 0
  992.           Do ErrMsg
  993.      .
  994.  
  995. See Also: FAXDeleteAll
  996.  
  997. FAXDeleteAll( )      (delete ALL CONTROL FILES from event Queue)
  998.  
  999.  
  1000.                    FAXDeleteAll( Task Queue )
  1001.  
  1002. The FAXDeleteAll() function deletes ALL control files in a
  1003. specific Queue.
  1004.  
  1005. Task Queue     Required - Task Queue to delete from.  Interpreted
  1006.                           as follows:
  1007.  
  1008.                TaskQueue (0) - Delete all Control Files in the
  1009.                                Task Queue, including all Group
  1010.                                Files.
  1011.                RecvQueue (1) - Delete all Control Files in the 
  1012.                                Receive Queue and all received
  1013.                                files.
  1014.                LogQueue  (2) - Delete all Control Files in the
  1015.                                Log Queue, including all Group
  1016.                                Files.
  1017.  
  1018. Return Data Type:   LONG
  1019.  
  1020. Return Value:       0 - Success.
  1021.                     < 0 - CAS Errorcode.
  1022.  
  1023. Example:
  1024.  
  1025.      Status# = FAXDeleteAll( TaskQueue )
  1026.      If Status# < 0
  1027.           Do ErrMsg
  1028.      END
  1029.  
  1030. See Also: FAXDeleteOne
  1031.  
  1032. FAXGetEventD( )                       (get event execution date)
  1033.  
  1034.  
  1035.                    FAXGetEventD( Event Handle
  1036.                                  <Task Queue> )
  1037.  
  1038. The FAXGetEventD() function gets the date associated with a given
  1039. event handle.
  1040.  
  1041. Event Handle   Required - Event handle of the event whose date
  1042.                           you want to obtain.  Obtained with
  1043.                           FAXFind???, or returned by
  1044.                           FAXSubmitQueue/FAXSendOneFile.
  1045.  
  1046. Task Queue     Optional - Task Queue to find event in. 
  1047.                           interpreted as follows:
  1048.  
  1049.                TaskQueue (0) - Search Control Files in the
  1050.                                Task Queue.
  1051.                RecvQueue (1) - Search Control Files in the
  1052.                                Receive Queue.
  1053.                LogQueue  (2) - Search Control Files in the Log
  1054.                                Queue.
  1055.  
  1056.                Default Value - TaskQueue
  1057.  
  1058. Return Data Type:   uLONG
  1059.  
  1060. Return Value:       Clarion DATE (LONG)
  1061.  
  1062. Example:
  1063.  
  1064.      Event = FAXFindNext( )
  1065.      IF Event < 0
  1066.           TYPE( 'Error Finding Next FAX Event: ' & |
  1067.                 CvtNum2Hex( abs( Event ) ) )
  1068.      END
  1069.      Date# = FAXGetEventD( Event, TaskQueue )
  1070.      Type( 'Event Date: ' & format( Date#, @d1 ) )
  1071.  
  1072. See Also: FAXSetEventD, FAXGetEventT
  1073.  
  1074. FAXSetEventD( )                       (set event execution date)
  1075.  
  1076.  
  1077.                    FAXSetEventD( Event Handle
  1078.                                  <Event Date> )
  1079.  
  1080. The FAXGetEventD() function gets the date associated with a given
  1081. event handle.
  1082.  
  1083. This function is valid only for events that the local computer
  1084. initiates.
  1085.  
  1086. Note:  Setting the date for an event to a value that is earlier
  1087.        than the current date causes the transmission to occur
  1088.        immediately.
  1089.  
  1090. Event Handle   Required - Event handle of the event whose date
  1091.                           you want to set.  Obtained with
  1092.                           FAXFind???, or returned by
  1093.                           FAXSubmitQueue/FAXSendOneFile.
  1094.  
  1095. Event Date     Optional - Date for event to occurr.
  1096.  
  1097.                Default Value - 00/00/0000 (Today)
  1098.  
  1099. Return Data Type:   LONG
  1100.  
  1101. Return Value:       0 - Success.
  1102.                     < 0 - CAS Errorcode.
  1103.  
  1104. Example:
  1105.  
  1106.      Event = FAXFindNext( )
  1107.      IF Event < 0
  1108.           TYPE( 'Error Finding Next FAX Event: ' & |
  1109.                 CvtNum2Hex( abs( Event ) ) )
  1110.      END
  1111.      Date# = FAXGetEventD( Event, TaskQueue )
  1112.      Type( 'Event Date: ' & format( Date#, @d1 ) )
  1113.      IF Date# <> Today()
  1114.           Result# = FAXSetEventD( Event, Today() )
  1115.      END
  1116.  
  1117. See Also: FAXGetEventD, FAXSetEventT
  1118.  
  1119. FAXGetEventT( )                       (get event execution time)
  1120.  
  1121.  
  1122.                    FAXGetEventT( Event Handle
  1123.                                   <Task Queue> )
  1124.  
  1125. The FAXGetEventT() function gets the time associated with a given
  1126. event handle.
  1127.  
  1128. Event Handle   Required - Event handle of the event whose time
  1129.                you want to obtain.  Obtained with FAXFind??? or
  1130.                returned by FAXSubmitQueue/FAXSendOneFile.
  1131.  
  1132. Task Queue     Optional - Task Queue in which to find event.
  1133.                           Interpreted as follows:
  1134.  
  1135.                TaskQueue (0) - Search Control Files in the
  1136.                                Task Queue.
  1137.                RecvQueue (1) - Search Control Files in the
  1138.                                Receive Queue.
  1139.                LogQueue  (2) - Search Control Files in the Log
  1140.                                Queue.
  1141.  
  1142.                Default Value - TaskQueue
  1143.  
  1144. Return Data Type:   uLONG
  1145.  
  1146. Return Value:       Clarion TIME (LONG)
  1147.  
  1148. Example:
  1149.  
  1150.      Event = FAXFindNext( )
  1151.      IF Event < 0
  1152.           TYPE( 'Error Finding Next FAX Event: ' & |
  1153.                 CvtNum2Hex( abs( Event ) ) )
  1154.      END
  1155.      Time# = FAXGetEventT( Event, TaskQueue )
  1156.      Type( 'Event Date: ' & format( Time#, @t1 ) )
  1157.  
  1158. See Also: FAXSetEventT, FAXGetEventD
  1159.  
  1160. FAXSetEventT( )                       (set event execution time)
  1161.  
  1162.  
  1163.                    FAXSetEventT( Event Handle
  1164.                                  <Event Time> )
  1165.  
  1166. The FAXSetEventT() function sets the time associated with a given
  1167. event handle.
  1168.  
  1169. This function is valid only for events that the local computer
  1170. initiates.
  1171.  
  1172. This function is valid only for events in the Task Queue, not for
  1173. events in the Receive or Log Queues.
  1174.  
  1175. Note:     Setting the time for a event to a value that makes the
  1176.           date and time earlier than the current date and time
  1177.           causes the transmission to occur immediately.  Setting
  1178.           the time to zero selects 12:00 AM.
  1179.  
  1180. Event Handle   Required - Event handle of the event whose date
  1181.                you want to set.  Obtained with FAXFind??? or
  1182.                returned by FAXSubmitQueue/FAXSendOneFile.
  1183.  
  1184. Event Date     Optional - Time for event to occur.
  1185.  
  1186.                Default Value - 12:00AM
  1187.  
  1188. Return Data Type:   LONG
  1189.  
  1190. Return Value:       0 - Success.
  1191.                     < 0 - CAS Errorcode.
  1192.  
  1193. Example:
  1194.  
  1195.      Event = FAXFindNext( )
  1196.      IF Event < 0
  1197.           TYPE( 'Error Finding Next FAX Event: ' & |
  1198.                 CvtNum2Hex( abs( Event ) ) )
  1199.      END
  1200.      Date# = FAXGetEventD( Event, TaskQueue )
  1201.      Type( 'Event Date: ' & format( Date#, @d1 ) )
  1202.      IF Date# <> Today()
  1203.           Result# = FAXSetEventT( Event, Clock() )
  1204.      END
  1205.  
  1206. See Also: FAXGetEventT, FAXSetEventD
  1207.  
  1208. FAXGetEDB( )                            (get external data block)
  1209.  
  1210.  
  1211.                      FAXGetEDB( EDB Group )
  1212.  
  1213. The FAXGetEDB() returns the information contained in the external
  1214. data block.  The External Data Block contains additional
  1215. information about the current Resident Manager installation such
  1216. as the name of the default logo file.
  1217.  
  1218. EDB Group      Required - Group in which to place information.
  1219.  
  1220. Group Structure:
  1221.  
  1222. G_EDB     Group,pre(edb)
  1223. CASMajorV   byte         !CAS Manager Major Version
  1224.  
  1225. CASMinorV   byte         !CAS Manager Minor Version
  1226.  
  1227. MngrDir     cSTRING(68)  !String specifying the pathname
  1228.                          !of the directory containing Resident
  1229.                          !Manager configuration files and other
  1230.                          !software that implements CAS.  The path
  1231.                          !ends with a backslash. The user
  1232.                          !specifies this name when installing the
  1233.                          !software.
  1234.  
  1235. PhoneBook   cSTRING(13)  !Name of default phonebook file.  This
  1236.                          !file is assumed to be in the Resident
  1237.                          !Manager and software directory.
  1238.  
  1239. LogoFile    cSTRING(13)  !Name of default logo file.  This file
  1240.                          !is assumed to be in the Resident
  1241.                          !Manager and software directory.  The
  1242.                          !user specifies this name when
  1243.                          !installing the software.
  1244.  
  1245. SenderName  cSTRING(32)  !Default sender name.  The user
  1246.                          !specifies this name when installing the
  1247.                          !software.
  1248.  
  1249. CSID        cSTRING(21)  !CSID (the CCITT identification of the
  1250.                          !fax device).
  1251.  
  1252. Reserved    byte,dim(107)  !Reserved.
  1253.           .
  1254.  
  1255.  
  1256. Return Data Type:   LONG
  1257.  
  1258. Return Value:       0 - Success.
  1259.                     < 0 - CAS Errorcode.
  1260.  
  1261. Example:
  1262.  
  1263.      Result# = FAXGetEDB( G_EDB )
  1264.      IF Result# < 0
  1265.           DO ErrMsg
  1266.      ELSE
  1267.           TYPE( 'FAX CITT Identifier: ' & edb:CSID )
  1268.      END
  1269.  
  1270. FAXRecState( )                          (get/set receive state)
  1271.  
  1272.  
  1273.                       FAXRecState( Get_Set
  1274.                                    <Ring Count> )
  1275.  
  1276. The FAXRecState() examines or alters the receive state of the
  1277. hardware.  If an event is in progress, the new autoreceive state
  1278. will not take effect until the event is completed.
  1279.  
  1280. Get_Set        Required - Parameter specifying whether to get or
  1281.                set the receive state.
  1282.  
  1283.                Valid values - GetState (0) Get Receive State.
  1284.                               SetState (1) Set Receive State.
  1285.  
  1286. Ring count     Optional - Required only if SetState is selected. 
  1287.                           Specifies the number of rings on which
  1288.                           the FAX Hardware should answer.
  1289.  
  1290.                Default Value - 0 - Turn off Auto Answer
  1291.  
  1292. Return Data Type:   LONG
  1293.  
  1294. Return Value:       GetState - Number of rings on which FAX will
  1295.                                answer.
  1296.  
  1297.                     SetState - 0 - Success.
  1298.                                < 0 - CAS Errorcode.
  1299.  
  1300. Example:
  1301.  
  1302.      Rings = FAXRecState( GetState, )
  1303.      IF Rings > 0
  1304.           TYPE( 'FAX Set to answer on ring: ' & Rings )
  1305.      ELSE
  1306.           Rings = FAXRecState( SetState, 1 )
  1307.           IF Rings = 0
  1308.                TYPE( 'FAX Set to answer on ring: 1' )
  1309.           ELSE
  1310.                TYPE( 'Could not set Answer state.' )
  1311.           END
  1312.      END
  1313.  
  1314. FAXQStatus( )                                 (get Queue status)
  1315.  
  1316.  
  1317.                     FAXQStatus( <Task Queue>
  1318.                                 <Return Value> )
  1319.  
  1320. The FAXQStatus() function returns the current status of a queue
  1321. you specify.
  1322.  
  1323. Task Queue     Optional - Task Queue on which to report.
  1324.  
  1325.                This is interpreted as follows:
  1326.  
  1327.                TaskQueue  (0) - Search Control Files in the
  1328.                                 Task Queue.
  1329.                RecvQueue  (1) - Search Control Files in the
  1330.                                 Receive Queue.
  1331.                LogQueue   (2) - Search Control Files in the Log
  1332.                                 Queue.
  1333.                SendEvents (3) - Search for only send events.
  1334.  
  1335.                RecvEvents (4) - Search for only receive events.
  1336.  
  1337.                Default Value - TaskQueue
  1338.  
  1339. Return Value   Optional - Specifies the value you wish to
  1340.                          examine.
  1341.  
  1342.                This is interpreted as follows:
  1343.  
  1344.                Task Queue = TaskQueue, RecvQueue, or LogQueue
  1345.  
  1346.                1 =  Return total number of changes made to this
  1347.                     queue since the Resident Manager was started,
  1348.                     or a negative error code.  If the number of
  1349.                     changes exceeds 7FFFH, the count begins again
  1350.                     at 0.
  1351.                2 =  Return current number of Control Files in
  1352.                     this queue.
  1353.                3 =  Return current number of received files. 
  1354.                     (This register is non-zero only if you
  1355.                     request the status of the Receive Queue by
  1356.                     specifying RecvQueue.)  The value in this
  1357.                     register is incremented for each file
  1358.                     received.
  1359.  
  1360.                Task Queue = SendEvents
  1361.  
  1362.                1 =  Return number of successful sends since the
  1363.                     Resident Manager was started.  Including
  1364.                     events cancelled by the user.
  1365.                2 =  Return number of unsuccessful sends since the
  1366.                     Resident Manager was started.  Including
  1367.                     warnings.
  1368.  
  1369.                Task Queue = RecvEvents
  1370.  
  1371.                1 =  Return number of successful sends since the
  1372.                     Resident Manager was started.  Including
  1373.                     events cancelled by the user.
  1374.                2 =  Return number of unsuccessful sends since the
  1375.                     Resident Manager was started.  Including
  1376.                     warnings.
  1377.  
  1378.                Default Value - 1
  1379.  
  1380. Return Value:  Described above
  1381.  
  1382. Example:
  1383.  
  1384.      Sends = FAXQStatus( SendEvents, 1 )
  1385.      TYPE( 'There have been ' & Sends & |
  1386.            ' successful sends since your computer was started.' )
  1387.  
  1388. FAXGetHwStat( )                            (get Hardware status)
  1389.  
  1390.  
  1391.                  FAXGetHwStat( <Status Group> )
  1392.  
  1393. The FAXGetHwStat() function returns the status of the
  1394. communication hardware.
  1395.  
  1396. Caution:  The values and structure returned by this function are
  1397.           hardware-dependent and will vary according to type of
  1398.           hardware used to implement the CAS services.  It is
  1399.           recommended that you use the FAXCurrentEvent() and
  1400.           FAXQStatus() functions or examine the Control File,
  1401.           instead of using this function.
  1402.  
  1403. Status Group   A group of 128 Bytes whose structure is specified
  1404.                by the Hardware manufacturer.
  1405.  
  1406. Return Value:  0 - Success.
  1407.                < 0 - CAS Errorcode.
  1408.  
  1409.  
  1410. FAXDiags( )                                    (run diagnostics)
  1411.  
  1412.  
  1413.                    FAXDiags( <Start_Report> )
  1414.  
  1415. The FAXDiags() function runs a set of diagnostics or reports on
  1416. their progress.
  1417.  
  1418. Start_Report   Optional - Start or Report diagnostics flag.
  1419.  
  1420.                Valid Values - 0 - Report progress of diagnostics.
  1421.                               1 - Start running diagnostics.
  1422.  
  1423.                Default Value - 0 - Report progress of
  1424.                                    diagnostics.
  1425.  
  1426. Return Data Type:   LONG
  1427.  
  1428. Return Value:  If request was to start running diagnostics (1),
  1429.                the return value contains either a 0 (diagnostics
  1430.                successfully begun) or a negative error code.
  1431.  
  1432.                If request was to report the progress of
  1433.                diagnostics, the return value contains a 40H
  1434.                (diagnostics in process) or some other
  1435.                non-negative number indicating that diagnostics
  1436.                passed.  If the return value contains a negative
  1437.                number, the diagnostics failed and the value
  1438.                indicates the reason for failure.  The values are
  1439.                hardware-dependent.  Contact your communications
  1440.                hardware manufacturer for information on the
  1441.                failure codes.
  1442.  
  1443. Example:
  1444.      IF ~FAXDiags( 1 )
  1445.           Do ErrMsg
  1446.      END
  1447.  
  1448. FAXMoveFile( )                              (move received file)
  1449.  
  1450.  
  1451.                    FAXMoveFile( Event Handle,
  1452.                                 New Name, 
  1453.                                 Receive File Number )
  1454.  
  1455. The FAXMoveFile() function moves a received file to a different
  1456. directory and gives it a new name.  The new directory can be on a
  1457. different device.
  1458.  
  1459. Note:     The path to the new directory must exist.  This
  1460.           function cannot create directories.
  1461.  
  1462. Event Handle   Required - Event handle of the receive event whose
  1463.                file you want to move.  Obtained with FAXFind???.
  1464.  
  1465. New Name       Required - A new path and name of the file.  This
  1466.                file must not exist already.
  1467.  
  1468. Receive File Number Required - This number specifies which file
  1469.                     to move.  The number is interpreted as       
  1470.                     follows:
  1471.  
  1472.                     1 - First received file
  1473.                     2 - Second received file
  1474.                     3 - Third received file
  1475.                     n - nth received file
  1476.  
  1477. Return Data Type:   LONG
  1478.  
  1479. Return Value:       0 - Success.
  1480.                     < 0 - CAS Errorcode.
  1481.  
  1482. Example:
  1483.      Return# = FAXMoveFile( Event, 'C:\RECV.FAX', 1 )
  1484.      IF Return# < 0
  1485.           DO ErrMsg
  1486.      END
  1487.  
  1488. FAXSetCvrStat( )                    (set cover page status flag)
  1489.  
  1490.  
  1491.                    FAXMoveFile( Event Handle,
  1492.                                 <Read Flag> )
  1493.  
  1494. The FAXSetCvrStat() function sets the Cover Page Read flag
  1495. (gct:Cover_Read) in the Control File for the specified event. 
  1496. The Resident Manager checks the Log Queue and the Receive Queue
  1497. for the specified Control File.  This function and the Cover Page
  1498. Read flag provide applications with a means of recording whether
  1499. or not the user has read the cover page.
  1500.  
  1501. Event Handle   Required - Event handle of the receive event whose
  1502.                cover page you want to set as read.  Obtained with
  1503.                FAXFind???.
  1504.  
  1505. Read Flag      Optional - Set the read status of the cover page.
  1506.  
  1507.                Valid values - False (0) - Cover page not read.
  1508.                               True (1) - Cover page read.
  1509.  
  1510.                Default value - False (0) - Cover page not read.
  1511.  
  1512. Return Data Type:   LONG
  1513.  
  1514. Return Value:       0 - Success.
  1515.                     < 0 - CAS Errorcode.
  1516.  
  1517. Example:
  1518.      Return# = FAXSetCvrStat( Event, True )
  1519.      IF Return# < 0
  1520.           DO ErrMsg
  1521.      END
  1522.  
  1523. CvtHex2Num( )                  (convert HEX value to numeric)
  1524.  
  1525.  
  1526.                      CvtHex2Num( HEX Value )
  1527.  
  1528. The CvtHex2Num() function converts a HEX (string) value to a
  1529. numeric.
  1530.  
  1531. HEX Value      Required - Hexidecimal (string) value to be
  1532.                converted.  Using the notation '3E8', do not add
  1533.                an 'h' to the end.
  1534.  
  1535. Return Data Type:   uLONG
  1536.  
  1537. Return Value:       Clarion uLONG equivalent to the HEX Value.
  1538.  
  1539. Example:
  1540.      Value# = CvtHex2Num( '3E8' )
  1541.  
  1542. See also: CvtNum2Hex
  1543.  
  1544. CvtNum2Hex( )                  (convert numeric to HEX value)
  1545.  
  1546.  
  1547.                    CvtNum2Hex( Numeric Value )
  1548.  
  1549. The CvtNum2Hex() function converts a numeric value to a HEX
  1550. (string).
  1551.  
  1552. Numeric Value  Required - Numeric value to be converted to its
  1553.                Hexidecimal (string) equivalent.
  1554.  
  1555. Return Data Type:   STRING
  1556.  
  1557. Return Value:       HEX STRING equivalent to the numeric Value.
  1558.  
  1559. Example:
  1560.      Value# = CvtNum2Hex( 1000 )
  1561.  
  1562. See also: CvtHex2Num
  1563.  
  1564. Long2DosD( )                   (convert Clarion date to DOS Date)
  1565.  
  1566.  
  1567.                     Long2DosD( Clarion Date )
  1568.  
  1569. The Long2DosD() function converts a Clarion date (long) to the
  1570. DOS equivalent (DOS file date format is a convention that DOS
  1571. uses for storing the date and time in two-byte fields).
  1572.  
  1573. Clarion Date   Required - Clarion date (long) to be converted to
  1574.                its DOS (2 byte) equivalent.
  1575.  
  1576. Return Data Type:   LONG
  1577.  
  1578. Return Value:       LONG representing the DOS date for the input
  1579.                     Clarion date.
  1580.  
  1581. Example:
  1582.      DosDate# = Long2DosD( Today() )
  1583.  
  1584.  
  1585. Long2DosT( )                   (convert Clarion time to DOS time)
  1586.  
  1587.  
  1588.                     Long2DosT( Clarion Time )
  1589.  
  1590. The Long2DosT() function converts a Clarion time (long) to the
  1591. DOS equivalent (DOS file time format is a convention that DOS
  1592. uses for storing the date and time in two-byte fields).
  1593.  
  1594. Clarion Time   Required - Clarion time (long) to be converted to
  1595.                its DOS (2 byte) equivalent.
  1596.  
  1597. Return Data Type:   LONG
  1598.  
  1599. Return Value:       LONG representing the DOS time for the input
  1600.                     Clarion time.
  1601.  
  1602. Example:
  1603.      DosDate# = Long2DosD( Clock() )
  1604.  
  1605.  
  1606.                      Control File Structure
  1607.  
  1608. G_Control  Group,pre(gct)               ! Begin Group Structure.
  1609.  
  1610. EventType    byte(0)
  1611.  
  1612.           Event type:
  1613.           0 - Send.
  1614.           1 - Receive.
  1615.           2 - Polled Send.
  1616.           3 - Polled Receive.
  1617.           4 - Group Send (V1.2).
  1618.           5 - Group Polled Receive (V1.2).
  1619.           -1 (0FFH) - Serious hardware error not associated
  1620.                      with an ordinary event.
  1621.  
  1622. TransType    byte(0)
  1623.  
  1624.           Transfer type:
  1625.           0 - 200x200 dpi, fax mode.
  1626.           1 - 100x200 dpi, fax mode.
  1627.           2 - File transfer mode.
  1628.  
  1629. EventStat    Short(0)
  1630.  
  1631.           Status of event:
  1632.           0 - Successfully completed.
  1633.           1 - Waiting to be processed.
  1634.           2 - Number dialed or event in progress.
  1635.           3 - Connection made -- sending.
  1636.           4 - Connection made -- receiving.
  1637.           5 - Event was aborted.
  1638.           Negative value - Error.
  1639.  
  1640. SendTime     uShort(0)
  1641.  
  1642.           Time you want to send the information (used for
  1643.           send events only).  For receive events, this is
  1644.           the time the receive event occurred.  The format       
  1645.           is in DOS file date and time format.
  1646.  
  1647. SendDate     uShort(0)
  1648.  
  1649.           Date you want to send the information (used for
  1650.           send events only).  For receive events, this is
  1651.           the date the receive event occurred.  The format       
  1652.           is in DOS file date and time format.
  1653.  
  1654. Files2Send   uShort(0)
  1655.  
  1656.           Number of files to transfer (maximum 32766).
  1657.  
  1658. FTRReserv    uShort(0)
  1659.  
  1660.           Reserved - Set to 0.
  1661.  
  1662. PhoneNum     cString(47)
  1663.  
  1664.           Phone number to call (or filename of Group File
  1665.           (V1.2)).  For non-group events, place a phone
  1666.           number in this field.  For group events, place the
  1667.           filename of the Group File (without specifying the
  1668.           drive or path) in this field.  The Group File must
  1669.           be in the same directory as the Control File for the
  1670.           parent event when the event is submitted.
  1671.  
  1672. ApplicTag    cString(64)
  1673.  
  1674.           Application-specific tag field.  Will always be
  1675.           set to 'Fax Sent with C3Fax v1.01'.
  1676.  
  1677. CASReserv    byte(0)
  1678.  
  1679.           Reserved - Set to 0.
  1680.  
  1681. Con_Sec      byte(0)
  1682.  
  1683.           Time length of phone connection: seconds (0-59). 
  1684.           Has no meaning for parent Control Files.
  1685.  
  1686. Con_Min      byte(0)
  1687.  
  1688.           Time length of phone connection: minutes (0-59). 
  1689.           Has no meaning for parent Control Files.
  1690.  
  1691. Con_Hrs      byte(0)
  1692.  
  1693.           Time length of phone connection: hours (0-23).
  1694.           Has no meaning for parent Control Files.
  1695.  
  1696. Total_Pg     uLong(0)
  1697.  
  1698.           Total number of pages in all files. Has no meaning
  1699.           for parent Control Files.
  1700.  
  1701. Pages_Tran   uLong(0)
  1702.  
  1703.           Number of pages transmitted so far. Has no meaning
  1704.           for parent Control Files.
  1705.  
  1706. Files_Tran   uShort(0)
  1707.  
  1708.           Number of files transmitted so far. Has no meaning
  1709.           for parent Control Files.
  1710.  
  1711. Cover_Flag   byte(0)
  1712.  
  1713.           Cover page flag:
  1714.           0 - Do not send a cover page.
  1715.           1 - Send a cover page.
  1716.  
  1717. Total_Err    uShort(0)
  1718.  
  1719.           Number of transmission errors reported by the
  1720.           hardware for all transmissions controlled by this      
  1721.           Control File.  Has no meaning for parent Control
  1722.           Files.
  1723.  
  1724. Delete_Flag  byte(0)
  1725.  
  1726.           Delete files flag (V1.2).  Determines whether or not
  1727.           the files listed in the File Transfer Records          
  1728.           (FTRs) are deleted after the event is completed.
  1729.  
  1730.           0 - Do not delete files after event.
  1731.           1 - Delete files if event is successful.
  1732.           2 - Always delete files after event.
  1733.  
  1734. NOTES:
  1735.  
  1736. If the event type is a group send and the value of the delete
  1737. files flag is 1 (delete if successful), the files will only be
  1738. deleted if all sub-events have been successfully completed.  
  1739.  
  1740. If the event is a group send and the value of the flag is 2
  1741. (always delete), the files will be deleted after all sub-events
  1742. have been attempted.
  1743.  
  1744. If the delete files flag is set to 2 (always delete), the files
  1745. will always be deleted whether the event is successful, cancelled
  1746. by the user, or aborted during transmission due to line or board
  1747. errors.
  1748.  
  1749. Parent_Hndl  uShort(0)
  1750.  
  1751.           Event handle for parent event (V1.2).  The
  1752.           Resident Manager assigns this handle.  This handle
  1753.           is zero if there is no parent event.
  1754.  
  1755. CASReserv2   byte(0),dim(73)  
  1756.  
  1757.           Reserved - Set to 0.
  1758.  
  1759. Cover_Read   byte(0)
  1760.  
  1761.           Cover page read flag (V1.2).  Initialized to zero.
  1762.           The application can use FAXSetCvrStat function to
  1763.           set this field to indicate whether or not the user
  1764.           has read the cover page.
  1765.  
  1766.           0 - Cover page not read.
  1767.           1 - Cover page read.
  1768.  
  1769. No_Header    byte(0)
  1770.  
  1771.           Suppress Page Headers (V1.2).  This field only has
  1772.           meaning for faxes.  Setting this field to 1 causes
  1773.           the line of fax addressing information at the top
  1774.           of each fax page to be suppressed.
  1775.  
  1776.           0 - Page Headers.
  1777.           1 - No Page Headers.
  1778.  
  1779. Remote_CSID  cString(21)
  1780.  
  1781.           Remote CSID (the CCITT identification of the fax
  1782.           device, set by the Resident Manager).
  1783.  
  1784. To_Name      cString(32)
  1785.  
  1786.           Destination Name (To: field).
  1787.  
  1788. From_Name    cString(32)
  1789.  
  1790.           Sender Name (From: field).
  1791.  
  1792. Logo_Name    cString(80)
  1793.  
  1794.           Path and name of PCX logo file (maximum size 1728
  1795.           x 800 pels).  A fully qualified pathname for the
  1796.           file (including the drive) must be entered.
  1797.  
  1798. FileType     byte(0)
  1799.  
  1800.           File type (has meaning only for faxes):
  1801.  
  1802.           0 - ASCII.
  1803.           1 - PCX.
  1804.           2 - DCX.
  1805.           3 - 15  - Reserved
  1806.           16 - 31 - (V1.2) Reserved for printer file formats. 
  1807.           At this time, code 16 is assigned to the HP PCL
  1808.           Level IV file format and code 17 is assigned to
  1809.           the Epson FX85 format.
  1810.  
  1811. These codes are optional and may not be supported by all CAS
  1812. implementations.
  1813.  
  1814. TxtSize     byte(0)
  1815.  
  1816.           Text size to use if file type is ASCII (has meaning
  1817.           only for faxes):
  1818.  
  1819.           0 - 80 column by 66 lines (11 inches)
  1820.           1 - 132 column by 88 lines (11 inches)
  1821.  
  1822. FileStat    byte(0)
  1823.  
  1824.           Status of this file:
  1825.  
  1826.           0 - Untouched
  1827.           1 - Has been opened
  1828.           2 - Has been moved
  1829.           3 - Has been deleted
  1830.           4 - Not yet received
  1831.  
  1832.  
  1833. ByteTran    uLong(0)
  1834.  
  1835.           Bytes of this file transmitted so far. Has no
  1836.           meaning for parent Control Files.
  1837.  
  1838. FileSize    uLong(0) 
  1839.  
  1840.           Size in bytes of this file.
  1841.  
  1842. Page_Tran   uShort(0)
  1843.  
  1844.           Number of pages in this file transmitted so far. 
  1845.           Has no meaning for parent Control Files.
  1846.  
  1847. Page_Count  uShort(0)
  1848.  
  1849.           Number of pages in this file.
  1850.  
  1851. FileName    cString(80)
  1852.  
  1853.           Path and name of file to send.  A fully qualified
  1854.           pathname for the file (including the drive) must
  1855.           be entered.
  1856.  
  1857. Eighth_Incs byte(0)
  1858.  
  1859.           If you set the Inches field (Page Legnth) to a
  1860.           value in the range 1 through 127, this field
  1861.           specifies the number of additional 1/8 inch
  1862.           increments in page length.  If the Inches field is
  1863.           outside that range, this field has no meaning. 
  1864.           This field has meaning only for faxes.
  1865.  
  1866. Page_Len    byte(0)
  1867.  
  1868.           Page length in inches (has meaning only for
  1869.           faxes).
  1870.  
  1871.           0    - Page length is 11 inches.
  1872.           1 - 127 - Page length is the specified number of
  1873.                  inches, plus the number of 1/8 inch specified in
  1874.                  the 1/8 inch field (Eighth_Incs).
  1875.             -1  - ASCII pages end with form feeds only.
  1876.           All other values are reserved.
  1877.  
  1878.  
  1879. FReserve     byte(0),dim(31)
  1880.  
  1881.           Reserved - Set to 0.
  1882.  
  1883.            .
  1884.  
  1885.                      Control File Structure
  1886.  
  1887. G_Control  Group,pre(gct)               ! Begin Group Structure.
  1888.  
  1889. EventType    byte(0)
  1890.  
  1891.           Event type:
  1892.           0 - Send.
  1893.           1 - Receive.
  1894.           2 - Polled Send.
  1895.           3 - Polled Receive.
  1896.           4 - Group Send (V1.2).
  1897.           5 - Group Polled Receive (V1.2).
  1898.           -1 (0FFH) - Serious hardware error not associated
  1899.                      with an ordinary event.
  1900.  
  1901. TransType    byte(0)
  1902.  
  1903.           Transfer type:
  1904.           0 - 200x200 dpi, fax mode.
  1905.           1 - 100x200 dpi, fax mode.
  1906.           2 - File transfer mode.
  1907.  
  1908. EventStat    Short(0)
  1909.  
  1910.           Status of event:
  1911.           0 - Successfully completed.
  1912.           1 - Waiting to be processed.
  1913.           2 - Number dialed or event in progress.
  1914.           3 - Connection made -- sending.
  1915.           4 - Connection made -- receiving.
  1916.           5 - Event was aborted.
  1917.           Negative value - Error.
  1918.  
  1919. SendTime     uShort(0)
  1920.  
  1921.           Time you want to send the information (used for
  1922.           send events only).  For receive events, this is
  1923.           the time the receive event occurred.  The format       
  1924.           is in DOS file date and time format.
  1925.  
  1926. SendDate     uShort(0)
  1927.  
  1928.           Date you want to send the information (used for
  1929.           send events only).  For receive events, this is
  1930.           the date the receive event occurred.  The format       
  1931.           is in DOS file date and time format.
  1932.  
  1933. Files2Send   uShort(0)
  1934.  
  1935.           Number of files to transfer (maximum 32766).
  1936.  
  1937. FTRReserv    uShort(0)
  1938.  
  1939.           Reserved - Set to 0.
  1940.  
  1941. PhoneNum     cString(47)
  1942.  
  1943.           Phone number to call (or filename of Group File
  1944.           (V1.2)).  For non-group events, place a phone
  1945.           number in this field.  For group events, place the
  1946.           filename of the Group File (without specifying the
  1947.           drive or path) in this field.  The Group File must
  1948.           be in the same directory as the Control File for the
  1949.           parent event when the event is submitted.
  1950.  
  1951. ApplicTag    cString(64)
  1952.  
  1953.           Application-specific tag field.  Will always be
  1954.           set to 'Fax Sent with C3Fax v1.01'.
  1955.  
  1956. CASReserv    byte(0)
  1957.  
  1958.           Reserved - Set to 0.
  1959.  
  1960. Con_Sec      byte(0)
  1961.  
  1962.           Time length of phone connection: seconds (0-59). 
  1963.           Has no meaning for parent Control Files.
  1964.  
  1965. Con_Min      byte(0)
  1966.  
  1967.           Time length of phone connection: minutes (0-59). 
  1968.           Has no meaning for parent Control Files.
  1969.  
  1970. Con_Hrs      byte(0)
  1971.  
  1972.           Time length of phone connection: hours (0-23).
  1973.           Has no meaning for parent Control Files.
  1974.  
  1975. Total_Pg     uLong(0)
  1976.  
  1977.           Total number of pages in all files. Has no meaning
  1978.           for parent Control Files.
  1979.  
  1980. Pages_Tran   uLong(0)
  1981.  
  1982.           Number of pages transmitted so far. Has no meaning
  1983.           for parent Control Files.
  1984.  
  1985. Files_Tran   uShort(0)
  1986.  
  1987.           Number of files transmitted so far. Has no meaning
  1988.           for parent Control Files.
  1989.  
  1990. Cover_Flag   byte(0)
  1991.  
  1992.           Cover page flag:
  1993.           0 - Do not send a cover page.
  1994.           1 - Send a cover page.
  1995.  
  1996. Total_Err    uShort(0)
  1997.  
  1998.           Number of transmission errors reported by the
  1999.           hardware for all transmissions controlled by this      
  2000.           Control File.  Has no meaning for parent Control
  2001.           Files.
  2002.  
  2003. Delete_Flag  byte(0)
  2004.  
  2005.           Delete files flag (V1.2).  Determines whether or not
  2006.           the files listed in the File Transfer Records          
  2007.           (FTRs) are deleted after the event is completed.
  2008.  
  2009.           0 - Do not delete files after event.
  2010.           1 - Delete files if event is successful.
  2011.           2 - Always delete files after event.
  2012.  
  2013. NOTES:
  2014.  
  2015. If the event type is a group send and the value of the delete
  2016. files flag is 1 (delete if successful), the files will only be
  2017. deleted if all sub-events have been successfully completed.  
  2018.  
  2019. If the event is a group send and the value of the flag is 2
  2020. (always delete), the files will be deleted after all sub-events
  2021. have been attempted.
  2022.  
  2023. If the delete files flag is set to 2 (always delete), the files
  2024. will always be deleted whether the event is successful, cancelled
  2025. by the user, or aborted during transmission due to line or board
  2026. errors.
  2027.  
  2028. Parent_Hndl  uShort(0)
  2029.  
  2030.           Event handle for parent event (V1.2).  The
  2031.           Resident Manager assigns this handle.  This handle
  2032.           is zero if there is no parent event.
  2033.  
  2034. CASReserv2   byte(0),dim(73)  
  2035.  
  2036.           Reserved - Set to 0.
  2037.  
  2038. Cover_Read   byte(0)
  2039.  
  2040.           Cover page read flag (V1.2).  Initialized to zero.
  2041.           The application can use FAXSetCvrStat function to
  2042.           set this field to indicate whether or not the user
  2043.           has read the cover page.
  2044.  
  2045.           0 - Cover page not read.
  2046.           1 - Cover page read.
  2047.  
  2048. No_Header    byte(0)
  2049.  
  2050.           Suppress Page Headers (V1.2).  This field only has
  2051.           meaning for faxes.  Setting this field to 1 causes
  2052.           the line of fax addressing information at the top
  2053.           of each fax page to be suppressed.
  2054.  
  2055.           0 - Page Headers.
  2056.           1 - No Page Headers.
  2057.  
  2058. Remote_CSID  cString(21)
  2059.  
  2060.           Remote CSID (the CCITT identification of the fax
  2061.           device, set by the Resident Manager).
  2062.  
  2063. To_Name      cString(32)
  2064.  
  2065.           Destination Name (To: field).
  2066.  
  2067. From_Name    cString(32)
  2068.  
  2069.           Sender Name (From: field).
  2070.  
  2071. Logo_Name    cString(80)
  2072.  
  2073.           Path and name of PCX logo file (maximum size 1728
  2074.           x 800 pels).  A fully qualified pathname for the
  2075.           file (including the drive) must be entered.
  2076.  
  2077. FileType     byte(0)
  2078.  
  2079.           File type (has meaning only for faxes):
  2080.  
  2081.           0 - ASCII.
  2082.           1 - PCX.
  2083.           2 - DCX.
  2084.           3 - 15  - Reserved
  2085.           16 - 31 - (V1.2) Reserved for printer file formats. 
  2086.           At this time, code 16 is assigned to the HP PCL
  2087.           Level IV file format and code 17 is assigned to
  2088.           the Epson FX85 format.
  2089.  
  2090. These codes are optional and may not be supported by all CAS
  2091. implementations.
  2092.  
  2093. TxtSize     byte(0)
  2094.  
  2095.           Text size to use if file type is ASCII (has meaning
  2096.           only for faxes):
  2097.  
  2098.           0 - 80 column by 66 lines (11 inches)
  2099.           1 - 132 column by 88 lines (11 inches)
  2100.  
  2101. FileStat    byte(0)
  2102.  
  2103.           Status of this file:
  2104.  
  2105.           0 - Untouched
  2106.           1 - Has been opened
  2107.           2 - Has been moved
  2108.           3 - Has been deleted
  2109.           4 - Not yet received
  2110.  
  2111.  
  2112. ByteTran    uLong(0)
  2113.  
  2114.           Bytes of this file transmitted so far. Has no
  2115.           meaning for parent Control Files.
  2116.  
  2117. FileSize    uLong(0) 
  2118.  
  2119.           Size in bytes of this file.
  2120.  
  2121. Page_Tran   uShort(0)
  2122.  
  2123.           Number of pages in this file transmitted so far. 
  2124.           Has no meaning for parent Control Files.
  2125.  
  2126. Page_Count  uShort(0)
  2127.  
  2128.           Number of pages in this file.
  2129.  
  2130. FileName    cString(80)
  2131.  
  2132.           Path and name of file to send.  A fully qualified
  2133.           pathname for the file (including the drive) must
  2134.           be entered.
  2135.  
  2136. Eighth_Incs byte(0)
  2137.  
  2138.           If you set the Inches field (Page Legnth) to a
  2139.           value in the range 1 through 127, this field
  2140.           specifies the number of additional 1/8 inch
  2141.           increments in page length.  If the Inches field is
  2142.           outside that range, this field has no meaning. 
  2143.           This field has meaning only for faxes.
  2144.  
  2145. Page_Len    byte(0)
  2146.  
  2147.           Page length in inches (has meaning only for
  2148.           faxes).
  2149.  
  2150.           0    - Page length is 11 inches.
  2151.           1 - 127 - Page length is the specified number of
  2152.                  inches, plus the number of 1/8 inch specified in
  2153.                  the 1/8 inch field (Eighth_Incs).
  2154.             -1  - ASCII pages end with form feeds only.
  2155.           All other values are reserved.
  2156.  
  2157.  
  2158. FReserve     byte(0),dim(31)
  2159.  
  2160.           Reserved - Set to 0.
  2161.  
  2162.            .
  2163. The following is an excerpt from the DCA/Intel CAS Specification:
  2164.  
  2165. Error Codes
  2166.  
  2167. An error code consists of two parts: an error class and an error
  2168. subcode.  The error class is the first two HEX digits returned,
  2169. and the error subcode is the second two HEX digits returned.  The
  2170. error class indicates the general type of operation in which the
  2171. error occurred.  Examples of general operations are manipulation
  2172. of the schedule and manipulation of a Control File.  The error
  2173. subcode can be a DOS error code or an error code defined by the
  2174. Resident Manager.  Error subcodes indicate the specific kind of
  2175. error that occurred.
  2176.  
  2177. This method of handling error codes allows an application to
  2178. examine either the full error code returned or the class/subcode
  2179. of an error individually.
  2180.  
  2181. Error codes are listed in the following table.  All codes are in
  2182. Hexadecimal.  Before each listing of specific errors is a
  2183. description of the error class code.  The full error code (class
  2184. + subcode) is listed in the Error column, and the class and
  2185. subcode are listed separately in the next two columns.  When
  2186. these errors are returned to an application, they are returned as
  2187. the negative of these codes.  For example, a "No more events"
  2188. error will be returned in AX as 0FDFCH which is the negative (2's
  2189. complement) of 0204H.
  2190.  
  2191. NOTE: Error codes returned as a Clarion LONG may be converted to
  2192. the Hexadecimal equivalent using:
  2193.  
  2194.           Variable = CvtNum2Hex( Abs( Return Value ) ).
  2195.  
  2196. Table of Error Codes
  2197.  
  2198. Error Class Subcode Description 0 Class: Fax warnings (not an error) 0000 0 0 No error 0002 0 2 Bad scanline count 0003 0 3 Page sent with errors, couldn't resend 0004 0 4 Receive data lost 0005 0 5 Invalid or missing logo file 0006 0 6 File name does not match nonstandard
  2199. format (NSF) header 0007 0 7 File size does not match nonstandard
  2200. format (NSF) header 1 Class: DOS warnings; data was sent.  The
  2201. error subcode is the error returned by
  2202. DOS.  Examples are: 0101 1 1 Invalid function number 0105 1 5 Access denied 0106 1 6 Invalid handle 01xx 1 ... (See the DOS Technical Reference) 2 Class: Fatal errors.  The function
  2203. failed or the data was not sent. 0200 2 0 Multiplex handler failed 0201 2 1 Unknown command (bad function number) 0202 2 2 Event not found (bad event handle) 0203 2 3 Attempted to Find Next before Find First 0204 2 4 No more events 0207 2 7 Invalid Queue type (bad Queue number) 0208 2 8 Bad Control File 0209 2 9 Communication board is busy 020A 2 A Invalid command parameter 020B 2 B Can not un-install the Resident Manager 020C 2 C File already exists 0280 2 80 Unknown task type (not a Send or Poll
  2204. event) 0281 2 81 Bad phone number 0282 2 82 Bad PCX file header 0283 2 83 Unexpected EOF 0284 2 84 Unexpected disconnect 0285 2 85 Exceeded maximum dialing retries 0286 2 86 No files specified for Send event 0287 2 87 Communication board timeout 0288 2 88 Received more than 1023 (maximum) pages
  2205. of data 0289 2 89 Manual connect posted too long ago 028A 2 8A Hardware command set error 028B 2 8B Bad nonstandard format (NSF) header file 3 Class: Fatal DOS errors, data not sent. 
  2206. The error subcode is the error returned
  2207. by DOS.  Examples are: 0302 3 2 File not found 0303 3 3 Path not found 03xx 3 ... (See the DOS Technical Reference Manual) 4 Class: Fax errors 0401 4 1 Remote unit not Group 3 compatible 0402 4 2 Remote unit did not send its
  2208. capabilities 0403 4 3  Remote unit requested disconnect 0404 4 4  Remote unit is not capable of file
  2209. transfers 0405 4 5  Exceeded retrain or fax resend limit 0406 4 6  Line noise or local and remote unit do
  2210. not agree on a bit rate 0407 4 7  Remote unit disconnected after receiving
  2211. data 0408 4 8  No response from remote unit after
  2212. sending data 0409 4 9  Capabilities of remote unit are not
  2213. compatible 040A 4 A  No dial tone - check phone line and cord
  2214. (V1.2) 040B 4 B  Invalid response from remote unit after
  2215. sending data 040D 4 D  Phone line dead or remote unit
  2216. disconnected 040E 4 E  Timeout while waiting for secondary dial
  2217. tone  (V1.2) 0411 4 11 Invalid command from remote after
  2218. receiving data 0415 4 15 Tried to receive from incompatible
  2219. hardware 041F 4 1F Unexpected end of file while receiving 045C 4 5C Received data overflowed input buffer 045D 4 5D Remote hardware unexpectedly stopped
  2220. sending data 045E 4 5E Remote hardware did not send any data 045F 4 5F Remote hardware took too long to send
  2221. fax scan line 0463 4 63 Cannot get through to remote unit 0464 4 64 User cancelled event 5 Class: Application specific errors
  2222. (V1.2) Applications can use the class 5
  2223. error codes to record information
  2224. specific to an application in a Control
  2225. File in the Log Queue.  To do this, the
  2226. application must set the status of event
  2227. field (offset 2 in the Control File) to
  2228. the negative value (2's complement) of
  2229. the selected error code.  For example,
  2230. if the error code is 501H, the status of
  2231. event field is set to FAFFH.  When the
  2232. application submits the event to the
  2233. Task Queue, using the Submit a Task
  2234. function (01H), the Resident Manager
  2235. bypasses the Task Queue and places the
  2236. Control File directly on the Log Queue. 
  2237. The status of event field then contains
  2238. the error code. Information specific to
  2239. an application in a control file in the
  2240. Log Queue.  To do this, the application
  2241. must set the status of the event field
  2242. (offset 2 in the Control File) to the
  2243. negative value (2's complement) of the
  2244. selected error code.  For example, if
  2245. the error code is 501H, the status of
  2246. the event field is set to FAFFH.  When
  2247. the application submits the event to the
  2248. Task Queue, using the Submit a Task
  2249. function (01H), the Resident Manager
  2250. bypasses the Task Queue and places the
  2251. Control File directly on the Log Queue. 
  2252. The status of the event field then
  2253. contains the error code. 6 Class: CAS implementation specific
  2254. errors (V1.2) Manufacturers implementing
  2255. CAS can use the class 6 error codes to
  2256. define additional error conditions
  2257. unique to their hardware.  Manufacturers
  2258. are urged to use these codes sparingly
  2259. since they will not be consistent across
  2260. all CAS implementations.  Be sure to
  2261. document class 6 error codes clearly in
  2262. end-user documentation so that users can
  2263. interpret these codes correctly if CAS
  2264. applications display them. Queues
  2265.  
  2266. To manage the events presented to it, the Resident Manager places
  2267. the Control Files associated with these events in queues.  Three
  2268. types of queues are supported: a Task Queue, a Receive Queue, and
  2269. a Log Queue.
  2270.  
  2271. Task Queue - Contains a list of pending events that the
  2272.              application running on the local computer has
  2273.              initiated.  Pending events can be send, polled send,
  2274.              polled receive, group send, and group polled receive
  2275.              events.
  2276.  
  2277. Receive Queue - Contains a list of events that the local computer
  2278.                 has received from a remote device.
  2279.  
  2280. Log Queue - Contains a record of all the events that have been
  2281.             completed, aborted, or terminated with an error.
  2282.  
  2283. These event queues allow the Resident Manager to schedule and
  2284. monitor events.  They also allow an application to check on the
  2285. status of events.
  2286. Events and Control Files
  2287.  
  2288. The Resident Manager currently supports the following six
  2289. data-communication events:
  2290.  
  2291. Send      The local computer transmits information to a remote
  2292.           device (fax machine or computer).
  2293.  
  2294. Receive   The local computer receives information from a remote
  2295.           device.
  2296.  
  2297. Polled Send     The local computer waits for a remote device to
  2298.           call and then automatically sends information to it.
  2299.  
  2300. Polled Receive  The local computer calls a remote device and
  2301.           receives information from it.
  2302.  
  2303. Group Send (V1.2)  The local computer transmits the same         
  2304.               information to multiple remote devices.
  2305.  
  2306. Group Polled    The local computer calls multiple remote devices
  2307.           and receives information (V1.2)  from them.
  2308.  
  2309. Each event has one or more Control Files associated with it.  A
  2310. Control File contains information about an event that the
  2311. Resident Manager uses to schedule, execute, and report the status
  2312. of the event.  For example, the Control File for a send event
  2313. contains the phone number, date, and time information for the
  2314. event.
  2315.  
  2316.                            C3Fax Index
  2317. ApplicTag  A.2
  2318. ASCII  A.5
  2319. ASCIIFile  3, 10
  2320. ByteTran  A.6
  2321. Columns
  2322.      132  3, 10
  2323.      80  3, 10
  2324. Con_Hrs  A.2, A.3
  2325. Con_Min  A.2
  2326. Con_Sec  A.2
  2327. Convert
  2328.      Date  39
  2329.      HEX  37, 38
  2330.      Time  40
  2331. Copyright  iii
  2332. Cover 
  2333.      Page  12
  2334.      Text  12
  2335. Cover Page
  2336.      Status Flag  36
  2337. Cover_Flag  A.3
  2338. Cover_Read  A.4
  2339. Current
  2340.      Event  7
  2341. Current Event
  2342.      Abort  8
  2343. DCX  A.5
  2344. DCXFile  3
  2345. Delete_Flag  A.3
  2346. Diagnostics
  2347.      Run  34
  2348. Digital Communications
  2349.           Associates  iii
  2350. EDB  28
  2351. Eighth_Incs  A.6
  2352. Epson  A.5
  2353. Error Codes  B.1
  2354. Event 
  2355.      Date  11
  2356.      Status  7
  2357.      Time  11
  2358. Event Date
  2359.      Get  24
  2360.      Set  25
  2361. Event Time
  2362.      Get  26
  2363.      Set  27
  2364. EventStat  A.1
  2365. EventType  A.1
  2366. External
  2367.      Data Block  28
  2368. FAX
  2369.                                         Close  20
  2370.                                         Open  17
  2371.                                         Read  19
  2372.                                         Resolution  9
  2373.                                    FAXInstalled  1
  2374.                                    FAXQCreate  2
  2375.                                    FAXQFile  3
  2376.                                    File
  2377.                                         Delete  21, 23
  2378.                                         Name  3, 6
  2379.                                         Remove  5
  2380.                                         Type  3
  2381.                                    FileName  A.6
  2382.                                    Files_Tran  A.3
  2383.                                    Files2Send  A.2
  2384.                                    FileSize  A.6
  2385.                                    FileStat  A.5
  2386.                                    FileType  A.5
  2387.                                    Find
  2388.                                         Next  16
  2389.                                    FormFeed  3
  2390.                                    From_Name  A.5
  2391.                                    G_Control  A.1
  2392.                                    Group
  2393.                                         Polled  D.1
  2394.                                         Send  D.1
  2395.                                    Hardware
  2396.                                         Status  33
  2397.                                    Header
  2398.                                         Flag  6
  2399.                                    HiRes   9
  2400.                                    Installed  1
  2401.                                    Intel  iii
  2402.                                    Logo  2
  2403.                                    Logo_Name  A.5
  2404.                                    No_Header  A.4
  2405.                                    Page
  2406.                                         Increments  3, 4
  2407.                                         Length  3
  2408.                                         Width  10
  2409.                                    Page_Count  A.6
  2410.                                    Page_Len  A.6
  2411.                                    Page_Tran  A.6
  2412.                                    Pages_Tran  A.3
  2413.                                    Parent_Hndl  A.4
  2414.                                    PCL  A.5
  2415.                                    PCX  A.5
  2416.                                    PCXFile  3
  2417.                                    Phone
  2418.                                         Number  6
  2419.                                    PhoneNum  A.2
  2420.                                    Queue
  2421.      Add File  3
  2422.      Create  2
  2423.      Log  C.1
  2424.      Receive  C.1
  2425.      Status  31
  2426.      Submit  6
  2427.      Task  C.1
  2428. Receive  D.1
  2429.      Polled  D.1
  2430. Receive State  30
  2431. Received File
  2432.      Move  35
  2433. Receiver  2
  2434. Remote_CSID  A.4, A.5
  2435. Resolution 
  2436.      Set  9
  2437. Send  D.1
  2438.      Polled  D.1
  2439.      Single File  13
  2440. SendDate  A.1, A.2
  2441. Sender  2
  2442. SendTime  A.1
  2443. StandardRes   9
  2444. Status
  2445.      Group  7
  2446. Text
  2447.      Size  3
  2448. To_Name  A.4, A.5
  2449. Total_Err  A.3
  2450. Total_Pg  A.3
  2451. TransType  A.1
  2452. TxtSize  A.5
  2453.