Table of Contents Index NMS Glossary Previous Page Next Page (Page 12 of 15 in this chapter) Version


faxReceiveFax

Description

Starts the receive side of a T.30 protocol fax session and stores all received documents in the specified receive queue.

Prototype

DWORD faxReceiveFax ( HFAX hFax,
FAX_QUEUE_HANDLE hReceiveQueue,
FAX_RECEIVE_PARMS *ptrReceiveParms)

hFax Handle returned by TAPI.

hReceiveQueue Handle for queue of documents to receive, returned by faxCreateQueue.

ptrReceiveParms Pointer to FAX_RECEIVE_PARMS structure (NULL to use default values), as follows:

typedef struct 
{
 DWORD size;   
 DWORD modemtype;      /* NFX_MODEM_TYPE_V27 or NFX_MODEM_TYPE_V2 */
 DWORD minrate;     /* NFX_BIT_RATE_2400, NFX_BIT_RATE_4800,            */
      /* NFX_BIT_RATE_7200, NFX_BIT_RATE_9600           */
 DWORD resolution;     /* NFX_RESOLUTION_HIGH,            */
      /* NFX_RESOLUTION_LOW, or           */
      /* NFX_RESOLUTION_SUPER_HIGH           */
 DWORD encoding;     /* NFX_ENCODE_1D, NFX_ENCODE_2D, or           */
      /* NFX_ENCODE_MMR           */
 DWORD pollingenabled;
      /* NFX_YES or NFX_NO           */
 DWORD badlineaction; 
      /* NFX_BAD_LINE_ACTION_NONE,            */
      /* NFX_BAD_LINE_ACTION_DROP,            */
      /* NFX_BAD_LINE_ACTION_REPT, or            */
      /* NFX_BAD_LINE_ACTION_TICK            */
 DWORD pagewidth;     /* NFX_PAGE_WIDTH_A4, NFX_PAGE_WIDTH__B4, */
      /* or NFX_PAGE_WIDTH_A3           */
 DWORD OTFmode;     /* NFX_OTF_NEVER, NFX_OTF_ALWAYS, or           */
      /* NFX_OTF_ONLY_IF_FAIL           */
 DWORD useECM;     /* NFX_YES or NFX_NO            */
 DWORD lineerrors;     /* % line errors before retrain negative           */
 INT32 level;     /* Tx level in tenths of dBm(-150 to -60)           */
 INT32 threshold;     /* Lowest lev. for receive, tenths of dBm           */
 DWORD NSFlength;     /* Length of NSF field or 0 if none           */
 char SID[NFX_MAX_SID]; 
      /* Subscriber ID string           */
 BYTE NSF[NFX_MAX_NSF]; 
      /* Default NSF for session           */
} FAX_RECEIVE_PARMS;

Return Values

Events

Details

FAXMSG_nnn events indicate progress of the fax session and completion of the fax session.

Note: You must continue processing events during an active fax session. Make sure that file I/O intensive operations do not interfere with the handling of events and cause the fax session to time out. Events should be processed within three seconds.

To enable polling, make sure that the called fax terminal has pollingenabled in FAX_RECEIVE_PARMS set to FAX_YES. If polling is enabled and the sender subsequently requests polling, the event FAXMSG_POLLED is received. Use faxAnswerFaxPoll to continue the fax operation.

Receipt of any of the previously listed events indicates that the fax session status has been updated. Use faxGetSessionStatus to examine the current session status in more detail.

After a fax session has completed, tear down or reset any document queues. NaturalFax for TAPI sends a DCN (disconnect) frame at the end of a fax session, which signals the remote fax terminal to disconnect.

For more information, refer to Section 7.6, Transmitting and Receiving Faxes.

See Also

faxAnswerFaxPoll, faxSendFax



Table of Contents Index NMS Glossary Previous Page Next Page (Page 12 of 15 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.