CALicense::ErrorCode
ADE User Guide > ADE Server Class Reference > CALicense
property int CALicense::ErrorCode
來自前面方法調用的狀態代碼(失敗原因)。尤其是,在調用NewCAEngine方法後,這提供了關於失敗原因的信息。
任何錯誤代碼的描述性文本都能通過使用ErrorText屬性獲取。一些代碼可能會遇到(不全面):
- 71 – 「使用的CAEngine實例數量已達到允許的上限」
- 72 – 「無效註冊碼」
- 73 – 「過期註冊碼」
- 74 – 「到期註冊碼」
- 75 – 「沒有安裝ADE註冊碼」
- 76 – 「非應用程式註冊碼」 (來自SetApplicationLicenseCode方法)
CAEngine對象具有相同名稱的屬性(使用一組和這一致的錯誤代碼)。一旦你獲得一個CAEngine實例,你將需要檢查其ErrorCode屬性——不是CALicense的ErrorCode屬性。此CALicense::ErrorCode僅用來捕捉CAEngine實例化過程中的錯誤。
數據類型
integer(整型)
存取
讀取
示例用法
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 } ...
另請參考
Comments
Enable comment auto-refresher