CryptoSys API Library Manual

"Hello world" programs

The equivalent of the "Hello world" program for CryptoSys API is to call the API_Version function. The function will demonstrate that the API is properly installed. Here is some example source code in VB6, C, C#, VB.NET and ASP, respectively.

Public Sub ShowVersion()
   Dim nRet As Long
   nRet = API_Version()
   Debug.Print "Version=" & nRet
End Sub
#include <stdio.h>
#include "diCryptoSys.h"
int main(void) 
{
   long version;
   version = API_Version();
   printf("Version=%ld\n", version);
   return 0;
}
using CryptoSysAPI;
static void ShowVersion()
{
   int ver;
   ver = General.Version();
   Console.WriteLine("Version={0}", ver);
}
Imports CryptoSysAPI	
Shared Sub ShowVersion()
   Dim ver As Integer
   ver = General.Version()
   Console.WriteLine("Version={0}", ver)
End Sub
<%
   Dim oGen
   Set oGen = Server.CreateObject("diCryptOCX.gen")
   Response.Write "Version=" & oGen.Version & Chr(13) & Chr(10)
%>

[Contents] [Index]

[HOME]   [NEXT: Common problems when encrypting...]

Copyright © 2001-10 D.I. Management Services Pty Ltd. All rights reserved.