(Page 3 of 4 in this chapter)


Parameter Structures

NaturalFax uses parameter data structures to specify the behavior of fax functions. CT Access parameter functions retrieve and change the values of a specified parameter structure. If a function is governed by parameters, then one of its arguments is a pointer to the relevant parameter structure. The developer can fill in and pass a parameter structure in the function call, or accept the default parameter values by passing a NULL pointer.

The parameter data structures are:

NFX_TRANSMIT_PARMS

The NFX_TRANSMIT_PARMS structure is used to specify how the fax transmission will behave by controlling attributes such as baud rate, file encoding formats, and resolution. This structure is defined as follows:

typedef struct
 {
  DWORD size;        /* size of this structure */
DWORD modemtype; /* NFX_MODEM_TYPE_V17, NFX_MODEM_TYPE_V33 */
/* NFX_MODEM_TYPE_V29, NFX_MODEM_TYPE_V27 */
DWORD minrate; /* NFX_BIT_RATE_14400, NFX_BIT_RATE_12000,*/
/* NFX_BIT_RATE_9600, NFX_BIT_RATE_7200, */
/* NFX_BIT_RATE_4800 or NFX_BIT_RATE_2400.*/
DWORD resolution; /* NFX_RESOLUTION_HIGH, NFX_RESOLUTION_LOW*/
/* or NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */ DWORD pagewidth; /* NFX_PAGE_WIDTH_A4, NFX_PAGE_WIDTH_B4 */
/* or NFX_PAGE_WIDTH_A3 */
DWORD OTFmode; /* NFX_OTF_NEVER, NFX_OTF_ALWAYS,*/ /* NFX_OTF_ONLY_IF_FAIL */ DWORD useCNG; /* NFX_YES or NFX_NO */ DWORD PRIenabled; /* NFX_YES or NFX_NO */ DWORD timeout; /* number of seconds to wait for receiver */ DWORD retrainaction; /* NFX_RTN_NEXT_PAGE, NFX_RTN_REPEAT_PAGE */ DWORD addheader; /* NFX_YES or NFX_NO */ INT32 level; /* dBm level for transmission(-150 to 0)*/ DWORD NSFlength; /* length of NSF field or 0 if none */ char SID[NFX_MAX_SID]; /* Subscriber ID string */ BYTE NSF[NFX_MAX_USER_NSF]; /* default NSF for session */ } NFX_TRANSMIT_PARMS;

NFX_RECEIVE_PARMS

The NFX_RECEIVE_PARMS structure is used to specify how fax reception will behave by controlling attributes such as the baud rate, file encoding format, and the resolution that will be accepted by the receiving fax terminal. This structure is defined as follows:

typedef struct
{
DWORD size; /* size of this structure */
DWORD modemtype; /* NFX_MODEM_TYPE_V27 or NFX_MODEM_TYPE_V29 */
/* Advertised capabilities for fax receiver */
DWORD minrate; /* NFX_BIT_RATE_9600, NFX_BIT_RATE_7200, */
/* NFX_BIT_RATE_4800 or NFX_BIT_RATE_2400.*/
DWORD resolution; /* NFX_RESOLUTION_HIGH, NFX_RESOLUTION_LOW */
/* or NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD pollingenabled; /* NFX_YES or NFX_NO */
DWORD badlineaction; /* NFX_BAD_LINE_ACTION_NONE or */
/* NFX_BAD_LINE_ACTION_DROP or */
/* 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,*/
/* NFX_OTF_ONLY_IF_FAIL */ DWORD reserved;
DWORD lineerrors; /* % line errors before retrain negative */
DWORD NSFlength; /* Length of NSF field or 0 if none */
char SID[NFX_MAX_SID]; /* Subscriber ID string */
BYTE NSF[NFX_MAX_USER_NSF]; /* default NSF for session */
} NFX_RECEIVE_PARMS;

NFX_DOC_PARMS

The NFX_DOC_PARMS structure is used to specify details about each document to be enqueued, such as encoding format and page width. The doc_resolution, doc_encoding, and doc_page_width fields apply only to documents in a receive queue. NFX_DOC_PARMS is defined as follows:

typedef struct
{
DWORD size; /* size of this structure */
DWORD reserved1; /* must be 0 */
DWORD resolution; /* NFX_RESOLUTION_HIGH, NFX_RESOLUTION_LOW */
/* or NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD pagewidth; /* NFX_PAGE_WIDTH_A4 or NFX_PAGE_WIDTH_B4 */
/* or NFX_PAGE_WIDTH_A3 */
DWORD reserved2;
char reserved3[21];
BYTE reserved4[54];
} NFX_DOC_PARMS;

NFX_CONVERT_PARMS

The NFX_CONVERT_PARMS structure is used to specify the input and output file format details for use by the nfxConvertFileDirect function. This structure is defined as follows:

typedef struct
{
DWORD size; /* size of this structure */
DWORD type; /* NFX_TIFF_F */
DWORD resolution; /* NFX_RESOLUTION_HIGH, NFX_RESOLUTION_LOW */
/* or NFX_RESOLUTION_SUPER_HIGH */
DWORD encoding; /* NFX_ENCODE_1D or NFX_ENCODE_2D */
DWORD pagewidth; /* NFX_PAGE_WIDTH_A4 or NFX_PAGE_WIDTH_B4 */
/* or NFX_PAGE_WIDTH_A3 */
DWORD badlineaction; /* NFX_BAD_LINE_ACTION_DROP or */
/* NFX_BAD_LINE_ACTION_REPT or */
/* NFX_BAD_LINE_ACTION_TICK */
} NFX_CONVERT_PARMS;


(Page 3 of 4 in this chapter)


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