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 Shared Function CheckForUpdates( ByRef productUpdates As LocalProductUpdateInfo(), ByRef responseMessage As String) As ClientCheckUpdatesResponseCode
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
Sub
btnCheckUpdates_Click(sender
As
Object
, e
As
EventArgs)
Handles
btnCheckUpdates.Click
Dim
productUpdates
As
LocalProductUpdateInfo() =
Nothing
Dim
responseMessage
As
String
=
String
.Empty
Dim
responseCode
As
ClientCheckUpdatesResponseCode = ItpLibraryNetWrapper.CheckForUpdates(productUpdates, responseMessage)
If
((responseCode <> ClientCheckUpdatesResponseCode.Ok)
AndAlso
(responseCode <> ClientCheckUpdatesResponseCode.OkButCache))
Then
MessageBox.Show(responseMessage)
Return
End
If
If
((productUpdates
Is
Nothing
)
OrElse
(productUpdates.Length = 0))
Then
MessageBox.Show(
"No updates available"
)
Return
End
If
Using updatesForm
As
ProductUpdatesForm =
New
ProductUpdatesForm(productUpdates)
updatesForm.ShowDialog()
End
Using
End
Sub