(Page 12 of 19 in this chapter)


nfxGetSessionStatus

Description

Returns status information during a fax send or receive operation.

Prototype

DWORD nfxGetSessionStatus (CTAHD ctahd,
NFX_FAX_STATUS *ptr_fax_status)

ctahd Handle returned by ctaCreateContext

ptr_fax_status Pointer to the fax status structure:

typedef struct
{
DWORD size; /* size of this structure */
DWORD rate; /* 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 resolution; /* NFX_RESOLUTION_HIGH */
/* NFX_RESOLUTION_LOW */
/* NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD pagewidth; /* NFX_PAGE_WIDTH_A4 */
/* NFX_PAGE_WIDTH_B4 */
/* NFX_PAGE_WIDTH_A3 */
DWORD mode; /* NFX_MODE_IDLE */
/* NFX_MODE_NEGOTIATING*/
/* NFX_MODE_TRANSMITING */
/* NFX_MODE_RECEIVING */
/* NFX_MODE_DISCONNECTING */
/* NFX_MODE_FINISHED */
/* NFX_MODE_CONNECTING */
DWORD error; /* Last error code generated */
DWORD docnumber; /* Current document in progress */
DWORD pagenumber; /* Current page of the document */
DWORD docbadlines; /* Num of bad lines on last page rec'd*/
char docfilename[NFX_FILENAME_MAX];
/* Name of current file processed */
char docremoteSID[NFX_MAX_SID];
/* Received SID from remote station*/
BYTE docremoteNSF[NFX_MAX_USER_NSF]
/* Received NSF from remote station*/
} NFX_FAX_STATUS;

Return Values

Events

Details

Events indicate the progress of a fax session. This function is used to return additional information about the state of the fax session at the most recent event.

The statuserror field in the NFX_FAX_STATUS structure can contain any of the following values:
Error

Error Name

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 transmit was not in TIFF-F format.

14

NFX_V21_TX_FAIL

The V21 transmission failed.

15

NFX_RX_OPEN_FAIL

The application could not open document file for receive.

16

NFX_NO_DCS

The transmitting fax terminal did not respond to DIS.

17

NFX_NO_MEMORY

The application attempted to allocate memory and failed.

18

NFX_PRI_MPS

The fax operation terminated with PRI_MPS.

19

NFX_PRI_EOP

The fax operation terminated with PRI_EOP.

20

NFX_PRI_EOM

The fax operation terminated with PRI_EOM.

22

NFX_PAGE_SIZE_MISMATCH

The fax operation failed due to mismatch in page size.

23

NFX_BAD_CRC

The application received an invalid CRC on an incoming HDLC frame.

24

NFX_FILE_IO_FAIL

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

See Also

nfxReceiveFax, nfxSendFax



(Page 12 of 19 in this chapter)


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