CogLicense GetDaysRemaining Method Cognex VisionPro 9.8
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: 75.1.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 willreturn false if an internal error is encountered. if true, the method will throw CogSecurityViolationExceptionwith 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 bits was not found or has expired. The message may also hold the internal error encounteredwhen reading the dongle.
See Also