/* $Id: api_check.c $ */

/* $Date: 2013-09-08 18:43:00 $ */

/* A simple program to display the CryptoSys API Details */

#include <stdio.h>
#include "diCryptoSys.h"

// Compiler-specific explicit link to library
// This works in old MSVC and Borland for LIB in current dir.
#if (defined(_MSC_VER) && _MSC_VER < 1400) || defined(__BORLANDC__)
#pragma comment(lib, ".\\diCryptoSys.lib")
#endif


int main()
{
	char compiled[255];
	char modname[FILENAME_MAX];
	long ver, lic;

	/* Get details from API */
	ver = API_Version();
	API_CompileTime(compiled, sizeof(compiled)-1);
	API_ModuleName(modname, sizeof(modname)-1, 0);
	lic = API_LicenceType(0);

	/* Display */
	printf("Version=%ld\nLicence Type=%c\nModule=%s\nCompiled=%s\n", 
		ver, (char)lic, modname, compiled);

	return 0;
}