Vendor-Specified Custom Extended Fingerprint of a System

RMS provides the capability of having a vendor-specified extended 64-byte fingerprint along with the standard fingerprints of machine.

Executables Need to be Rebuilt

> In case of standalone licensing (application linked with the standalone library or the integrated library), the client application needs to be rebuild.

>In case of network licensing, the License Manager executable needs to be rebuild only if the licenses are server-locked and the client application needs to be rebuild only if the licenses are client-locked.

>The command-line utility to obtain the system fingerprints (echoid).

>Windows-based graphical utility to obtain the system fingerprints (Wechoid)

Description

For server locked licenses, locking is verified at the time of loading/adding licenses to License Manager, while for client locked licenses, locking is verified at the time of request. Apart from the standard fingerprint of machine, you can lock licenses on some kind of hardware device (dongle) or software-based implementation to generate a unique extended custom value for each machine. You have to implement a function that will be used for generating the customized fingerprint in extended format (64-byte value) and that needs to be registered using the VLSsetCustomExFunc function.

Function Prototype (of Extended Custom Lock Function) 

long GetCustomExValue
(
   VLScustomEx*     pCustomExTable,
   unsigned long* pulCount
);

This function can define multiple extended custom locking value and store it in individual element of VLScustomEx array. The maximum number allowed is VLS_MAX_CUSTOMEX_COUNT. Refer to lserv.h for its value.

Parameter

Description

pCustomExTable

An OUT parameter.

A pointer to the array of the VLScustomEx structure. If passed as NULL, then as an output pulCount will contain the required number of elements in array pointed by this parameter.

pulCount

An IN/OUT parameter.

A pointer to unsigned long that specifies the number of elements in the array pointed by the pCustomExTable parameter.

On input, the pulCount parameter of the extended custom function should specify the count of the VLScustomEx array pointed to by the pCustomExTable parameter. If the buffer is not large enough to hold the returned customEx fingerprint table, the function should set this parameter equal to the required count.

On output, the function should update the pulCount parameter value to specify the actual count of the VLScustomEx objects that are received through this custom function.

Returns 

>Returns LS_SUCCESS(0) on success.

>Returns non-zero on failure.

Steps to Perform

1. Create the extended custom lock function (for example, GetCustomExValue).

2.Update the CUSTOM_EX_LOCK_OBJS variable in the custom32.mak file.

3. Register the extended custom lock function on the License Manager.

4. Register the extended custom lock function on the client.

5. If the extended custom lock function name is different from “GetCustomExValue”, then update the function name in the following files after searching for the call of the VLSsetCustomExFunc function:

echomain.c (applicable to both Windows and UNIX)

wechoiddlg.cpp (applicable to Windows only)

6.Follow the build procedure specified in How to Use the custom32.mak File?.

Code Snippets

Create the Extended Custom Lock Function

long GetCustomExValue
(
   VLScustomEx*   pCustomExTable, /* OUT */
   unsigned long* pulCount        /* IN/OUT */
)
{
   if (pulCount == NULL)
   {
      return 1; /* non-zero to mark failure */
   }
   if ((*pulCount == 0) || (*pulCount > VLS_MAX_CUSTOMEX_COUNT))
   {
      return 1; /* non-zero to mark failure */
   }
   /* TODO: add the customized logic for generating extended custom value(s) or read from some device(s) */
   return 0;
}

Register the Extended Custom Lock Function on the License Manager

VLSsetCustomExFunc is used to register the function with the License Manager. This registration part needs to be done in the VLSserverVendorInitialize function.

#include "lserv.h"
extern long GetCustomExValue(VLScustomEx* pCustomExTable, unsigned long* pulCount);
LSERV_STATUS VLSserverVendorInitialize(void)
{
   VLSsetCustomExFunc(&GetCustomExValue);
   return LSERV_STATUS_SUCCESS;
}

Register the Extended Custom Lock Function on the Client

Here you need to call VLSsetCustomExFunc in the client application, in the similar way it was done in VLSserverVendorInitialize.

#include "lserv.h"
extern long GetCustomExValue(VLScustomEx* pCustomExTable, unsigned long* pulCount);
int main(int argc, char* argv[])
{
   VLSinitialize();
   VLSsetCustomExFunc(&GetCustomExValue);
   /* add the client application code here  */
   return 0;
}