(Page 9 of 19 in this chapter)


nfxEnqueueDoc

Description

This function allocates a document entry in a document queue.

Prototype

DWORD nfxEnqueueDoc (CTAHD ctahd,
NFX_QUEUE_HANDLE queue_handle,
char *file_name,
NFX_DOC_PARMS *ptr_doc_parms,
DWORD *ptr_doc_number)

ctahd Handle returned by ctaCreateContext

queue_handle Identifies a valid queue to receive the new document

file_name Name of an existing file to send or a file to create on reception

ptr_doc_parms Pointer to an NFX_DOC_PARMS structure as shown below (NULL uses default values):

typedef struct
{
DWORD size; /* size of this structure */
DWORD reserved1; /* must be 0 */
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 reserved2;
char reserved3[21];
BYTE reserved4[54];
} NFX_DOC_PARMS;
ptr_doc_number Pointer to a location to receive a valid document number on a successful return

Return Values

Events

Details

This function is typically used to build transmit queues or receive queues of documents before calling nfxSendFax, nfxReceiveFax or nfxAnswerFaxPoll. In addition, it may be used to add documents to transmit queues or receive queues while a send or receive operation is under way.

When using this function to add documents to active queues, there must always be at least one unprocessed document in the queue for successful enqueuing of a new document. For example, if the last document in the queue is being transmitted, a call to nfxEnqueueDoc will return an error code of NFXERR_QUEUE_TOO_LATE, and the new document will not be enqueued.

The file_name is passed as a separate argument and differs with each call to nfxEnqueueDoc.The file specified by file_name enqueued to a transmit queue must exist, and must be in the correct format for transmission (TIFF-F). The file specified by file_name enqueued to a receive queue must not exist when it is enqueued to the receive queue.

The document number is placed in ptr_doc_number and identifies the position of the document in the queue. The document number and the queue handle are used for subsequent calls to nfxGetDocStatus.

The parameter values in NFX_DOC_PARMS may be changed with each call to nfxEnqueueDoc, but most of them are likely to be set once and used thereafter without changes.

This function does not require allocation of a fax license unit.

See Also

nfxCreateQueue, nfxDestroyQueue



(Page 9 of 19 in this chapter)


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