nfxGetDocStatus

Returns status of a document in the specified queue.

Prototype

DWORD nfxGetDocStatus ( CTAHD ctahd, NFX_QUEUE_HANDLE queue_handle, DWORD doc_number, NFX_DOC_STATUS *ptr_doc_status)

Argument

Description

ctahd

Context handle returned by ctaCreateContext.

queue_handle

Identifies the queue that holds the specified document.

doc_number

Number of the document to retrieve status information on.

ptr_doc_status

Pointer to an NFX_DOC_STATUS structure (as follows) to receive the document status:

typedef struct 
{
  DWORD size;
  DWORD docnum;           /* Entry number in queue              */
  DWORD processedstatus;  /* Has this document been sent?       */
                          /* NFX_NO, NFX_YES, or error          */
  DWORD lasterror;        /* Last error code (if any) for doc   */
  DWORD pagecount;        /* Number of pages (for receive)      */
  DWORD startpage;        /* Page to start at (for retransmit)  */
  DWORD lastpagesent;     /* Last page # successfully sent      */
  DWORD retranscount;     /* Number of retries                  */
  DWORD docencoding       /* 1D (MH) or 2D (MR) or MMR          */
  DWORD docresolution;    /* Resolution: low, high, superhigh   */
  DWORD docwidth;         /* Width: A4, A3, B4                  */
  DWORD negotiatedencoding;/* Encoding used for transfer        */
  DWORD negotiatedrate;   /* Baud rate used for transfer        */
  DWORD negotiatedresolution;/* Resolution used for transfer    */
  DWORD negotiatedwidth;  /* Page width used for transfer       */
  DWORD badlinecount;     /* Number of bad lines in doc rec'ved;*/
                          /* or, in ECM, bad frames txed/rxed   */
  DWORD doctime;          /* Time document processing started   */
  DWORD duration;         /* Seconds elapsed processing doc     */
  char  filename[NFX_FILENAME_MAX]; /* filename arg from        */
                          /* nfxEnqueueDoc                      */
  DWORD modemtype;        /* Modem used to transfer document    */
} NFX_DOC_STATUS;

Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

A function argument is invalid.

CTAERR_INVALID_CTAHD

The specified context handle is invalid.

CTAERR_INVALID_HANDLE

The specified document queue handle is invalid.

Events

None.

Details

The NFX_DOC_STATUS structure is updated after a document is processed (NFXEVN_DOC_END). The processedstatus field indicates whether the document was processed. If the processedstatus field is set, the other fields in this structure contain information on the status of the document.

If the nfxStopSession function is called in the middle of a fax session, the value of the processedstatus field for the current document is zero.

The lasterror field in the NFX_DOC_STATUS structure can contain any of the CTAERR or NFXERR values. For more information, refer to the Alphabetical error summary.

See also

nfxEnqueueDoc