CogLicense IsLicenseEnabled Method (String, Boolean)Cognex VisionPro 9.7
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: 73.0.0.0
Syntax

public static bool IsLicenseEnabled(
	string licstr,
	bool throwOnInternalError
)

Parameters

licstr
Type: System String
Specifies the licensed feature using a string such as VisionPro.Blob.
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