<< Click to Display Table of Contents >>

 

zetafax_logo

ZfxCreateDataFile

 


 

Create a DATA file from SUBMIT format file.

 

Syntax

 

ZFERR FAR ZfxCreateDataFile( ZFSESSIONHANDLE hSession, char FAR  *lpszSubmitFile, char FAR *lpszDataFile, char FAR *lpszDataExtn)

 

Parameters

 

Parameter

Description

hSession

API session handle, as returned by ZfxAPIInit call

lpszSubmitFile

Name of submit file (with path if not in current directory)lpszDataFileName of new DATA file (with path if not in current directory) lpszDataExtnData file extension for the required format - either "TXT" for  ASCII text, or "EPN" for Epson print format.

 

Description

 

This routine interprets the %%[TEXT] of a given SUBMIT format file, writing the  details to the given CONTROL file. It is used where the ZfxSendSubmitFile function does not give sufficient flexibility - for example when wishing to  send an existing data file.

 

Return value

 

The routine returns 0 if successful, otherwise one of the following:

ZFERR_NOT_INITIALISED

ZFERR_INVALID_PARAMETERS

ZFERR_FILE_OPEN_ERROR

ZFERR_FILE_CREATE_ERROR

ZFERR_FILE_ERROR

ZFERR_SUBMIT_FILE_INVALID

 

Example

 

#include  <stdio.h>

#include <zfapi.h>

...

/* create .CTL file in user's OUT directory */

...

/* Create data file in OUT directory */

sprintf(szPath, "%s%s.EPN", szOutDir, szBody);

ZfxCreateDataFile(hSession, "MYFILE.SUB", szPath, "EPN");

/* submit files */

...

 

Related topics

Alphabetical reference

Function error returns and reference