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)
 initialize the SFLUC Library
 
int __stdcall SFLUC_SHUTDOWN (unsigned int uLUCToken)
 shutdown and release all resources used by SFLUC DLL
 
int __stdcall SFLUC_CHECK_LICENSE (void)
 Examine the license key and activation code in the current system.
 
int __stdcall SFLUC_SERVICE_PING (void)
 heartbeat ping to the remote license API
 

Detailed Description

The NumXL SDK logging subsystem definie a logging level to determine whether a message is written to the log file or not. The numeric integer value of the logging level is represented by the value of one of those macros.

Function Documentation

◆ SFLUC_CHECK_LICENSE()

int __stdcall SFLUC_CHECK_LICENSE ( void )
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_INIT

Examine the status of the licensing system.

Remarks
Requirements
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
Examples
luc_init.cpp.

◆ SFLUC_INIT()

int __stdcall SFLUC_INIT ( LPCWSTR argPRODKey,
LPCWSTR argLicenseKey,
LPCWSTR argActivationCode,
unsigned * pClientToken )
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_FAILEDunknown error
See also
SFLUC_SHUTDOWN

The client application Initialize the sdk licensing subsystem, by providing the license key and activation code, and thus, unlock the SDK functions.

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
20 unsigned uLUCToken=unsigned(-1);
21 std::wstring szProdKey(L"31223-200-169");
22 std::wstring szLicenseKey(L"79F7-C8-A9-01-1234");
23 std::wstring szActivationCode(L"2c07d642fe1ef089e5517d35e15f186814e17fb80b25cd950e77ade2e63c82c65d94ca639a77475d11981fd0a06e3ece730ef09c53c1f2da6d89d9a1d453d5e3678e50786a42101f194ffd543c2b72b55576fa52796acfd42ea715e132abddbc0877a5d0ba9e071c5639d1cb9567d49c8019ef86549321c577193f0cd6ecba852013730ccda7f9d3b25dd6b10ffca6628835c52f4c4775d3cc295d814b542abe370abac97a2b71c5949736d7c007442b956deac50bdcff423e4b2304e7153fffc61d5a15361ada3444e67075f09f15a4eefaf1d6710d9e4e44b6adbf175caeb3446c64ead56333c8c0df6a487b549ec2b9bf5d733edbc062ce874986caf63756");
24 nRetCode = SFLUC_INIT( szProdKey.c_str(), szLicenseKey.c_str(),szActivationCode.c_str(), &uLUCToken);
25 if(nRetCode == NDK_SUCCESS){
26 std::wcout << L" SUCCESS - License system is initialized" << std::endl;
Requirements
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
Examples
luc_init.cpp.

◆ SFLUC_SERVICE_PING()

int __stdcall SFLUC_SERVICE_PING ( void )
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
Requirements
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll

◆ SFLUC_SHUTDOWN()

int __stdcall SFLUC_SHUTDOWN ( unsigned int uLUCToken)
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_FAILEDunknown error
See also
SFLUC_INIT

The client application calls this function during its shutdown to free any resources held by licensing subsystem

Remarks
  1. This is the second to last API call that an application makes before shutdown (the last API is the SFLOG_SHUTDOWN).
  2. If the value of uLUCToken argument is the one returned by SFLUC_INIT.
A sample code
31 SFLUC_SHUTDOWN(uLUCToken);
Requirements
Target Platform Windows
Header SFLUC.h (include Windows.h)
Library SFLUC.lib
DLL SFLUC.dll
Examples
luc_init.cpp.