CreateActivationKeyWithExpiryDateEx9
Description
Creates an activation key on the License Server.
Note that to call this function, you must:
Enable the Server Property enableCreateActivationKey
Set the AdminEncryptionKey
Call DefineProduct
void CreateActivationKeyWithExpiryDateEx9(string webServiceUrl, string email,
int[] features, int numKeysToCreate,
int numSeats, int numFloatingSeats,
bool useMultipleActivationsKey, string qlmVersion,
string vendor, string userData1,
string affiliateID, DateTime expiryDate,
int expiryDuration, DateTime maintenancePlanExpiryDate,
bool generic, ELicenseModel licenseModel,
string comment, EOrderStatus orderStatus,
string productProperties, string orderID,
out string response)
Parameters
Response XML format
<?xml version='1.0' encoding='UTF-8'?>
<QuickLicenseManager>
<keys>A062E-9D0CC-6DC80-0D6A0-E0701-000A0;A062E-9D0CC-6DC80-0D6A0-E0701-000A0</keys>
</QuickLicenseManager>
Example error response
<?xml version='1.0' encoding='UTF-8'?>
<QuickLicenseManager>
<error>Details about the error</error>
</QuickLicenseManager>
Remarks
Use ParseResults to interpret the results of the call and load the returned data into an ILicenseInfo object.
ILicenseInfo li = new LicenseInfo();
string message = string.Empty;
if (lv.QlmLicenseObject.ParseResults(response, ref li, ref message))
{
// The operation was successful
}
else
{
// The operation failed
}
Example
private void CreateKey ()
{
// lv is an instance of the LicenseValidator class
// You need to set the AminEncryptionKey to call the Management API
// You should never call the Management API from within your application
lv.QlmLicenseObject.AdminEncryptionKey = "{B6163D99-F46A-4580-BB42-BF276A507A14}";
int[] features = new int[4];
features[0] = 1; // Enable the STD feature
features[1] = 0;
features[2] = 0;
features[3] = 0;
int numKeysToCreate = 1;
int numSeats = 1;
int numFloatingSeats = 0;
bool useMultipleActivationsKey = true;
string qlmVersion = "6.0.00";
string vendor = string.Empty;
string userData1 = string.Empty;
string affiliateID = string.Empty;
DateTime expiryDate = DateTime.UtcNow;
int expiryDuration = -1;
DateTime maintenancePlanExpiryDate = DateTime.MinValue;
bool generic = false;
QlmLicenseLib.ELicenseModel licenseModel = ELicenseModel.subscription;
string comment = string.Empty;
EOrderStatus orderStatus = EOrderStatus.ENone;
string productProperties = string.Empty;
string orderID = string.Empty;
string response;
lv.QlmLicenseObject.CreateActivationKeyWithExpiryDateEx9(string.Empty,
"tom@soraco.co",
features, numKeysToCreate,
numSeats, numFloatingSeats,
useMultipleActivationsKey, qlmVersion,
vendor, userData1,
affiliateID, expiryDate,
expiryDuration, maintenancePlanExpiryDate,
generic, licenseModel,
comment, orderStatus,
productProperties, orderID,
out response);
ILicenseInfo li = new LicenseInfo();
string message = string.Empty;
if (lv.QlmLicenseObject.ParseResults(response, ref li, ref message))
{
// The operation was successful
}
else
{
// The operation failed
}
}
Last updated