Difference between revisions of "CALicense::ErrorCode"

(Created page with "<< Back to CALicense = property int CALicense::ErrorCode = Status code (reason for failure) from the previous method call. In particular, after calling the...")
 
Line 5: Line 5:
 
Status code (reason for failure) from the previous method call. In particular, after calling the [[CALicense::NewCAEngine|NewCAEngine]] method, this provides information about the cause of the failure.
 
Status code (reason for failure) from the previous method call. In particular, after calling the [[CALicense::NewCAEngine|NewCAEngine]] method, this provides information about the cause of the failure.
  
Descriptive text for any error code can be obtained using the [[CALicense::ErrorCode|ErrorCode]] property. Some codes that could encountered (this is not comprehensive) include:
+
Descriptive text for any error code can be obtained using the [[CALicense::ErrorText|ErrorText]] property. Some codes that could encountered (this is not comprehensive) include:
 
:71 – “The maximum number of CAEngine instances allowed are already in use”
 
:71 – “The maximum number of CAEngine instances allowed are already in use”
 
:72 – “Invalid license code”
 
:72 – “Invalid license code”

Revision as of 20:30, 12 May 2015

<< Back to CALicense

property int CALicense::ErrorCode

Status code (reason for failure) from the previous method call. In particular, after calling the NewCAEngine method, this provides information about the cause of the failure.

Descriptive text for any error code can be obtained using the ErrorText property. Some codes that could encountered (this is not comprehensive) include:

71 – “The maximum number of CAEngine instances allowed are already in use”
72 – “Invalid license code”
73 – “Stale license code”
74 – “Expired license code”
75 – “No ADE license code is present”
76 – “Not an application license code” (from SetApplicationLicenseCode method)

The CAEngine object has property with the same name (and it uses a consistent set of error codes with this one). Once you have a CAEngine instance, you will need to check its ErrorCode property -- not the ErrorCode property of the CALicense. Use this CALicense::ErrorCode only to catch errors during instantiation of the CAEngine.

Data Type

integer

Access

read

Example usage

C#

CALicense lic = new ADE.CALicense();
CAEngine ade = lic.NewCAEngine();
if ( ade == null) {
   MessageBox.Show( "Error " + lic.ErrorCode + ": " + lic.ErrorText, "ADE could not be started", MessageBoxButtons.OK );
   return
}
...

See Also

Comments


You are not allowed to post comments.