int deleteDeviceLicense(void* context, BS2_DEVICE_ID id) { DeviceControl dc(context); BS2LicenseBlob licenseBlob = { 0, }; vector deviceIDs; vector licenseResult; int sdkResult = BS_SDK_SUCCESS; licenseBlob.licenseType = (BS2_LICENSE_TYPE)Utility::getInput("Enter the license type. (0: None, 1: Visual QR)"); licenseBlob.numOfDevices = (uint16_t)Utility::getInput("How many devices do you want to register?"); if (0 < licenseBlob.numOfDevices) { // Device ID for (uint16_t idx = 0; idx < licenseBlob.numOfDevices; idx++) { BS2_DEVICE_ID deviceID = (BS2_DEVICE_ID)Utility::getInput("Enter a device ID:"); deviceIDs.push_back(deviceID); } licenseBlob.deviceIDObjs = deviceIDs.data(); sdkResult = dc.disableDeviceLicense(id, &licenseBlob, licenseResult); if (BS_SDK_SUCCESS == sdkResult) DeviceControl::print(licenseResult); } return sdkResult; } int DeviceControl::disableDeviceLicense(BS2_DEVICE_ID id, const BS2LicenseBlob* licenseBlob, vector& licenseResult) { BS2LicenseResult* result = NULL; uint32_t numOfResult = 0; int sdkResult = BS2_DisableDeviceLicense(context_, id, licenseBlob, &result, &numOfResult); if (BS_SDK_SUCCESS != sdkResult) { TRACE("BS2_DisableDeviceLicense call failed: %d", sdkResult); return sdkResult; } licenseResult.clear(); for (uint32_t idx = 0; idx < numOfResult; idx++) { licenseResult.push_back(result[idx]); } return sdkResult; }