Loading of Aloaha CSP API
As mentioned before we will use the "in process" modell for our samples. The OOP model is identically except the object name itself.
After creating the object the function info should be called an a value > 0 should be returned.
For example:
On Error Resume Next
Dim ACSP
Set ACSP = CreateObject("AloahaCSPCore.provider")
If ACSP.info>0 Then
If err.number=0 Then
MsgBox "Aloaha CSP API loaded"
End If
End If
Set ACSP = nothing
Disconnect
To disconnect all card readers and flush the internal caches please call the disconnect function.
Collecting Information
Property CertificateTypesAvailable
Currently Aloaha supports 3 different Certificate Types.
0 = Non Repudiation Certificate
1 = Signature / Authentication Certificate
2 = Encryption Certificate.
Currently the property CertificateTypesAvailable will always return 3. In case in future more types are being introduced that can be validated with this property.
Property CSP_License
This property signals if the CSP and/or CSP API are running in licensed or non licensed mode.
Property Readers
This property returns the number of readers connected to the system.
Property ReaderName
This property maps a reader number to a clear text reader name. For example: ReaderName = ACSP.ReaderName(1) will return the name of the first connected smart card reader.
Sample
Dim ACSP
dim loaded
Set ACSP = CreateObject("AloahaCSPCore.provider")
loaded = false
If ACSP.info>0 Then
If err.number=0 Then
loaded = true
End If
End If
if loaded = true and ACSP.readers>0 then
for i = 0 to ACSP.readers - 1
msgbox ACSP.readername(i)
next
end if
Set ACSP = nothing
Aloaha Software / Knowledge Base / Smart Card API / Aloaha CSP API / Loading of CSP API