<< Click to Display Table of Contents >>
ZfxGetAPIVersion
Get version identifier for API routines.
Syntax
ZFERR FAR ZfxGetAPIVersion( char FAR *lpszBuffer, short BufLen, unsigned short FAR *lpusVersion)
Parameters
Parameter |
Description |
lpszBuffer |
Address of buffer to store version identifier string, or NULL if not required. BufLenLength of buffer (including space for terminating null) |
lpusVersion |
Address of unsigned short integer variable used to return the version number of the API routines, or NULL if not required. |
Description
This routine gets a version identifier for the API routines. The version identifier is 20 characters or fewer (generally about 5 characters plus terminating null), and may be used when displaying the version number an application program.
The numeric version number will allow future programs to detect when they are running with an older version of the API. This is currently set to 0x600 (hex) - it is recommended that programs do not object if this number is higher than expected to allow for future updates to the API without the need to rebuild the programs.
Return value
The routine returns 0 if successful, otherwise one of the following:
ZFERR_BUFFER_TOO_SMALL
Example
#include <stdio.h>
#include <zfapi.h>
...
char szVersion[20+1];
unsigned short usVersion;
printf("Automatic invoicing program v2.27\n");
if (ZfxGetAPIVersion(szVersion, sizeof(szVersion), &usVersion) == 0)
{
printf("Zetafax API version %s\n", szVersion);
}
Related topics