CogLicense GetDaysRemaining Method Cognex VisionPro 9.24
Gets the number of days remaining to the license, if the number of days is meaningful.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
Syntax

public static bool GetDaysRemaining(
	out int days,
	bool throwOnInternalError
)

Parameters

days
Type: System Int32 
The days are updated to the days remaining in the license if the function returns true.
throwOnInternalError
Type: System Boolean
If throwOnInternalError is set to false, the method will return false if an internal error is encountered. if true, the method will throw CogSecurityViolationException with a message indicating the internal error encountered.

Return Value

Type: Boolean
True if the VisionPro license has an expiration and the days parameter has been set to a meaningful value. Otherwise it is false.
Exceptions

ExceptionCondition
CogSecurityViolationExceptionIf the security dongle has expired. The message may also hold the internal error encountered when reading the dongle.
See Also