CogLicense IsDateWithinMaintenancePeriod Method (Int32, Int32, Int32, Boolean)Cognex VisionPro 9.7
Checks if the date provided is within VisionPro.Generic maintenance period.

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

public static bool IsDateWithinMaintenancePeriod(
	int year,
	int month,
	int day,
	bool throwOnInternalError
)

Parameters

year
Type: System Int32
Specifies the date year, the value must be within [2018, 2100].
month
Type: System Int32
Specifies the date month, the value must be within [1,12].
day
Type: System Int32
Specifies the date day, the value must be within [1,31].
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 date is within the maintenance period. otherwise it is false.
Exceptions

ExceptionCondition
[T:System::ArgumentException]If the year, month and day are outside range values
CogSecurityViolationExceptionIf the security bits was not found or has expired. The message may also hold the internal error encounteredwhen reading the dongle.
See Also