CheckForUpdates
This function returns available product's updates.
It returns only actual updates, from current product version and to current date without future versions which can be present on control panel.
Function uses cache and can connect to services once per week, on other calls it returns cached results to reduce load for the service.

You can add new product versions in the control panel. Do not forget to specify current product version during protection

Syntax
public static ClientCheckUpdatesResponseCode CheckForUpdates(out LocalProductUpdateInfo[] productUpdates, out string responseMessage)

Parameters
no input parameters.

Return value
Returns status of updates via ClientCheckUpdatesResponseCode enum;
Returns status of updates via output parameter responseMessage in string;
Returns product updates via output array productUpdates in LocalProductUpdateInfo class

Requirements
Library: ItpLibraryNetClient
File: ItpLibraryNetWrapper.cs
Namespace: ItpLibraryNetClient;

Example
private void btnCheckUpdates_Click(object sender, EventArgs e)
{
    LocalProductUpdateInfo[] productUpdates;
    string responseMessage;
    ClientCheckUpdatesResponseCode responseCode = ItpLibraryNetWrapper.CheckForUpdates(out productUpdates, out responseMessage);
 
    if (responseCode != ClientCheckUpdatesResponseCode.Ok && responseCode != ClientCheckUpdatesResponseCode.OkButCache)
    {
        MessageBox.Show(responseMessage);
        return;
    }
 
    if (productUpdates == null || productUpdates.Length == 0)
    {
        MessageBox.Show("No updates available");
        return;
    }
 
    using (ProductUpdatesForm updatesForm = new ProductUpdatesForm(productUpdates))
        updatesForm.ShowDialog();
 
}
Copyright 2006 - 2024 by IntelliProtector - Software Protection and Licensing Services