To use the .NET interface with C# and VB.NET (VB2005/VB2008/VB200x):
diCrSysAPINet.dll library file into a convenient folder.diCrSysAPINet.dll.using CryptoSysAPI;
Imports CryptoSysAPI
to your code.
Alternatively, with C#, you can just include the source code module CryptoSysAPI.cs in your project
and there is no need to reference the class library DLL.
Note that you must also have the core Win32 (or X64) executable diCrPKI.dll installed on your system
for the .NET interface to work. If not, it will throw an exception immediately.
There are two different types of methods used in the .NET interface:-
We recommend that you use the static "one-off" methods unless you really have to deal with streaming data of unknown length.
For examples, see the test code TestAPIcsharp.cs and TestAPIvbnet.vb
provided in the distribution.
In older versions, we suggested using direct upgrades of the VB6 code in VB.NET with all the pre-dimensioning and other unsafe practices. The .NET Class Library interface is cleaner, safer and more convenient. If you are writing VB.NET code from scratch, please use the .NET Class Library interface. If you need to convert existing VB6 code, see Converting VB6 to VB.NET.