Last Modified October 1, 2026

DNA_SetCDMPathName() API

DNA_SetCDMPathName(Path_Name)

 

Parameters Description
<Path_Name>

Path and Filename of the location where the CDM License file will be stored on the User’s computer.

Example (Windows):

C:\Users\Public\Clock_Demo\clock.CDM

Notes:

  • With Version 5 or later of the DNA Libraries, <PathName> must be encoded in UTF-8.

  • Do not use a Filename with the ".LIC" extension as this is reserved for the Offline Activation Process.

This API Call will always return ERR_NO_ERROR.

The validity of the CDM Path Name is not verified by this API Call.

An invalid CDM Path Name will trigger an error during the API Calls that write or update the CDM License file, such as DNA_Validate(), DNA_Activate(), DNA_Reactivate().

If used, the DNA_SetCDMPathName API call must be the first API call used to ensure all subsequent API calls are using the correct CDM License file location.
See Location of CDM License File     for recommended settings on different OS’s.

The Filename defaults to:

  • <Application>.CDM

The directory defaults to:

  • On Windows OS, the same directory as the DNA Library (DNA.DLL)
  • On MAC OS, the application’s "Package Content" folder.

 

Syntax and Code Examples

                      
                          FUNCTION   DNA_SETCDMPATHNAME(PATH_NAME:PANSICHAR) :INTEGER; STDCALL;
                      
                  
                      
                          DECLARE FUNCTION DNA_SETCDMPATHNAME LIB "DNA.DLL" (BYVAL PATH_NAME AS STRING) AS INTEGER
                      
                  
                      
                          INT __STDCALL DNA_SETCDMPATHNAME(CHAR *PATH_NAME);
                      
                  
                      
                          INT __STDCALL DNA_SETCDMPATHNAME(CHAR *PATH_NAME);
                      
                  
                      
                          INT __STDCALL DNA_SETCDMPATHNAME(CHAR *PATH_NAME);
                      
                  
                      
                          PUBLIC NATIVE INT DNASETCDMPATHNAME(STRING PATH_NAME);
                      
                  
                      
                          DECLARE FUNCTION DNA_SETCDMPATHNAME LIB "DNA.DLL" (BYVAL PATH_NAME AS STRING) AS SHORT
                      
                  
                      
                          PUBLIC STATIC EXTERN INT DNA_SETCDMPATHNAME(STRING PATH_NAME);