0% found this document useful (0 votes)
19 views22 pages

RLM-EZ Reference

The RLM-EZ Reference Manual provides a comprehensive guide for using RLM-EZ, a licensing technology for software publishers, including quick-start instructions for Windows, Linux, and Mac. It covers integration into products, creating licenses, and utilizing the RLM-EZ API, with specific sections for .NET and Java applications. The manual also includes appendices with example programs and additional resources for developers.

Uploaded by

djmacross7022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views22 pages

RLM-EZ Reference

The RLM-EZ Reference Manual provides a comprehensive guide for using RLM-EZ, a licensing technology for software publishers, including quick-start instructions for Windows, Linux, and Mac. It covers integration into products, creating licenses, and utilizing the RLM-EZ API, with specific sections for .NET and Java applications. The manual also includes appendices with example programs and additional resources for developers.

Uploaded by

djmacross7022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

RLM-EZ Reference Manual

RLM-EZ v11.1

July, 2015
Contents

Welcome .......................................................................................... 3
Get Started Now – RLM-EZ Quick-Start Guide ........................ 4
Quick-Start on Windows ............................................................... 5
Quick-Start on Linux or Mac........................................................ 7
Integrating RLM-EZ Into Your Product .................................... 8
Using RLM-EZ with .NET ................................................. 10
Using RLM-EZ with Java ................................................... 11
Making Your Product Production-Ready .................................. 13
Creating Licenses .......................................................................... 15
RLM-EZ API ................................................................................. 16

Appendix A – RLM-EZ Example Client Program ..................... 17


Appendix B – RLM-EZ Kit Contents .......................................... 19
Appendix C – RLM-EZ Hostids ................................................... 20
Appendix D – Using RLM-EZ with Visual Studio ..................... 21

RLM-EZ Documentation - Copyright (C) 2006-2015, Reprise Software, Inc

RLM-EZ - Copyright (C) 2006-2015 Reprise Software, Inc

Reprise License Manager TM


Copyright © 2006-2015, Reprise Software, Inc. All rights reserved.

Detached Demo, Open Usage, Reprise License Manager, RLM, RLM-EZ, RLM-Embedded and Transparent License
Policy are all trademarks of Reprise Software, Inc.

FLEXlm is a registered trademarks of Macrovision Corporation.

