cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add Vendor Defined Hostid Functionality to the C# Example

Add Vendor Defined Hostid Functionality to the C# Example

Summary

Add Vendor Defined Hostid Functionality to the C# Example

Synopsis

This articles shows how to add Vendor Defined Hostid(VDH) functionality to the checkout call in the C# sample application.

Discussion

The C# Application is useful for demonstrating how to perform trusted storage activations from a C# application using a C DLL and also checking out licenses from a license server.
Through some modification of the sample, you should also be able to test a VDH checkout from a license file based license server.
To do this, perform the following:
1. Follow the steps in the Programming reference guide for license file based licensing to setup your Flexnet Publisher(FNP) toolkit for VDH
2. Add the x_flexlm_newid(); call to the lmgract.c source code, as below:
int WINAPI FNP_CreateJob()
{
if (lc_new_job(0, lc_new_job_arg2, &code, &lm_job))
{
return APICALL_FAILED;
}
x_flexlm_newid();
return APICALL_SUCCESS;
}
3. Add the a reference to the vendor_hostid.obj to the makefile.csharp file, as below:
$(LMGRACT): $(LMGRDACTSRC)\lmgract.def $(LMGRDACTSRC)\lmgract.c $(ACTLIB) $(LMNEW_OBJ) $(CLIENTLIB)
$(CC) $(CFLAGS) /I$(AAINCDIR) $(LMGRDACTSRC)\lmgract.c
$(LD) /def:"$(LMGRDACTSRC)\lmgract.def" /out:lmgract.dll lmgract.obj vendor_hostid.obj /implib:"lmgract.lib" /dll $(LMNEW_OBJ) \
lmgr$(SUFFIX).lib libsb$(SUFFIX).lib libcrvs$(SUFFIX).lib $(CLIENTLIB) \
$(ACTLIB) $(ACTINSTALLERLIB) $(XTRALIB)
$(PREPTOOL) -v $(LMGRDACTSRC)\lmgract.xml
if exist lmgract.obj del lmgract.obj
4. Build the csharp example and test with a license file that contains a hostid from the vendor_hostid.c source code.
Labels (1)
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Aug 22, 2012 10:02 AM
Updated by: