CherSoft Ltd www.chersoft.co.uk Home   About   Advantages   Developer Reference   Downloads   FAQ   Contact

ENCX and ENCXUDE Code Differences

By Andy Nibbs

Monday, June 01, 2009

This article no longer applies. We have simplified things.

ENCX and ENCXUDE now both use the same DLL. Whether you have ENCX or ENCXUDE is determined by the license you buy.

This makes it simpler to use a mixture of licenses - ENCXUDE is very simple for customers in US waters with access to NOAA charts (not encrypted) but ENCX is necessary for less enlightened places where they encrypt and charge for their chart data.

More about the change is here Changes for ENCX 1.8.x.x

 

ENCX UDE is a cut down version of the full ENCX library. It just works with unencrypted ENC data. That enables our customers to cover US waters without worrying about chart licensing.

I suggest to customers interested in ENCXUDE that they should evaluate ENCX because the API is the same - minus the chart licensing stuff. And you can download ENCX but you can't download ENCXUDE.

This article is to give a clearer explanation. Exactly how does the source code differ? And how do you turn an ENCX project into an ENCXUDE project?

I started with an ENCX sample, ripped some stuff out and did some renaming:

  1. I removed the references to the ENCX library and the EncXControls.dll.
  2. I added a reference to the ENCXUDE library and the EncXUDEControl.dll instead.
  3. I then removed all the dongle stuff - ENCXUDE doesn't need a dongle so there's no need to monitor it.
  4. I then did some renaming, replacing "ENCX" with "ENCXUDE" and similar for the control.

The difference of the code is below. The diffing tool used was the excellent DiffMerge from SourceGear. Click the link for a free download - highly recommended. 

(I've adjusted indents and clipped out some devstudio generated code that was identical in both files to make the differences stand out better and help it fit on the web page.)

Differences between ENCX and ENCXUDE implementation

Andrew Nibbs has developed software and managed projects for Chersoft for ten years. He specialises in C++ and does a bit of C#. He once wrote a Python script.

ENCX Home