With the User License deployment model, a single License Key is generated for each ImageGear-based solution and is used to initialize the ImageGear Core component using the ImageGear product licensing API. No further actions are required to license your application on the end user's system. The User model includes both concurrent user and named user methods. Distribution is per the Accusoft agreement for quarterly reporting (LDR).
Use The Client Process, described next.
The Client Process
This section specifies the steps you need to follow to properly license and install your end product on the end user's machine when deploying your product to a client machine.
With the User License model, no Licensing Component is required. Accusoft will email the necessary parameters to you: Solution Name, Solution Key and License Key for the deployment of your application. Using these parameters, you can then modify the code of your application to specify the Solution Name, Solution Key, and License Key using the following ImageGear API:
- To specify the Solution Name, you call IG_lic_solution_name_set
When you are ready to deploy your ImageGear-based application, you need to replace the generic solution name that you have used with the ImageGear evaluation and development licenses with the unique solution name assigned to your application by Accusoft. - To specify the Solution Key, you call IG_lic_solution_key_set
- To specify the License Key for your application, you call IG_lic_OEM_license_key_set
You also need to use the Deployment Packaging Wizard to package the ImageGear run time components required for your application. See Deploying Your Product.
Code Samples for User Model
VB:
Copy Code | |
---|---|
'Licensing Functions Definitions Declare Function IG_lic_solution_name_set Lib "igcore17d.dll" (ByVal SolutionName As String) As Long Declare Function IG_lic_solution_key_set Lib "igcore17d.dll" (ByVal Key1 As Long, ByVal key2 As Long, ByVal key3 As Long, ByVal key4 As Long) As Long Declare Function IG_lic_OEM_license_key_set Lib "igcore17d.dll" (ByVal SolutionName As String) As Long Dim IGErr As Long IGErr = IG_lic_solution_name_set("Your Solution Name") IGErr = IG_lic_solution_key_set(&H473F47EC, &HDEDCEDC4, &HAFFBB23E, &HFBFBDE4A) IGErr = IG_lic_OEM_license_key_set("1.0.WkFoEmKFJkSdDHJfFDGsTRYdIUfIOsOPePf...") |
C#:
The names of the ImageGear functions may change depending on how you wrap the DLL for use in C#. For an example on wrapping the ImageGear Libraries, please refer to the DLL "C#.net Demo" program and source.
Copy Code | |
---|---|
ASCIIEncoding encoding = new ASCIIEncoding(); byte[] SolutionName = encoding.GetBytes("Your Solution Name"); byte[] OEMKey = encoding.GetBytes("1.0.WkFoEmKFJkSdDHJfFDGsTRYdIUfIOsOPePf..."); fixed (byte* pszBuffer = SolutionName) { IGLib.IG_lic_solution_name_set( pszBuffer ); } IGLib.IG_lic_solution_key_set (0x473F47EC, 0xDEDCEDC4, 0xAFFBB23E, 0xFBFBDE4A); fixed (byte* pszBuffer = OEMKey) { IGLib.IG_lic_OEM_license_key_set ( pszBuffer ); } |
C++:
Copy Code | |
---|---|
IG_lic_solution_name_set( "Your Solution Name" ); IG_lic_solution_key_set(0x473F47EC, 0xDEDCEDC4, 0xAFFBB23E, 0xFBFBDE4A ); IG_lic_OEM_license_key_set ("1.0.WkFoEmKFJkSdDHJfFDGsTRYdIUfIOsOPePf..."); |
VB.NET:
Copy Code | |
---|---|
'Licensing Functions Definitions Declare Function IG_lic_solution_name_set Lib "igcore17d.dll" (ByVal SolutionName As String) As Long Declare Function IG_lic_solution_key_set Lib "igcore17d.dll" (ByVal Key1 As Long, ByVal key2 As Long, ByVal key3 As Long, ByVal key4 As Long) As Long Declare Function IG_lic_OEM_license_key_set Lib "igcore17d.dll" (ByVal SolutionName As String) As Long Dim IGErr As Long IGErr = IG_lic_solution_name_set("[Your Solution Name]") IGErr = IG_lic_solution_key_set(&H473F47EC, &HDEDCEDC4, &HAFFBB23E, &HFBFBDE4A) IGErr = IG_lic_OEM_license_key_set("1.0.WkFoEmKFJkSdDHJfFDGsTRYdIUfIOsOPePf...") |
Delphi:
Copy Code | |
---|---|
IG_lic_solution_name_set( `[Your Solution Name]' ); IG_lic_solution_key_set( $473F47EC, $DEDCEDC4, $AFFBB23E, $FBFBDE4A ); IG_lic_OEM_license_key_set( `1.0.WkFo...' + 'GrU...' + 'vWi...'); |
The Delphi environment allows only a maximum of 255 characters in a string literal. Because of this, the developer has to divide the OEM key into multiple literal strings and then concatenate them together using the "+" operator. |
PowerBuilder 10 does not support hexadecimal numbers, so PowerBuilder users can use the following converters passing the solution keys as strings:
Copy Code | |
---|---|
//====================================================================== // // Function: of_UlongToHex (Ulong aul_data) // // Description: convert an unsigned long data to its hexedecimal // value in string format // // Access: public // // Arguments: // Ulong aul_Data Ulong data to be converted // // Returns: string // The output of hexedecimal value // Null if the input data is null // // Author: Lijun Yang // // Date: 4/9/97 // //====================================================================== // // Revision History // // Date Initials Description of Change // ---- -------- -------------------- // 4/9/97 L.Y. Initial creation //====================================================================== ulong lul_mod string ls_Return = "" char lc_hex[0 to 15] = {'0', '1', '2', '3', '4', '5', '6', '7', & '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'} Char lc_char[] // Check if the argument is null IF IsNull (aul_data) THEN SetNull (ls_Return) RETURN ls_return END IF DO WHILE aul_data > 0 lul_mod = mod (aul_data, 16) ls_return = lc_hex[lul_mod] + ls_return aul_data /= 16 LOOP IF ls_return = "" THEN ls_return = '0' Return ls_return //====================================================================== // // Function: of_HexToUlong (string as_hex) // // Description: convert a hexedecimal value (string format) into // its unsigned long value // // Access: public // // Arguments: // string as_Hex hexedecimal data to be converted // // Returns: ulong // the output of the hex value // NUll if the input data is null // // Author: Lijun Yang // // Date: 4/9/97 // //====================================================================== // // Revision History // // Date Initials Description of Change // ---- -------- -------------------- // 4/9/97 L.Y. Initial creation //====================================================================== Integer li_i ulong lul_value integer li_len Char lc_char[] ulong lul_return = 0 // Check if the argument is null IF IsNull (as_hex) THEN SetNull (lul_return) RETURN lul_return END IF li_len = len (as_hex) as_hex = lower (as_hex) lc_char = as_hex FOR li_i = 1 to li_len IF lc_char[li_i] > '9' then //get the value for 'a' - 'f' lul_value = asc (lc_char[li_i]) - 87 ELSE lul_value = long (lc_char[li_i]) End IF lul_return = lul_return * 16 + lul_value NEXT RETURN lul_return |
See Also:
ImageGear Licensing API Reference