Features  / 

DLL

Customizable
Automation

Integrate reaConverter Into Your Custom Solution Using DLL

reaConverter's full range of conversion and image editing options can now be included into your own customized software solution using the Dynamic Link Library (DLL) feature. This is mainly addressed to developers and proficient users and is designed for the Windows platform.

The DLL feature works similarly with the command-line interface, allowing developers to use reaConverter's functions via internal program calls.

Download reaConverter Pro with DLL

 

How does it work?

You can find reaconverterX.dll in reaConverter Pro program folder which can be used in any development environment that supports ActiveX.

DLL has only one function, which calls cons_rcp.exe
You need to specify 3 string properties:

  • Params = Parameters string for cons_rcp.exe (for example "-s \"C:\Path_to\input_file.jpg\" -o \"C:\Path_to\output_file.png\"")
  • Path = Path to reaConverter Pro program folder (for example "C:\Program Files (x86)\reaConverter 7 Pro")
  • Log = Path to text log file (for example "C:\Program Files (x86)\reaConverter 7 Pro\log.txt")

Result values:

0 - No errors
1 - Configuration file (cfg) is not found
2 - Actions file (act) is not found
3 - Not enough parameters
4 - Corresponds to the error message: cons_rcp.exe Internal error (1)
5 - Reserved
6 - Reserved
7 - There are no files to be converted. Or File list (lst) is not found
8 - Indicates that not all files have been converted

How to use reaConverter ActiveX component in Visual Studio:

  1. Start Visual Studio
  2. Create a new Application
  3. On the Project menu, click Add COM Reference...
  4. In the ListView control, double-click reaConverter and then click OK
  5. Visual Studio automatically creates a wrapper class for the ActiveX component
  6. In the Code window add the following code

C# example

reaConverter.Convert MyConverter = new reaConverter.Convert();
MyConverter.Log = "C:\\path_to_log_file.txt";
MyConverter.Params = "-s \"C:\\Path_to\\input_file.jpg\" -o \"C:\\Path_to\\output_file.png\"";
MyConverter.Path = "C:\\Program Files (x86)\\reaConverter 7 Pro";
MyConverter.Start();    
int Result = MyConverter.Result;

Visual Basic example

Dim MyConverter As reaConverter.Convert
MyConverter = New reaConverter.Convert
MyConverter.Path = "C:\Program Files (x86)\reaConverter 7 Pro"
MyConverter.Log = "C:\path_to_log_file.txt"
MyConverter.Params = "-s ""C:\Path_to\input_file.jpg"" -o ""C:\Path_to\output_file.png"""
MyConverter.Start()
Dim result As Integer
Result = MyConverter.Result

Delphi example

uses Vcl.OleAuto;
var
  MyConverter : OleVariant;
  result : Integer;
begin
  MyConverter := CreateOleObject('reaConverter.Convert');
  MyConverter.path := 'C:\Program Files (x86)\reaConverter 7 Pro';
  MyConverter.log := 'E:\path_to_log_file.txt';
  MyConverter.params := '-s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.png"';
  MyConverter.Start;
  Result:=MyConverter.Result;
end;

With further questions, please contact out technical support.