/* $Id: PKICheck.c $ */
/* A simple Windows program to display the CryptoSys PKI Details */
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <windows.h>
#include "diCrPKI.h"
// Compiler-specific explicit link to library
// This works in MSVC and Borland for LIB file in the current dir.
#pragma comment(lib, ".\\diCrPKI.lib")
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
char msg[2048];
char compiled[255];
char modname[MAX_PATH];
long ver, lic;
/* Get details from PKI */
ver = PKI_Version(NULL, NULL);
PKI_CompileTime(compiled, sizeof(compiled)-1);
PKI_ModuleName(modname, sizeof(modname)-1, 0);
lic = PKI_LicenceType(0);
/* Compose into a string */
wsprintf(msg, "Version=%ld\r\nLicence Type=%c\r\nModule=%s\r\nCompiled=%s",
ver, lic, modname, compiled);
/* Display */
MessageBox(NULL, msg, "CryptoSys PKI Check", 0);
return 0;
}