Developer Reference Dongle Free Security

To get full functionality from ENCX you will need to use either a hardware dongle or a software dongle, this a security file that contains machine specific information. We call the security file mechanism "dongle free security" (DFS). It is a bit like the "activation" of operating systems that Microsoft uses.

To get a DFS file, you will need to supply us with the machine specific information. 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. See the sample Installation ID.

When you receive the file, you can call it whatever you like and store it wherever you deem appropriate. You specify the full path and file name when creating the Library object  instance. Once the dongle file is created, the application should automatically start using it.

Construct(OEMKey As String, DFSFilePath As String)

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 the sample.

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

DFSFileName

The default location for the DFS file is a typically tortuous Windows path and will vary from machine to machine, something like:

C:\Documents and Settings\All Users\Application Data\Chersoft\Common\Dongle8.bin

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.

Private libr As New EncXCOMLib.Library
...
libr.Construct(sOemKey, "c:\\program files\\myapp\dongle.dfs");
...

The system is designed to use dongle free security, so early on it tests whether or not the DFS file is valid.

If Not libr.ValidDFSFile Then
    ' give an error message
End If

Please also read about the dongle object.