To use CryptoSys PKI in VB.NET, you call .NET methods instead of VB6 functions.
In almost all cases, a VB6 function like FOO_Barbaz is replaced by the .NET method Foo.Barbaz.
The .NET methods generally have fewer parameters and different return values than the equivalent VB6 function.
Long types in VB6 must be changed to Integer in VB.NET.
Functions that in VB6 would have output to a pre-dimensioned string or byte array will return that string or byte array directly in VB.NET. For such methods in VB.NET, an error condition is indicated by returning an empty string or byte array.
VB6/VBA
ReDim abDigest(API_MAX_HASH_BYTES - 1) nRet = HASH_Bytes(abDigest(0), API_MAX_HASH_BYTES, abMessage(0), nMsgLen, API_HASH_MD5)
VB.NET
abDigest = Hash.BytesFromBytes(abMessage, HashAlgorithm.Md5)
All .NET methods in CryptoSys PKI are stateless and do not require the creation of an object. All are called in a one-off manner.