NumXL SDK - Licensing API
Configurations

API for Initializing, configuring, and shutdown the licensing facility. More...

Functions

int __stdcall SFLUC_INIT (LPCWSTR argPRODKey, LPCWSTR argLicenseKey, LPCWSTR argActivationCode, unsigned *pClientToken)
 The client application Initialize the sdk licensing subsystem, by providing the license key and activation code, and thus, unlock the SDK functions.
 
int __stdcall SFLUC_SHUTDOWN (unsigned int uLUCToken)
 The client application calls this function during its shutdown to free any resources held by licensing subsystem.
 
int __stdcall SFLUC_CHECK_LICENSE (void)
 Examine the license key and activation code in the current system.
 
int __stdcall SFLUC_SERVICE_PING (void)
 

Detailed Description

Set up/Initialize the license module with a license key and activation code.

Function Documentation

◆ SFLUC_CHECK_LICENSE()

int __stdcall SFLUC_CHECK_LICENSE ( void )

Examine the license key and activation code in the current system

Parameters
None.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_UNINITIALIZEDfailed (see remarks)
NDK_INACTIVE_LICENSE_KEYfailed (see remarks)
NDK_INVALID_LICENSE_KEYfailed (see remarks)
NDK_EXPIRED_LICENSE_KEYfailed (see remarks)
NDK_INVALID_ARGfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. If the license module has not been initialized, the function will fail and return NDK_UNINITIALIZED as the return code.
  2. If the license key is valid, but not activated (no activation code is found), the function will fail and return NDK_INACTIVE_LICENSE_KEY error code.
  3. If the license key found but no valid, the function will fail and return NDK_INVALID_LICENSE_KEY error code.
  4. If the non-perpetual license key and the activation code are valid, but the corresponding expiry date is in the past, the function will fail and return NDK_EXPIRED_LICENSE_KEY error code.
  5. For perpetual and active license key (with a valid activation code), the function will succeed and return NDK_SUCCESS.
Requirements
Requirement Value
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
SFLOG.dll
See also
Examples
luc_init.cpp.

◆ SFLUC_INIT()

int __stdcall SFLUC_INIT ( LPCWSTR argPRODKey,
LPCWSTR argLicenseKey,
LPCWSTR argActivationCode,
unsigned * pClientToken )

initialize the SFLUC Library

Parameters
[in]argPRODKey(Required) Is the Product key (e.g., 31223-200-169
[in]argLicenseKey(Required) Is the NumXL SDK License key (e.g., 79F7-C8-A9-XX-XXXX)
[in]argActivationCode(Required) Is the hexadecimal string generated during the license activation on the host machine.
[out]pClientTokenIs a pointer to hold integer identifier (required to call SFLUC_Shutdown)
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_SKIP_INITfailed (see remarks)
NDK_INVALID_ARGfailed (see remarks)
NDK_INIT_FAILEDfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. This is often the second API call that an application makes after initializeing the logging system.
  2. If the value of szLogDir argument is missing (empty or NULL), the function will use the default temp directory in the current user's profile.
A sample code
20unsigned uLUCToken=unsigned(-1);
21std::wstring szProdKey(L"31223-200-169");
22std::wstring szLicenseKey(L"79F7-C8-A9-01-1234");
23std::wstring szActivationCode(L"2c07d642fe1ef089e5517d35e15f186814e17fb80b25cd950e77ade2e63c82c65d94ca639a77475d11981fd0a06e3ece730ef09c53c1f2da6d89d9a1d453d5e3678e50786a42101f194ffd543c2b72b55576fa52796acfd42ea715e132abddbc0877a5d0ba9e071c5639d1cb9567d49c8019ef86549321c577193f0cd6ecba852013730ccda7f9d3b25dd6b10ffca6628835c52f4c4775d3cc295d814b542abe370abac97a2b71c5949736d7c007442b956deac50bdcff423e4b2304e7153fffc61d5a15361ada3444e67075f09f15a4eefaf1d6710d9e4e44b6adbf175caeb3446c64ead56333c8c0df6a487b549ec2b9bf5d733edbc062ce874986caf63756");
24nRetCode = SFLUC_INIT( szProdKey.c_str(), szLicenseKey.c_str(),szActivationCode.c_str(), &uLUCToken);
25if(nRetCode == NDK_SUCCESS){
26 std::wcout << L" SUCCESS - License system is initialized" << std::endl;
Requirements
Requirement Value
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
SFLOG.dll
See also
Examples
luc_init.cpp.

◆ SFLUC_SERVICE_PING()

int __stdcall SFLUC_SERVICE_PING ( void )

heartbeat ping to the remote license API

Parameters
None.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDunknown error
See also
SFLUC_LOOKUP_LICENSE
Remarks
  1. The operation of this function does not rely on the initialization of the license module.
Requirements
Requirement Value
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
SFLOG.dll

◆ SFLUC_SHUTDOWN()

int __stdcall SFLUC_SHUTDOWN ( unsigned int uLUCToken)

shutdown and release all resources used by SFLUC DLL

Parameters
[in]uLUCToken(Required) Is the licensing system token id (acquired during initialization).
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_UNINITIALIZEDfailed (see remarks)
NDK_INVALID_ARGfailed (see remarks)
NDK_INVALID_TOKENfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. If the license module has not been initialized, the function will fail and return NDK_UNINITIALIZED as the return code.
  2. This is the second to last API call that an application makes before shutdown (the last API is the SFLOG_SHUTDOWN).
  3. If the value of uLUCToken argument is the one returned by SFLUC_INIT.
A sample code
31SFLUC_SHUTDOWN(uLUCToken);
Requirements
Requirement Value
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
SFLOG.dll
See also
SFLUC_INIT
Examples
luc_init.cpp.