How to get information about a license key
// Assuming lv is an instance of the LicenseValidator class:
string dataSet;
string response;
QlmLicenseLib.ILicenseInfo licenseInfo;
licenseInfo = lv.QlmLicenseObject.GetLicenseInfo(String.Empty, lv.ActivationKey, false, out dataSet, out response);
if (licenseInfo != null)
{
// access the licenseInfo structure
string computerKey = licenseInfo.ComputerKey;
// If you want access to all the fields, access the dataSet
DataSet ds = new DataSet("NewDataSet");
XmlReader reader = new XmlTextReader(dataSet, XmlNodeType.Document, null);
if (!String.IsNullOrEmpty(dataSet))
{
ds.ReadXml(reader);
if ((ds.Tables.Count > 0) && ds.Tables[0].Rows.Count > 0)
{
DataRow dr = ds.Tables[0].Rows[0];
string computerID = dr["ComputerID"].ToString();
int numLicenses = (int) dr["NumLicenses"];
int availableLicenses = (int)dr["AvailableLicenses"];
bool revoked = (bool)dr["Disabled"];
string enabledFeatures = dr["Features"].ToString();
int[] features = lv.QlmLicenseObject.ConvertFeaturesToArray(enabledFeatures);
}
}
}PreviousError 80131700, 8013101b, 80131515 when instantiating a QLM objectNextHow to create a product with STD and PRO editions as features
Last updated