Developer Reference Dongle Free Security

To get full functionality from ENCX you will need to purchase either a hardware dongle or a software dongle to licence it. The software dongle is a security file that contains machine specific information. We call the security file mechanism "dongle free security" (DFS).

To get a DFS file, you will need to supply us with machine specific information from the PC where ENCX is to be used. The ENCX Library object property DFSInstallationId returns a string with this information. This string should be sent to Chersoft so that we can send you back a DFS file. Alternatively, you can run either of the two samples that demonstrate how to get the installation identifier.

When you receive the DFS file, the default location to place and name it is:

C:\ProgramData\Chersoft\Common\Dongle8.bin

Note that C:\ProgramData is a hidden folder so you may have to turn on View Hidden Items to view it in Windows, or just type the path in directly.

However, you can call the file whatever you like and store it wherever you deem appropriate. To do this, you specify the full path and file name when creating the Library object instance.

Construct(string oemKey, string dfsFilePath)

If more than one hardware change is made on the PC where the DFS file is used, then it is likely that a new DFS file will be needed. Encoded into the DFS file is a transaction identifier. If a new DFS file is needed then it is important that the old DFS file is left in place so that the DFSInstallationId function can obtain this transaction identifier and we can determine that the request is for a renewal rather than a new licence.

You will need dongles or DFS files for each developer and for each end-user of your application. It might therefore be useful to expose the value of DFSInstallationId in your application so that DFS files can be supplied to your end users. Alternatively you could write a small utility to give to your end users to obtain this information, maybe by modifying one of the samples.

For convenience you can find out the DFS file path from the Library object using the property

DFSFileName

You can also find out if the file is valid using the boolean property

ValidDFSFile

For this method to return true the file must both be present and understandable by the SDK.

Example of DFS use

An application starts up and creates its single instance of the Library object passing in a custom file name and path for the DFS file.

var lib = new ENCX.Library();
...
string oemKey = ""; // usually an empty string
string dfsFile = @"c:\yourfolder\yourDfsLicenceFile.dfs";
lib.Construct(oemKey, dfsFile);
...

Please also read about the dongle object.