Check license (COM)

Method

Checklicense - COM

Description

This method checks if the license installed on the machine is valid and when it expires. Metadefender Core processes, scans, and updates requests only if LicenseType is one of the“valid” types below.

Function prototype

HRESULT CheckLicense
{
[out] VARIANT * LicenseType,
[out] VARIANT * ExpiredDate,
[out, retval] VARIANT * IsValid
}

Arguments

Argument

Description

Data Type

LicenseType

The type of license:

  • 0: Expired (invalid)

  • 1: Activated (valid)

  • 2: Trial (valid)

  • 3: Activate Required (invalid)

  • 4: Activated but expires in 30 days (valid)

UINT32

ExpiredDate

The date when the license is expired in the following format:

MM/DD/YYYY (MM: month, DD: day, YYYY: year)

string

IsValid

True: if the license is valid

False: if the license is invalid

bool