Last Modified February 4, 2020

Retrieving Information from the CDM License File

If a valid CDM License File exists, your Application can use the DNA_PARAM() API Call to retrieve information from the CDM license file to use in your implementation logic and/or display this information to the User when appropriate.

A valid CDM License file will exist following the succesfull execution of the following API calls (i.e. result <= 0 ):

  • DNA_Validate(), or any of its variants

  • DNA_Activate()

  • DNA_Reactivate()

For Floating Licenses, a "special" Floating CDM License file will exist after successful execution of the following API calls:

  • DNA_ProtectionOK() with Option 3

  • DNA_Deactivate()

DNA_PARAM() Overview and Examples

DNA_PARAM() will return the <Value> of the <Param> stored in the CDM License File

If <Param> does not exist in the CDM License File, then a <blank> value is returned.

VB.NET
C#.NET
JAVA

DNA_PARAM() returns a string with the value of <Param> or <BLANK>

For all other languages
API Result Description
0

the value of <Param> is returned in the parameter <Buffer>

1

An error occured with the API Call - likely an error with the parameter syntax

99

The size of the parameter <Buffer> is too small to store the value of the parameter.

The <Buffer> should be a buffer of 2,048 Bytes to accomodate all values

                	
						FUNCTION DNA_PARAM(PARAM,VALUE:PANSICHAR; VALUE_SIZE:INTEGER):INTEGER; STDCALL;
                    
                
                	
						PUBLIC FUNCTION DNA_PARAM(BYVAL PARAM AS STRING, BYREF VALUE AS STRING, BYVAL VALUE_SIZE AS INTEGER) AS INTEGER
                    
                
                	
						INT __STDCALL DNA_PARAM(CHAR *PARAM,CHAR *VALUE,INT VALUE_SIZE);
                    
                
                	
						INT __STDCALL DNA_PARAM(CHAR *PARAM,CHAR *VALUE,INT VALUE_SIZE);
                    
                
                	
						INT __STDCALL DNA_PARAM(CHAR *PARAM,CHAR *VALUE,INT VALUE_SIZE);
                    
                
                	
						PUBLIC NATIVE STRING DNAPARAM(STRING PARAM);
                    
                
                	
						PUBLIC FUNCTION DNA_PARAM(BYVAL PARAM AS STRING) AS STRING
                    
                
                	
						PUBLIC STATIC STRING DNA_PARAM(STRING PARAM)
                    
                
<PARAM> <VALUE>
ACTIVATION_CODE

<ACTIVATION_CODE> in the CDM

WEB_LINK

The <PRODUCT_TAG> in the CDM, as set in the Product Configuration

ACTIVATION_DATE

MM/DD/YYYY - date of activation based on the User’s computer clock

SERVER_ACTIVATION_DATE

MM/DD/YYYY date of activation based on the DNA Server clock (EDT)

EMAIL

The Activation Email provided by the User during activation, or <blank>

BUYER_EMAIL

The Buyer Email provided in the eCommerce notification via a DNA Connector, or <blank>

REACTIVATION_DATE

MM/DD/YYYY date of the last Re-Activation with the DNA Server

VALIDATION_DATE

MM/DD/YYYY date of the last Validation with the DNA Server

PROTECTION_LEVEL

Validation / Protection Level of the License, as set in the Product Configuration

When using the Anti-Fraud option, the Validation Level will be set to "3" until the mandatory validation is completed between 45 to 60 days from activation.
See Anti-Fraud Option for additional details.

EXPIRY_DATE

MM/DD/YYYY date the License will expire, or <blank> if the License never expires (i.e. perpetual license).

For Floating Licenses, will return the expiry date of the Lease.
See Floating Licensing for additional details.

VALIDATION_LIMIT

MM/DD/YYYY date for the next Mandatory DNA Server Validation - Level 3 Validation only

VALIDATION_WARNING

MM/DD/YYYY date prior to the VALIDATION_LIMIT to warn the User of the need to connect to the Internet to perform a Mandatory DNA Server Validation

Starting on this date, API Calls will return the error code ERR_VALIDATION_WARNING (-1)

EVAL_CODE
  • <BLANK> if a regular License Activation Code
  • "1" if an Evaluation License Code
FLOATING
  • <BLANK> if a regular License Activation Code
  • NOT <BLANK> if a Floating License Code
LICENSE_DATA

The <License_Data> Custom Field value of the License.

INFOTAG

The <INFOTAG> Custom Field value of the License.

COMPUTER_NAME

The Computer Name of the computer

SEATS

Returns the <Seat> setting for this License Activation Code using Multi-User or Floating Licensing.

CLIENT_VERSION

Version of the DNA Library (Ex: "5.02" )

ANTI_FRAUD
  • <BLANK> if the "Anti-Fraud" option is not used

  • <BLANK> if the License Activation Code has been succesfully validated during the 45 to 60 day period after initial activation

  • "1" if the the License Activation Code has not yet successfully been validated.

    This will be returned during the entire 60 day period up to the time of a successful validation with the DNA Server.

LAST_RESULT_VALUE

Returns the value embedded in the last error message from software_DNA:

  • For "Validation Warning", will return MM/DD/YYYY date of the end of the validation period for Level 3 Validation and Anti-Fraud Validation

  • For "Lockout", will return the date and time MM/DD/YYYY HH:MM:SS of the end date of the Lockout Period

PROXY_SERVER

"Server Name" or "Address" of the Proxy Server as provided by the User

PROXY_PORT

"Proxy Server Port" as provided by the User

PROXY_USERNAME

"USERNAME" for authentication by the Proxy Server as provided by the User

PROXY_PASSWORD

"PASSWORD" for authentication by the Proxy Server as provided by the User

NOTE: All dates are returned as strings in the "<mm/dd/yyyy>" format (example <08/25/2017>). You will need to convert the date into an appropriate format if you plan to display it to the user using his display preferences, or use the date as part of your application.