The SFDBM module provide the date and calendar analytics functionality to NumXL SDK. The locality subsystem is used internally by NumXL SDK APIs.
confirgurations
To initialize the licensing subsystem, the client applicatin must passes the license key and the activation code to SFLUC_INIT(.) function.
you'd need ato acquire a license key and generate an activation code foryour machine. This can be accomplished using the sflmgr.exe utility
Upon calling the initialization API (i.e., SFLOG_INIT(.)), the calling application passes the configuration parameters as arguments:
- Basename of the log file.
- Filepath for the logfile on your systems (e.g., c:\temp)
- Log file rotation policies: Maximum filesize, compression and maximum number of files
#include <windows.h>
#include <iostream>
#include <SFLOG.h>
#include <SFLUC.h>
int main(){
std::wstring szAppName = L"testapp";
std::wstring szLogDir =L"C:\\temp";
DWORD dwBackupFiles=7;
size_t ulMaxFileSize= (1024 * 1024);
unsigned int uClientToken=0;
int nRetCode =
SFLOG_INITW(szAppName.c_str(),szLogDir.c_str(), dwBackupFiles, ulMaxFileSize,&uClientToken);
std::wcout << L" SUCCESS - Logging system is initialized" << std::endl;
unsigned uLUCToken=unsigned(-1);
std::wstring szProdKey(L"31223-200-169");
std::wstring szLicenseKey(L"79F7-C8-A9-01-7777");
std::wstring szActivationCode(L"2c07d642fe1ef089e5517d35e15f186814e17fb80b25cd950e77ade2e63c82c65d94ca639a77475d11981fd0a06e3ece730ef09c53c1f2da6d89d9a1d453d5e3678e50786a42101f194ffd543c2b72b55576fa52796acfd42ea715e132abddbc0877a5d0ba9e071c5639d1cb9567d49c8019ef86549321c577193f0cd6ecba852013730ccda7f9d3b25dd6b10ffca6628835c52f4c4775d3cc295d814b542abe370abac97a2b71c5949736d7c007442b956deac50bdcff423e4b2304e7153fffc61d5a15361ada3444e67075f09f15a4eefaf1d6710d9e4e44b6adbf175caeb3446c64ead56333c8c0df6a487b549ec2b9bf5d733edbc062ce874986caf63756");
nRetCode =
SFLUC_INIT( szProdKey.c_str(), szLicenseKey.c_str(),szActivationCode.c_str(), &uLUCToken);
std::wcout << L" SUCCESS - License system is initialized" << std::endl;
....
}
}
exit(0);
}
int __stdcall SFLOG_INITW(LPCWSTR szAppName, LPCWSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *pClientToken)
int __stdcall SFLOG_SHUTDOWN(unsigned int uClientToken)
int __stdcall SFLUC_SHUTDOWN(unsigned int uLUCToken)
int __stdcall SFLUC_INIT(LPCWSTR argPRODKey, LPCWSTR argLicenseKey, LPCWSTR argActivationCode, unsigned *pClientToken)
- Note
- The logging system has two initialization API variants:
- The helper macro (SFLOG_INIT) expands during compilation to eitehr API variant based on your project Unicode settings.
- The SFLOG implements a size-based rotation for log files, so when the current log file exceed given limit, the logging system closes the file, rename it, and open a new one file for writing.
- The number of log (current + older) files reached a given limit, the logging system will delete the oldest file when it open a new file.
Requirements
The SFLUC library is a standalone module, with a runtime dependency on SFLOG.dll.
| |
Target Platform | Windows |
Header | SFLUC.h (include Windows.h) |
Library | SFLUC.lib |
DLL | SFLUC.dll, and SFLOG.dll |
- See also
-