WriteInstallID
Description
bool WriteInstallID(string installID, out string errorMessage)Parameters
Parameter
Type
Description
Return
Type
Description
Example
// license is an instance of a QlmLicense object. When using the LicenseValidator class,
// you should use licenseValidator.QlmLicenseObject.
try
{
QlmAnalytics analytics = new QlmAnalytics(license);
string errorMessage;
string installID = analytics.ReadInstallID(out errorMessage);
AssemblyName assemblyName = Assembly.GetEntryAssembly().GetName();
string version = assemblyName.Version.ToString();
if (String.IsNullOrEmpty(installID))
{
bool ret = analytics.AddInstallEx(version, analytics.GetOperatingSystem(),
Environment.MachineName, computerID,
activationKey, this.computerKey, license.IsEvaluation(),
license.ProductName, license.MajorVersion, license.MinorVersion,
customData1, customData2, customData3,
ref installID);
if (ret == true)
{
analytics.WriteInstallID(installID, out errorMessage);
}
}
else
{
analytics.UpdateInstallEx(installID,
version, analytics.GetOperatingSystem(),
Environment.MachineName, computerID,
activationKey, this.computerKey, license.IsEvaluation(),
license.ProductName, license.MajorVersion, license.MinorVersion,
customData1, customData2, customData3
);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Last updated