Attribute VB_Name = "basMain" Option Explicit Public Sub Main() Debug.Print ("---------------------------------------------------------") Debug.Print ("PDFTron PDF Secure Test") Debug.Print ("Copyright (c) 2003-2008 PDFTron Systems Inc.") Debug.Print ("---------------------------------------------------------") Dim ret As Integer ret = PDFSecureInit("John Doe", "My Company", "my license key") ret = PDFSecureRun("-o ../TestOutput/test1 -s 128 -u secret ../../samples/TestFiles", ByVal 0&, ByVal 0&) If (ret = 0) Then Debug.Print ("Done [OK].") ElseIf (ret = PDFSECURE_ERR_DIRCREATE) Then Debug.Print ("ERROR: Creating the output file/directory.") ElseIf (ret = PDFSECURE_ERR_BADKEY) Then Debug.Print ("ERROR: Bad license key.") Else Debug.Print ("ERROR: Other error.") End If End Sub