CogLicense IsLicenseEnabled Method (CogLicenseConstants, Boolean)Cognex VisionPro 9.5
Checks if the licensed feature specified is valid and has not expired.

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

public static bool IsLicenseEnabled(
	CogLicenseConstants lic,
	bool throwOnInternalError
)

Parameters

lic
Type: Cognex.VisionPro CogLicenseConstants
Specifies the licensed feature.
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 licensed feature was found and has not expired, otherwise false.
Exceptions

ExceptionCondition
[T:Cognex::VisionPro::Exceptions::CogSecurityViolationException]If the licensed features could not be read due to an internal error, and the throwOnInternalError is set to true.
See Also