Last Modified October 3, 2026

StreamLined Activation - Validate the CDM License file

 

The DNA_Validate() is now used to determine if a valid license file (the CDM) exists on the user’s computer and that all the protection rules are being respected.

Key Results from DNA_Validate():

errNo = 0 (ERR_NO_ERROR)

The application can run. A valid License exists.

errNo = -1 (ERR_VALIDATION_WARNING)

The application can run. A valid License exists.

This is a special case with Level 3 Validation and the Anti-Fraud feature. It indicates the License has reached the Warning Period and you can provide a warning to the user that he must connect to the Internet before the end of this period, or the License will expire.
See Notes on ERR_VALIDATION_WARNING   .

errNo > 0

The application should not be allowed to run, or allowed to run with limited functionality (a "Demo" mode), and should proceed to the StreamLined Activation step.

It is possible to trap some error codes at this stage, but it is typically preferred to wait after the Activate step to implement additional error trapping.

See DNA API Error Codes     for the definition of the different Error Codes.

Validate the CDM License File

Highlighted lines indicate where additional code is required or needs to be modified.

                	
                        //
                        // call DNA_Validate() to see if a valid license exists
                        //
                        
                            errNo = DNA_Validate(DNA_product_key);
                        
                            if (errNo == 0 ) 
                        
                            {
                                // valid CDM file, run the application
                            }
                        
                        if (errNo < 0 )
                        
                            {
                                // DNA_Validate has returned a Warning
                                // let the application run
                            
                                // optionally, display a message to the User that a connection to 
                                // the internet is required in the near future
                                // You can get the last date using DNA_PARAM()
                            
                                // declaration of value buffer used with DNA_PARAM and DNA_ERROR
                                char buffer[255];
                            
                                DNA_Param("VALIDATION_LIMIT",buffer,sizeof(buffer));
                            
                                // display message to User
                                // let the application run
                                
                            }
                        
                        // The DNA_Validate() call has returned errNo > 0  - no valid license exists
                        // 
                        // Implement the StreamLined Activation process
                        //