LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Hide details for ContentContent
Getting started
Basic declaration conversion
Data and reference types
Editing reference type items
Ready-to-use samples
Show details for Online resourcesOnline resources
Happy readers




Hosted by Prominic.NET, Inc.
Main topic:

SECNABAddCertificate (by Michael Garcia, 04/09/2014 10:01:49 AM)

OK...figured this out

Declare Function SECNABAddCertificate Lib "nnotes.dll" Alias "SECNABAddCertificate" _

(ByVal hNote As Long, ByVal Cert As string, ByVal CertSize As Long, ByVal ReservedFlags As Long, ByVal pReserved As long) As Integer

Dim note As Long

Dim fp As integer

Dim certsize As Long

Dim cert As Variant

' get handle on the Notes document   

note = doc.handle


' open the cer file and read it into the buffer   

fp% = FreeFile()

Open fileName For Binary As fp%

certsize = FileLen(fileName)

cert = Input(certsize, fp%)


' call C API function to import the cert

importCert = SECNABAddCertificate(note, cert, certsize, 0, 0)


' close the cer file

Close fp%