CryptoSys PKI examples VB6 to VB.NET

PKI_ErrorLookup

Get a description of an error code.

VB6/VBA

Debug.Print "Testing PKI_ErrorLookup ..."
Dim nLen As Long
Dim nErrCode As Long
Dim strErrMsg As String * 128

nErrCode = 25
nLen = PKI_ErrorLookup(strErrMsg, Len(strErrMsg), nErrCode)
Debug.Print "ErrorLookup(" & nErrCode & ")=" & Left(strErrMsg, nLen)

Output

Testing PKI_ErrorLookup ...
ErrorLookup(25)=Certificate issuer error

VB.NET

Console.WriteLine("Testing PKI_ErrorLookup ...")
Dim nErrCode As Integer
Dim strErrMsg As String

nErrCode = 25
strErrMsg = General.ErrorLookup(nErrCode)
Console.WriteLine("ErrorLookup(" & nErrCode & ")=" & strErrMsg)

[Contents]

[HOME]   [NEXT: PKI_LicenceType...]

Copyright © 2010-20 D.I. Management Services Pty Ltd. All rights reserved.