This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Knowledge Base
- :
- Add Vendor Defined Hostid Functionality to the C# Example
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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# ExampleSynopsis
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;
}
{
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
$(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.
No ratings