RLM-EZ contains software developed by the OpenSSL Project for use in the OpenSSL Toolkit
(http://www.openssl.org)

The rlmid options contain copyrighted materials as follows:


 rlmid1 devices are manufactured by SafeNet, Inc.

RLM-EZ Reference Manual Page 2 of 22


Welcome
Welcome to the RLM-EZ, the newest licensing technology brought to you by the team who
developed RLMTM and FLEXlm ®

About this Manual


This manual, the RLM-EZ Reference Manual, contains the step-by-step guide to get you starting
using RLM-EZ to license your product. When you have finished this guide, you will have run
sample licensed applications as well integrated RLM-EZ into your own application (if you choose
to do so).

Introduction To RLM-EZ
RLM-EZ allows you, the software publisher, to flexibly price and license your product(s) for
delivery to your customers. RLM-EZ allows you to deliver fixed (node-locked) licenses to your
customers, with version control and expiration dates. If you need more functionality, Reprise also
offers RLM (a full-function network license manager), and RLM-Embedded (a node-locking
license manager with a richer set of capabilities).

RLM-EZ Reference Manual Page 3 of 22


Get Started Now – RLM-EZ Quick-Start Guide
To get you started as quickly and easily as possible with RLM-EZ, we will first use the binaries
on the kit. After you are familiar with the basic operation of RLM-EZ, you can integrate the
RLM-EZ calls into your application.
To start, we will download the kit, then the next 2 chapters will give detailed directions to try out
various licensing operations on Windows and Unix/Mac systems.
By the end, you will have checked out a license using the demo program. First, we download the
kit (this chapter). Then in the next 2 chapters, Step 1 extracts the kit and step 2 demonstrates
nodelocked licenses.

Download the RLM-EZ kit from the Reprise website

To download RLM-EZ, go to the Reprise Website Download area, enter your username and
password, and select the kit(s) you want to download. Save this on your system.

Note: When downloading Unix or Mac kits using Internet Explorer on Windows XP systems, the
files are incorrectly named as 'platform.tar.tar', rather than 'platform.tar.gz', once downloaded.
This is a browser issue - after transfer, please rename the file before installation.

Each kit has a descriptive name on the website. The file names of the kits follow Reprise
Software's platform naming conventions with ".tar.gz" on Unix and Mac platforms. On windows,
the kits are self-installing .exe files. Some examples are listed here.

Platform
Platform Kit file name
Name
Linux on Intel X86 x86_l2 x86_l2.tar.gz
Linux on Intel (64-bit) x64_l1 x64_l1.tar.gz
Mac on Intel X86 (32-bit) x86_m1 x86_m1.tar.gz
Mac on Intel (64-bit) x64_m1 x64_m1.tar.gz
Mac on PPC ppc_m1 ppc_m1.tar.gz
RLM-EZ.v11.1BL2-
Windows on Intel X86 (visual C v6, 2003) x86_w1
x86_w1.exe
RLM-EZ.v11.1BL2-
Windows on Intel X86 (visual C 2005, 2008) x86_w2
x86_w2.exe
RLM-EZ.v11.1BL2-
Windows on Intel X86 (visual C 2010, 2012) x86_w3
x86_w3.exe
RLM-EZ.v11.1BL2-
Windows 64-bit on intel (Visual C 2005, 2008) x64_w2
x64_w2.exe
RLM-EZ.v11.1BL2-
Windows 64-bit on intel (Visual C 2010, 2012) x64_w3
x64_w3.exe

RLM-EZ Reference Manual Page 4 of 22


Quick-Start on Windows
1. Extract the kit files:
On Windows, run the installer from the .exe file you downloaded. The RLM-EZ files will be
installed into the folder you selected (My Documents\Reprise\RLM-EZ.v11.1BL2-x86_w1 by
default for the x86_w1 kit for RLM-EZ v11.1BL2).
2. Build the kit:
You have 2 options for configuring RLM-EZ on Windows - you can either use a Visual Studio or
Visual C++ Project, or a Command Window. Each method has the same outputs; choose the
method you’re more comfortable with. The Visual Studio Project instructions are contained in
Appendix D – Using RLM-EZ with Visual Studio on page 21.

You should note that you need the Microsoft Visual C development tools in order to configure the
RLM kit. This is necessary to build your public/private key pair. The 32-bit version of the Visual
Studio kit is available for free here: http://www.visualstudio.com/en-US/products/visual-studio-
express-vs

To build using a Command Window:

1. Create a command window with the Visual C++ environment set up

To launch a Command Window with the development environment already set up, use
one of the options in the:

Start->All Programs->Microsoft Visual Studio 200x->Visual Studio Tools

menu. The options differ with the specific version and edition of Visual Studio, but
choose the one that does native development for the platform you're on. In other words, if
you're on a 32-bit system, choose the option that does 32-bit development, and if you're
on a 64-bit system, choose the options that does 64-bit development. This correct choice
may not always be clear from the names of the options, but the command window that's
launched will display a message at the top saying:

"Setting environment for using Microsoft Visual Studio 200x x86 tools."
or
"Setting environment for using Microsoft Visual Studio 200x x64 tools."

so you'll know if you've chosen the correct one.

If you are using older Visual C compilers and your system doesn't have the Visual Studio
environment set for command line use, you need to run a batch file provided by
Microsoft to set up your command window for the next step. For 32-bit builds, the batch
file to run is "vcvars32.bat"; for 64-bit builds it is "vcvarsamd64.bat". The location of
these batch files is under "Program Files\Microsoft Visual Studio". When you have set
this up, open a command window.

2. cd to the platform directory of the SDK, for example


cd x86_w3

RLM-EZ Reference Manual Page 5 of 22


3. Type nmake:
nmake

3. Create a license
% ezlicense example.lic any

This command creates the license file “example.lic” for hostid “any”, meaning that it will
work anywhere. No expiration date is specified.

4. Run the example program


Run the ezclient program to check out a *demo-only* license. Run ezclient as follows:
% ezclient

The license you just checked out looks like this (this license is in the file example.lic):

LICENSE rlmez *demo-only* 1.0 permanent 0 hostid=any sig=...

Congratulations! You have now created a license and checked out that license in the example
program. There's not much more to it than that. Now, you are ready to integrate the RLM-EZ calls
into your application and try it out. You can browse the example code in ezclient.c on the kit (the
example application is also located in Appendix A – RLM-EZ Example Client Program, on page
17.)

RLM-EZ Reference Manual Page 6 of 22


Quick-Start on Linux or Mac
1. Extract the kit files:

Use gunzip/tar to extract the archive:


% gunzip platform.tar.gz
% tar xvf platform.tar

2. Install the kit and build the example program:


First, change directory to the place where you extracted the kit. Next, execute the following
command:
% make

3. Create a license
% ezlicense example.lic any

4. Run the example program


Run the ezclient program to check out a test2 license. Run ezclient as follows:
% ezclient test2

The license you just checked out looks like this (this license is in the file example.lic):

LICENSE rlmez *demo-only* 1.0 permanent 0 hostid=any sig=...

Congratulations! You have now created a license and checked out that license in the example
program. There's not much more to it than that. Now, you are ready to integrate the RLM-EZ calls
into your application and try it out. You can browse the example code in ezclient.c on the kit (the
example application is also located in Appendix A – RLM-EZ Example Client Program, on page
17).

RLM-EZ Reference Manual Page 7 of 22


Integrating RLM-EZ Into Your Product
If you would like to integrate RLM-EZ into your own product, you will need to configure the
RLM-EZ libraries and add calls to the RLM-EZ functions in your software.
If your application is written in Java, you should read this chapter to familiarize yourself with the
basic RLM-EZ concepts. There are some Java-specific installation and integration instructions at
the end of this chapter If you have a .NET application, you will find instructions for integrating
RLM-EZ at the end of this chapter as well.
Reprise Software recommends that you take a look at the ezclient.c sample program in the RLM-
EZ kit directory. This example shows the use of the four functions in the RLM-EZ API. This
example program is also contained in Appendix A of this document.

The game plan


As a software publisher you integrate RLM-EZ by adding calls from the RLM-EZ client library
into your application. You then ship your product plus the license file (a text description of the
license rights) to your customer. You can accomplish the engineering portions of these tasks in an
hour or two – the hardest work is deciding what to license, and what license rights to grant to your
customers. Once you integrate RLM-EZ, the additional components you ship are:

 a license file to describe your customer’s rights to the product (custom-generated by you
for each of your customers)
 the rlm-ez utility rlmhostid – this utility prints the host ID of any supported computer.

Except for the license file, the components are the same for every one of your customers. The
actual license file, which describes your customer’s rights to the product, will (in almost all cases)
be different for every one of your customers.
Given that background, now we are ready to start.

Integrating RLM-EZ into your application – the 3 steps


To integrate RLM into your software, there are three steps:
1. Download and install the kit from the Reprise website
2. Configure your RLM-EZ libraries
3. Add RLM-EZ API calls to your application
The first two steps were done in the quick-start guide for your platform, above. The last step is
described here.

Add RLM API calls to your application

Using the example ezclient.c as a guide, add the RLM api calls to your application. You will
need an rlmez_checkout() call at a bare minimum.

RLM-EZ Reference Manual Page 8 of 22


Once you have done this, compile your application using the RLM-EZ include files in the kit
directory, and link with the RLM-EZ client library. The makefile target ezclient (ezclient.exe) is a
good guide for how to build your application.

You're done! Now that your application has been built with the RLM-EZ calls included, use the
ezlicense utility to create the license file, and experiment with some different licenses. Don't
forget to read the note on your public-private key pair below.

An important note on your public-private key pair


The makefile created a public-private key pair for you as part of the make (or nmake)
command, or build in Visual Studio. Before you use RLM-EZ in your product, you need to
create a public-private key pair that you will use for all your licenses, and you should do
this only one time. The key pair will affect the licenses you create, and you want to be able
to process older license keys with newer versions of your software. Note that you should do
this once, not once per platform you install.

You can safely ignore the remainder of this note for now, but you should return to this and
understand the implications before you begin your RLM-EZ production implementation.

To create your key pair, run the rlmgenkeys utility. rlmgenkeys creates a pair of files:
 rlmpubkey.c - your public key - this gets built into your application
 rlmprivkey.c - your private key - this gets built into ezlicense to create your license
keys

To run rlmgenkeys:
% cd kit-dir
% ./rlmgenkeys

Where:

 kit-dir is the directory where the RLM-EZ kit resides, and

You should run rlmgenkeys once and copy the resulting files to all the other kit directories
you use. Once you have created your key pair and installed it in the kit directories in all your
RLM-EZ kits, do a "make" in each kit to update the rlmez.a library.

You should be very careful with these two files. DO NOT LOSE THEM. Do not allow
your private key file (or ezlicense) outside your company. If your private key file (or
ezlicense) becomes compromised, others will be able to make licenses for your products.
Once you generate these files, you should copy them to a safe place where they will not be
lost, and where they will be secure.

When you upgrade to a newer version of RLM-EZ, you will be asked for the location of
these two files, so that the new version will generate compatible keys with your older
versions.

RLM-EZ Reference Manual Page 9 of 22


Using RLM-EZ with .NET
RLM-EZ provides a solution for .NET developers who want to use RLM-EZ to license their
applications. It consists of a simple Interop layer that defines the RLM-EZ functions in .NET
terms, and a DLL containing the native code. Here is the high-level overview of how to use this
capability:
 Install, configure and build the RLM-EZ SDK. This provides the actual RLM-EZ code
packaged in a DLL.
 Build the CS project <platform>.csproj in the dotnet folder on the SDK, where
<platform> is the RLM-EZ plaform you are buildig (e.g., x64_w2)
 Add calls to the RLM methods to the .NET application to be licensed.

Building the RLM .NET package

If you have VS2005 or later, simply double click on dotnet\Reprise\Reprise.sln to open the project
in Visual Studio, then build the project. You can build Debug or Release or both. If you have a
prior version of Visual Studio, then create a project for the RLM .NET code manually, copy
dotnet\Reprise\Reprise\RLMInterop.cs into it, and build.

Running the Example Program

The example program expects the example license file from the SDK (example.lic) to be correctly
signed and to be available. The example program will check out v1.0 of the license "test1". Here
are the steps to run the example program::
 Open dotnet\RLMTest\RLMTest.sln in Visual Studio 2005 or later. If you have an earlier
version of Visual Studio, create a new project for RLMTest, as described above for
Reprise.
 Build the project, either Release or Debug or both, but in the same configuration(s) as
you built the Reprise project.
 Copy rlmVVVV.dll, which contains the actual RLM code, from your platform folder
(x86_w2 or x64_w2) to some folder which is on your PATH, so that it can be found at
runtime by the application. (Note: VVVV signifies the RLM version, such as 943 for
9.4BL3 or 1002 for 10.0BL2)
 Copy example.lic, which is the signed license file, from your platform folder (x86_w2 or
x64_w2) to the same folder containing the application.
 Run the application. It opens a command window for it's output, which will look like this
if it runs successfully:

rlm_init successful
hostid of this machine is <your machine's hostid>

test1
version 1.0
expiration permanent
test2
version 1.0
expiration permanent
test3
version 1.0
expiration permanent
rlm_license_center
version 7.0
expiration permanent
rlm_act_admin
version 7.0
expiration permanent
rlm_act_view

RLM-EZ Reference Manual Page 10 of 22


version 7.0
expiration permanent
rlm_gen_license
version 7.0
expiration permanent
rlm_roam
version 1.0
expiration permanent
checkout of test1 OK
attributes of test1
expiration: permanent
days until expiration: 0
checkout of not_there failed: License server does not support this product
(-18)

If the checkout of test1 fails, it is likely that rlmezVVVV.dll cannot be found.

Integrating RLM .NET into your Application


Include a:

using Reprise;

statement with any classes that invoke RLM-EZ, and precede RLM-EZ function names and
constants with "RLM.", for example, "RLM.rlmez_checkout". See the example program
RLMTest.cs for an example.

You will need to include a reference to RLM in your application's project. The object to reference
is: <platform>\Reprise\Reprise\bin\<Debug or Release>\Reprise.dll

Using RLM-EZ with Java

RLM-EZ Java is number of Java classes presenting an object interface to underlying native code.
The actual work in RLM-EZ Java is done by platform-dependent code accessed via the Java
Native Interface (JNI). As such, RLM-EZ Java requires that a non-Java RLM-EZ kit be installed
and configured before RLM-EZ Java can be used. The functionality available to a Java program is
the same as that available to a C program. The RLM-EZ Java API is completely documented in
Javadoc. Open doc/index.html with a browser to access that documentation.

If you would like to see the Java interface in action, follow these steps, after installing RLM-EZ:

On Linux or Mac systems:

 In the main RLM-EZ kit directory, run "make shared". This builds the shared object
necessary for supporting RLM-EZ Java. The name of the shared object is
rlmez<ver>.<shared>, where:

<ver> is the major and minor version numbers and the build level.
<shared> is the file type of a shared library. This is "so" on linux and “jnilib” on Mac.
For example, in RLM-EZ version 11.0BL2 on a Linux system the name would be
"rlmez1102.so"; on Mac it would be "rlmez1102.jnilib".

 Perform these steps:

RLM-EZ Reference Manual Page 11 of 22


% cd java
% ./INSTALL

 Set the environment variable that lets the Java VM find the native library:

On Mac: [export | setenv | etc] DYLD_LIBRARY_PATH[=]`pwd`


All others: [export | setenv | etc] LD_LIBRARY_PATH[=]`pwd`

 Run the example Java program:

% make runclient
This program, whose source code is in the java_unix directory, checks out a
license and keeps it checked out until you hit enter.

On Windows systems:

 Go into the java directory and configure the makefile if necessary. The makefile as
shipped refers to the x86_w2 sibling directory. If you are running on a different Windows
platform, edit the makefile and change the definition of "NATIVE_PLATFORM" to
match the platform you're on. For example, if using 32-bit VC2010, change it to read:

NATIVE_PLATFORM = x86_w3

 Run the example Java program:

> nmake runclient

This program, whose source code is in the java directory, checks out a license
and keeps it checked out until you hit enter.

RLM-EZ Reference Manual Page 12 of 22


Making Your Product Production-Ready
You now know how to integrate RLM-EZ into your product. This chapter describes
considerations for a good RLM-EZ implementation.
If you are evaluating RLM-EZ, you can skip this chapter for now. You will want to return to it
later for guidance on how to make your product ready to ship.

Productizing your licensing implementation


In order to make your license management production-ready, there are 4 main steps:
1. Decide on your Licensing Strategy
2. Configure your RLM-EZ libraries with your permanent options
3. Package your software for shipment
4. Prepare to create licenses for your customers
These steps are described in the following sections.

 Step 1: Decide on your Licensing Strategy

RLM-EZ allows you to request and release licenses for products. The license for a product has
certain attributes, which are described in the license grant itself (which is contained in the license
file). The most basic license attributes are:
 Product name (you pick this when you purchase RLM-EZ)
 Highest Version supported
 The node identification, since all licenses are node-locked.
 Expiration date

Before you purchase RLM-EZ, you must decide which products you wish to license and select the
product names for the licenses, since the product name is included in your RLM-EZ license keys
from Reprise Software. It is generally recommended that you choose names that correspond very
closely to the name which your customer purchases - it makes license administration much more
straightforward for your customers if the name of the product in the license is the same as what
they purchased. Note that the product name must be less than 40 characters.

In addition, each license request will specify a version. The two main strategies for selecting
versions are either (a) make the version number match the major version of your software, in
which case a new license would be required by your customers for each major release of your
product or (b) only change the version in the license request occasionally, when you want to force
your customers to purchase a new license.

So, before you start to integrate the code into your application, you should decide:
 Where do you want to request the license
 What is the name of the license
 What license version to request

RLM-EZ Reference Manual Page 13 of 22


(Note: There is more information about these issues in the chapter on Creating Licenses.)

Generally, the first two decisions will stay the same over the life of the software product, while
you will update the license checkout version from time to time.

 Step 2: Configure your RLM-EZ libraries with your permanent options

There are 2 configuration items you must complete before you build your RLM-EZ kit:

 Install your permanent RLM-EZ license into ez.c


 Create your public/private key pair, which is done one time only (See the note in the last
chapter.)

To install your RLM-EZ license, edit the file src/license_to_run.h, using the parameters you
received in the email from Reprise Software.

Your applications are built from components supplied by Reprise Software. You need to provide
only one custom input for the build - your Public Key Pair, for license key verification –
rlm_pubkey.c and rlm_privkey.c.

rlm_pubkey.c and rlm_privkey.c are created by the rlmgenkeys utility. You should run this only
once to create your public/private key pair. Once you create these files, save them - if you lose one
of these files, you will no longer be able to generate license keys compatible with older versions of
your software.

Once you have created these 2 files you update your RLM-EZ library by typing "make" in the kit
directory, and you are ready to link your applications with the RLM-EZ libraries.

 Step 3: Package your software for shipment

With RLM-EZ, you specify nearly all licensing options in the actual license that you ship to your
customers. However, there are a few issues that you need to consider before you ship your
application:
 Review the RLM-EZ API calls you make in your application to be sure that you use
product names that are suitable (we strongly recommend using the name of the product that is
in general use), and that the version numbers are correct. If you intend for your customers to
be able to use old licenses from your product, be sure that the version number in the
rlmez_checkout() call is appropriate.
 If we have provided you with special debug libraries, make sure you use the non-debug
libraries from the standard kit for your release.
 Review the Best Practices for RLM-EZ Integration section and ensure that your product
and installation are well-behaved.

 Step 4: Prepare to create licenses for your customers


You will want a system in place to fulfill licenses for your customers before you ship your
product. Review the Creating Licenses chapter on page 15 to chose the way you will do your
license fulfillment.

RLM-EZ Reference Manual Page 14 of 22


Creating Licenses

When you ship your product to your customers, it will require a license to run. Generally, you
want to grant different license rights to each customer. In order to do that, you create a unique
license file for each customer.
The license file consists of lines of readable text which describe the actual license grants to your
customers – the product name, version, expiration date, and licensed machine (hostid).
You create and ship licenses using the standard ezlicense utility.

ezlicense – the standard License creation tool


RLM-EZ is shipped with a license creation tool called ezlicense which can be integrated into your
fulfillment process. This tool creates a license file with the correct license key based on it's
command line input. This license key authorizes the license and prevents tampering with the
license parameters.

Using ezlicense:

ezlicense filename hostid [-v version] [-e expiration-date]

ezlicense creates a (or appends to an existing) license file named “filename” which will operate on
the machine with hostid hostid. Optionally, you can specify a required version and a license
expiration-date. For a list of RLM hostids, see Appendix C – RLM-EZ Hostids on page 20.
Example:
ezlicense a.lic 12345678 -e 1-jan-2017
This command would produce a license file similar to the following:

LICENSE rlmez prod-name 1.0 1-jan-2017 uncounted hostid=12345678


_ck=bc1efceeee sig=".....................................”

Note: the expiration date is of the form: dd-mmm-yyyy. Months are jan, feb, mar, apr, may, jun, jul, aug,
sep, oct, nov, dec.

RLM-EZ Reference Manual Page 15 of 22


RLM-EZ API
This chapter describes the 4 RLM-EZ API calls.

For all calls:


#include “rlmez.h”

Request a license - rlmez_checkout()


int rlmez_checkout(char *ver, int *days)
This call requests a license of version “ver”. If successful, the returned status is 0, and
the # of days until license expiration is returned in the parameter “days”. If unsuccessful,
a non-zero status is returned.

Generate printable error string - rlmez_errstring()


char *rlmez_errstring(int stat, char *string)
This call takes the status return (“stat”) from any other RLM-EZ API call, and returns a
string corresponding to the error. The string space should be allocated by the caller, with
a size of RLM_ERRSTRING_MAX bytes, and passed as the 2nd parameter.
rlmez_errstring() fills in the string, and returns a pointer to the string as it's return value.

Install demo license - rlmez_demo()


int rlmez_demo(char *ver, int days)
This call installs a demo license for version “ver” valid for “days” days on the machine
where it is running.

Remove demo license - rlmez_demox()


int rlmez_demox(char *ver)
This call removes the demo license for version “ver” on the machine where it is running.

RLM-EZ Reference Manual Page 16 of 22


Appendix A – RLM-EZ Example Client Program
This example program (ezclient.c) is contained on the RLM-EZ kit. Use this as an example of how to use
the RLM-EZ API calls.

/******************************************************************************

COPYRIGHT (c) 2005, 2015 by Reprise Software, Inc.


This software has been provided pursuant to a License Agreement
containing restrictions on its use. This software contains
valuable trade secrets and proprietary information of
Reprise Software Inc and is protected by law. It may not be
copied or distributed in any form or medium, disclosed to third
parties, reverse engineered or used in any manner not provided
for in said License Agreement except with the prior written
authorization from Reprise Software Inc.

*****************************************************************************/
/*
* Description: Test client for RLM-EZ
*
* Parameters: None
*
* Return: None
*
* M. Christiano
* 11/27/05
*
*/

#include "rlmez.h"
#include <stdio.h>

int
main(int argc, char *argv[])
{
int stat, days;
char *ver = "1.0";
char resp[100];
char errstring[RLM_ERRSTRING_MAX];

stat = rlmez_checkout(ver, &days);


if (stat)
{
if (stat == RLM_EH_EVAL_EXPIRED)
{
printf("Your RLM-ez evaluation has expired.\n");
return(stat);
}
printf("checkout failed, status: %d: %s\n", stat,
rlmez_errstring(stat, errstring));
printf("do you want to install a 10-day-demo? : ");
fgets(resp, RLM_MAX_LINE, stdin);
if (*resp == 'y' || *resp == 'Y')
{
stat = rlmez_demo(ver, 10);
/*
* You don't want to do this in your real code,
* but if you re-build the kit and create a new
* public/private key pair, any old demo licenses
* will become unreadable. So for the sake of the
* demo, we remove the demo file if it exists, and
RLM-EZ Reference Manual Page 17 of 22
* re-create it.
*/
if ((stat == RLM_EH_DEMOEXISTS))
{
stat = rlmez_demox(ver);
if (!stat)
stat = rlmez_demo(ver, 10);
if (stat)
{
printf("ERROR: demo already exists\n");
return(stat);
}
}
else if (stat == RLM_EH_UNLICENSED)
{
printf("Demo cannot be installed from RLM-EZ-FREE\n");
}
else
printf("status from demo installation: %d: %s\n",
stat, rlmez_errstring(stat, errstring));
}
}
else
{
printf("Checkout OK");
if (days == 0)
printf(", permanent license\n");
else if (days > 0)
printf(", days to expiration: %d\n", days-1);
}
return(0);
}

RLM-EZ Reference Manual Page 18 of 22


Appendix B – RLM-EZ Kit Contents
Each RLM-EZ kit (for a particular platform) is contained in a single directory, with a name
platform.ez, for example, x64_w1.ez

The RLM-EZ kit directory contains (before executing "make"):

File Contents
rlmez.h rlm include file
ez.c License for RLM-EZ itself
ezclient.c RLM-EZ example client program.
rlmez.lib (rlmez.a on unix) The RLM-EZ client library
RELEASE_NOTES Release notes for this version of RLM-EZ
rlmgenkeys.exe Utility program to generate public-Key pair
rlmhostid.exe Prints the hostid on any system
rlmid1.lib Windows only: rlmid1 support library
makefile Makefile
ezlicense.obj (.o on unix) main() function for ezlicense license generator
RLM-EZ.pdf This manual
VERSION RLM-EZ kit version information
Windows only: Visual Studio/Visual C++
x*_w2.vcproj, x86_w1.dsw
project for configuring the kit
Java, dotnet support:
Windows only: Visual Studio 2005 Project
Reprise
Directory for RLM .net support
Windows Only: Visual Studio 2005 Project
RLMTest
Directory for RLM .net Test program
java/doc Directory of Java HTML documentation
java/makefile Java Makefile
java/rlmVVRB.jar Java Library (VV=ver, R=rev, B=build)
java/RlmClient.java Example rlm application program
java/rlmjava.def JNI DLL exports (Windows only)
java/INSTALL Java kit installation script (Unix only)
java/VERSION RLM kit version information

RLM-EZ Reference Manual Page 19 of 22


Appendix C – RLM-EZ Hostids
RLM-EZ supports several different kinds of identification for various computing environments, as
well as some generic identification which are platform-independent.

RLM-EZ's host identification (hostid) types are:

hostid type meaning example Notes


ANY runs anywhere hostid=ANY
DEMO runs anywhere for a demo license hostid=DEMO
On Windows, the 32-bit
32-bit hostid, native on Unix, non
32 (or long) hostid=10ac0307 hostid is the Disk Serial
X86 based platforms
Number
ip (or
TCP/IP address hostid=ip=192.156.1.3 always printed as "ip="
internet)
disksn=WD-
disksn Disk hardware serial number Windows only
WX60AC946860
always printed without
ether Ethernet MAC address hostid=ether=00801935f2b5
leading "ether="
Dongles available from
rlmid1 RLM-supported hardware dongle rlmid1=ac9321b7 Reprise Software – contact
your salesman
user User name hostid=USER=joe
host Host name hostid=host=melody

To determine the hostid of a machine, use the hostid type from the table above as input to the
rlmhostid command:

rlmhostid hostid type

For example:

rlmhostid long
or
rlmhostid internet

Note: IP address hostids can contain the wildcard ('*') character in any position to indicate that any
value is accepted in that position.

RLM-EZ Reference Manual Page 20 of 22


Appendix D – Using RLM-EZ with Visual Studio

To build using Visual Studio/Visual C++:

1. The RLM-EZ folder contains Microsoft Visual Studio or Visual C++ project and
workspace files. Double-click on the appropriate file to launch Visual Studio/Visual C++.
In x86_w1, double-click on x86_w1.dsp. In x86_w2, double-click on x86_w2.vcproj. In
x64_w2, double-click on x64_w2.vcproj.

Platform File to double-click


x86_w1 x86_w1.dsp
x86_w2 x86_w2.vcproj
x64_w2 x64_w2.vcproj
x86_w3 x86_w3.vcproj
x64_w3 x64_w3.vcproj

2. When the development environment comes up, click on the Build menu and select
"Rebuild All" (Visual C++) or "Build Solution" (Visual Studio). When the build is done,
the output window should indicate 0 errors and warnings.

The Visual C++ project is based on Visual C++ v6, and the Visual Studio project on
Visual Studio 2005. If you’re using a later version of the development environment, it
will prompt you to allow it to convert the project to the later version. Allow it to do so,
then proceed.

3. In your project settings / properties in Visual Studio:

Under C/C++, add <RLM-EZ SDK path>\src to the Additional Include Directories
(where <RLM-EZ SDK Path> is the path to the installed RLM-EZ SDK)

Under the Link/Input/Additional Dependencies or Additional Library Path,


add <RLM-EZ SDK path>\<platform>\rlmclient.lib (where <platform> is
either x86_w1, x86_w2 or x64_w2, depending on whether the project is a 32-
or 64-bit project)

Under the Link Command Line or Project Options section, make sure the following
libraries are included:

• ws2_32.lib
• Advapi32.lib
• Gdi32.lib
• User32.lib
• winhttp.lib
• netapi32.lib
• kernel32.lib
• oldnames.lib
• shell32.lib
• libcmt.lib
RLM-EZ Reference Manual Page 21 of 22
Then you will be able to use RLM-EZ in your project without leaving the GUI.

NOTE for VC2008 users:

The libraries in the x86_w2 and x64_w2 builds are created with VC2005.
However, VC2008-compatible _md and _mdd variants are supplied. If you are using
VC2008 and will be building executables that link dynamically to the C run time library
(that is, you compile with /md or /mdd), you should put the VC2008-compatible libraries
in place before you configure the SDK. Perform the following steps in the x86_w2 and/or
x64_w2 folders:
1. Copy rlmclient_md.lib and rlmclient_mdd.lib to different names, in case you
ever need them later for VC2005 builds.
2. Rename rlmclient_md90.lib to rlmclient_md.lib
3. Rename rlmclient_mdd90.lib to rlmclient_mdd.lib

RLM-EZ Reference Manual Page 22 of 22

You might also like