Developer Reference Distributing ENCX Based Software

In order for your application to run on the end-users system you must redistribute the relevant ENCX components. This document describes what you need to do.

ENCX Components

Windows Installer Merge Module

If you are using the Windows Installer mechanism to distribute your application then the easiest way to redistribute the ENCX components is to use the supplied Merge Module. Use your installer creation tool (e.g. Installshield) to incorporate the merge module into you main installer (see the tools documentation for details on how to do this).

Your installer will now automatically perform all the steps necessary to setup ENCX on the target machine and will also correctly uninstall the ENCX components when the end-user uninstalls your application.

Manual Setup

If you are not using the Windows Installer mechanism to distribute your app (or just want to have control over what is going on) your installer can follow these steps to set up ENCX on your end-users system:

  1. Copy the file EncXCOM.dll to the target system
  2. Register EncXCOM.dll with regsvr32

To cleanly remove the ENCX components from the system follow these steps

  1. Unregister EncXCOM.dll by running 'regsvr32 /u EncXCOM.dll'
  2. Delete the EncXCOM.dll file

RegSvr32 has to be run as an administrator (e.g. from an administrator command prompt in Windows 7 UAC).


You will need to distribute the interop file Interop.ENCX.dll - this should sit alongside your .NET assembly.

Using .NET Controls

Ifyou are developing an application in a .NET language and you are using the .NET controls provided with the ENCX SDK then you need to redistribute the relevant assembly (ENCXControls.dll). Your installer needs to place this assembly in the same location as your executable on the target machine.

Advanced Use of .NET Controls

If you wish to use the ENCXControls.dll assembly in more than one application without installing a private copy alongside each then you can compile your own version from the supplied source code and give it a strong name using sn.exe (included with the .NET Framework SDK). This will allow you to install the assembly into the Global Assembly Cache. (See Working with Assemblies and the Global Assembly Cache on MSDN).

An alternative way of using the .NET Controls is to directly include their supplied source code into your project. This give you the flexibility to alter the controls if required and means there need not be a separate assembly to distribute.