SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > GetExpireDate

GetExpireDate


The GetExpireDate function retrieves the expire date (if any) of an expiring license. If the license is an expire type and under the influence of an expiration (past or future), the parameters will return with the date and time (to the minute) that the license will expire. This will be the soonest that the license will expire.

Syntax

HRESULT GetExpireDate (

long * ExpireYear,
long
* ExpireMonth,
long
* ExpireDay,
long
* ExpireHour,
long
* ExpireMinute, 
VARIANT_BOOL *
IsExpireType

);

Parameters

ExpireYear 

[OUT] This is (a pointer to) a numeric value which returns holding the full Gregorian UTC year in which the license will expire (2000 or greater).
 

ExpireMonth

[OUT] This is (a pointer to) a numeric value which returns holding the Gregorian UTC month in which the license will expire (1 through 12 inclusive).
 

ExpireDay 

[OUT] This is (a pointer to) a numeric value which returns holding the Gregorian UTC day on which the license will expire (1 through 31 inclusive).
 

ExpireHour 

[OUT] This is (a pointer to) a numeric value which returns holding the military UTC hour at which the license will expire (0 through 24 inclusive).

 

ExpireMinute 

[OUT] This is (a pointer to) a numeric value which returns holding the UTC minute at which the license will expire (0 through 59 inclusive).
 

IsExpireType

[OUT] This is (a pointer to) a boolean value which returns holding a value indicating if the license is currently under the influence of an expiration (past or future). Note that once you successfully use a Release All Expiration type of Activation Code on the license, that the license is no longer considered an expire type and this parameter returns false. Always ignore the remaining parameters if this parameter returns containing false. 

Remarks

Note: This function is illustrated in the SoftwareShield Flowcharts - (see flow chart #3).

The GetExpireDate function retrieves the expire date (if any) of an expiring license.

Note that the date and time returned is the UTC (Universal Time Coordinated) time for the expiration, not the local time.  If you wish to convert to local time, you must do that operation in code.

If the license is an expire type and under the influence of an expiration (past or future), the parameters will return with the date and time (to the minute) that the license will expire. This will be the soonest that the license will expire.

If you instead need to specifically retrieve the expiration date only considering the expire period, use GetPeriodExpireDate. If you instead need to specifically retrieve the expiration date only considering the hard expire date, use GetHardExpireDate. If there is both an expiration period and a hard expiration date in the license, this function will return the expire date and time (from between the two expiration dates) that comes soonest.

Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

Function Information

Exposed By Interface:

"ISSCProtector"

Exposed In COM Server Binaries:

"SSCProt.dll" and "SSCProtD.dll"

Related Topics