For COM+ (i.e. with IIS) users click here.
One very important note is that the file, ConvertImage.EXE, is both an executable application AND an ActiveX component. Again, the file ConvertImage.EXE, can be ran as a stand alone executable as well as be referenced as a component within your development environment. There is only one installation for 'Convert Image'. ConvertImage.exe is installed in the Program Files folder of your operating system.
For Visual Basic users, simply make a reference to the ConvertImage.EXE application in the Tools\References menu item. Once done you now have access to the ConvertImage component. In other development environments such as VBA you may use something similar to the lines of code below to create an instance of the application object:
Dim oConvertAppObject as Object
Set oConvertAppObject = CreateObject("ConvertImage.clsConvertImage")
Directly below is some VBS (Visual Basic Script). You could put the following 3 lines in a text file, call it Test.VBS and give it a go:
set converter =
result = converter.DoCommandLine("/JE:\Jobs\Test.SII")
To download demonstration source code (VB6 and VB.NET) click the following links:
Here is some sample VB code illustrating its usage:
Public WithEvents objConvertApp As ConvertImage.clsConvertImage
Private Sub Command1_Click()
Dim lRetVal as Long
Set objConvertApp = New ConvertImage.clsConvertImage
objConvertApp.Key = "" ' Assign Key To the 'Final Key', given upon registration.
' Convert TestImage.BMP to Output.JPG.
lRetVal = objConvertApp.DoCommandLine("/sE:\In\TryMe.BMP /TE:\Out\Output.JPG /F2 /C1")
' Example of specifying a 'Conversion Job File'
lRetVal = objConvertApp.DoCommandLine("/JE:\Jobs\Test.SII")
If (lRetVal = 0) Then
Call MsgBox("Success", , "Automation Testing")
Set objConvertApp = Nothing
Sub objConvertApp_OnError(lErrorNumber As Long, sErrorString As String)
Call MsgBox("Error " & CStr(lErrorNumber) & " occurred. [" & sErrorString & "]")
' DoCommandLine() Return Values
' 0 = Success
' -1 = Shareware expired
' -2 = Command line string empty or invalid
' -3 = Missing required command line argument(s)
' -X = Some error occurred during the processing, create a log or use verbose switch for details
As you can see from the code above, the ActiveX simply wraps the command line feature. So, to learn what you can do with the ActiveX, please refer to the 'Using the Command Line' section of the 'Convert Image' users manual.
emulates doing the command line, but through the COM interface.
0 = Success
-1 = Shareware expired
-2 = Command line String empty or invalid
-3 = Missing required command line argument(s)
-X = Some error occurred during the processing, create a log or use verbose switch for details
OnError(lErrorNumber As Long, sErrorString As String)
When an error occurs
this event is triggered supplying both the error code and description.
This can be very helpful while troubleshooting and developing.