<< Click to Display Table of Contents >>
ZfxGetUserCoversheet
Get user's default coversheet.
Syntax
ZFERR FAR ZfxGetUserCoversheet( ZFSESSIONHANDLE hSession, char FAR *lpszBuffer, short BufLen)
Parameters
Parameter |
Description |
hSession |
API session handle, as returned by ZfxAPIInit calllpszBufferAddress of buffer used to return the full path of the directory, including a terminating backslash ('\') and NULL. |
BufLen |
Size of the buffer (including space for the terminating NULL)
|
Description
Each user in Zetafax can set their own default setting for the coversheet they want to use. This routine returns the name of their default coversheet, or a null string if their default setting is for no coversheet to be sent.
The routine need only be called if the program wants to perform specific processing on the coversheet name (for example, overriding it if blank), as the default will automatically be used if the "Coversheet:" line is omitted from a SUBMIT file.
The maximum length of coversheet names equal to ZFMSG_COVERSHEET_LEN (excluding space for the terminating NULL).
Return value
The routine returns 0 if successful, otherwise one of the following:
ZFERR_NOT_INITIALISED
ZFERR_BUFFER_TOO_SMALL
Example
#include <stdio.h>
#include <zfapi.h>
...
szCoversheet[ZFMSG_COVERSHEET_LEN+1];
if (ZfxGetUserCoversheet(hSession, szCoversheet, sizeof(szCoversheet)) != 0
|| szCoversheet[0] == '\0') /*if default is no coversheet */
{
/* force a coversheet to be used */
strcpy(szCoversheet, "COVSHEET");
}
Related topics