This is an old revision of the document!


SDK API > BS2_QueryDeviceLicense


[+ 2.9.1] Get the device license activation/deactivation status of the device connected as master-slave.
This feature is available only on devices that support the device license activation feature, and the devices that support the feature are listed below.

Supported devices Firmware
XS2-Finger V1.2.0
XS2-Card V1.2.0
BS3 V1.1.0

Declaration

#include "BS_API.h"
 
int BS2_QueryDeviceLicense(void* context, uint32_t deviceId, BS2_LICENSE_TYPE licenseType, BS2LicenseResult** outResultObj, uint32_t* outNumOfResult);

Parameter

  • [In] context : Context
  • [In] deviceId : Device Identifier
  • [In] licenseType : Device License Type
Value Description
0x0000 None
0x0001 Visual QR
  • [Out] outResultObj : Pointer to structure to receive device license activation result
  • [Out] outNumOfResult : Number of device license activation result structures

NOTE
The outResultObj parameter must be used and then returned memory to the system via the BS2_ReleaseObject function.

Return Value

If successfully done, BS_SDK_SUCCESS will be returned. If there is an error, the corresponding error code will be returned.

Sample Code(C++)

sample_setdebugfilelogex.cpp
const char* CURRENT_DIR = ".";
const int MAX_SIZE_LOG_FILE = 100;  // 100MB
int sdkResult = BS2_SetDebugFileLogEx(DEBUG_LOG_ALL, DEBUG_MODULE_ALL, CURRENT_DIR, MAX_SIZE_LOG_FILE);
if (BS_SDK_SUCCESS != sdkResult)
{
	printf("BS2_SetDebugFileLogEx call failed: %d", sdkResult);
	return;
}

Sample Code (C#)

sample_setdebugfilelogex.cs
const string CURRENT_DIR = ".";
const int MAX_SIZE_LOG_FILE = 100;  // 100MB
IntPtr ptrDir = Marshal.StringToHGlobalAnsi(CURRENT_DIR);
result = (BS2ErrorCode)API.BS2_SetDebugFileLogEx(Constants.DEBUG_LOG_OPERATION_ALL, Constants.DEBUG_MODULE_ALL, ptrDir, MAX_SIZE_LOG_FILE);
Marshal.FreeHGlobal(ptrDir);
if (result != BS2ErrorCode.BS_SDK_SUCCESS)
{
	Console.WriteLine("Got error({0}).", result);
	return;
}