(Page 10 of 19 in this chapter)


nfxGetDocStatus

Description

This function 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)

ctahd Handle returned by ctaCreateContext.

queue_handle Identifies the queue the document is in.

doc_number Number of the document for which to retrieve status.

ptr_doc_status Pointer to the following structure that receives the document status:

typedef struct
{
DWORD size; /* size of this structure */
DWORD newdocument; /* New doc or continuation of prev*/
DWORD docnum; /* Entry number in queue */
DWORD processedstatus; /* Has this document been sent? */
DWORD lasterror; /* Last error code (if any)for doc*/
DWORD pagecount; /* Number of pages (for receive) */
DWORD startpage; /* Page to start (for retransmit)*/
DWORD lastpagesent; /* Last page # successfully sent */
DWORD retranscount; /* Number of retries */
DWORD localNSFlength; /* Length of local NSF field */
/* (if specified in doc parms) */
DWORD remoteNSFlength; /* Length of remote NSF field */
/* (or 0)*/
DWORD docencoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD docresolution; /* NFX_RESOLUTION_HIGH */
/* NFX_RESOLUTION_LOW */
/* NFX_RESOLUTION_SUPER_HIGH */
DWORD docwidth; /* NFX_PAGE_WIDTH_A4 */
/* NFX_PAGE_WIDTH_B4 */
/* NFX_PAGE_WIDTH_A3 */
DWORD negotiatedencoding; /* Encoding used for transfer */
/* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD negotiatedrate; /* Baud rate used for transfer */
/* NFX_BIT_RATE_14400, */
/* NFX_BIT_RATE_12000, */
/* NFX_BIT_RATE_9600, */
/* NFX_BIT_RATE_7200, */
/* NFX_BIT_RATE_4800, */
/* NFX_BIT_RATE_2400 */
DWORD negotiatedresolution;
/* Resolution used for transfer*/
/* NFX_RESOLUTION_HIGH */
/* NFX_RESOLUTION_LOW */
/* NFX_RESOLUTION_SUPER_HIGH */
DWORD negotiatedwidth; /* Page width used for transfer */
/* NFX_PAGE_WIDTH_A4 */
/* NFX_PAGE_WIDTH_B4 */
/* NFX_PAGE_WIDTH_A3 */
DWORD badlinecount; /* Number of bad lines in */
/* this doc */
DWORD doctime; /* time document processing */
/* started */
DWORD duration; /* seconds elapsed processing doc */
char filename[NFX_FILENAME_MAX];
/* filename arg from nfxEnqueueDoc*/
char localSID[NFX_MAX_SID];
/* Station ID: CSI (RX), TSI (TX) */
/* (if specified in doc parms)*/
BYTE localNSF[NFX_MAX_FULL_NSF];
/* Local NSF (DSI) / NSC */(DTC)/
/* NSS (if specified in doc parms)*/
BYTE localDIS[NFX_MAX_DIS];
/* Local DIS/DCS frame */
char remoteSID[NFX_MAX_SID];
/* remote SID: TSI (RX),CSI (TX) */
BYTE remoteNSF[NFX_MAX_FULL_NSF];
/* NSF/NSC/NSS rec'd from remote */
BYTE remoteDIS[NFS_MAX_DIS];
/* remote DIS/DCS frame */
} NFX_DOC_STATUS;

Return Values

Events

Details

The lasterror field in the NFX_DOC_STATUS structure can have any of the following values:

:
Error Number

Error

Description

1

NFX_NO_CARRIER

The called fax terminal did not respond at all.

2

NFX_FAIL_TO_TRAIN

Training was attempted twice at all speeds and was not acceptable.

3

NFX_NO_TRAIN_RESP

NaturalFax failed waiting for training response.

4

NFX_NO_POST_MSG_RESP

NaturalFax timed out waiting for a response to the Post Message signal.

5

NFX_FAIL_RESOLUTION

The document could not be sent due to mismatch in document resolutions.

6

NFX_FAIL_ENCODING

The document could not be sent due to mismatch in image encoding.

7

NFX_DOC_MISSING

The document was missing when transmission was attempted.

8

NFX_FILE_EOF

An unexpected end of file was encountered.

10

NFX_NO_FUNCTION

The application attempted to use a function that is not implemented in this version. The fax operation terminated.

12

NFX_REMOTE_DCN

The remote fax terminal sent a disconnect command.

13

NFX_BAD_FILE_FORMAT

The file queued for transmission was not in
TIFF-F format.

14

NFX_V21_TX_FAIL

V21 Transmission failed.

15

NFX_RX_OPEN_FAIL

The application could not open document file to receive the transmission.

16

NFX_NO_DCS

The transmitter did not respond to a DIS signal.

17

NFX_NO_MEMORY

The application attempted to allocate memory and failed.

18

NFX_PRI_MPS

The fax operation terminated by a PRI_MPS.

19

NFX_PRI_EOP

The fax operation terminated by a PRI_EOP.

20

NFX_PRI_EOM

The fax operation terminated by a PRI_EOM.

22

NFX_PAGE_SIZE_MISMATCH

The fax operation failed due to mismatch in page size.

23

NFX_BAD_CRC

An invalid CRC on an incoming HDLC frame was received.

24

NFX_FILE_IO_FAIL

An I/O error occurred when attempting to read or write a file.

See Also

nfxEnqueueDoc



(Page 10 of 19 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.