共用方式為


View.GetError 方法

View 物件的 GetError 方法會傳回 Validation 錯誤,以及發生錯誤的資料行名稱。 在自動化中,傳回值是 ##ColumnName 格式的字串,其中 ## 代表 2 位數的錯誤碼。 它傳回視圖錯誤陣列中的第一個錯誤;後續呼叫會傳回錯誤陣列中的下一個值。 傳回值 '00' 後,就不再存在錯誤,後續呼叫只會再次循環遍歷陣列。

語法

View.GetError()

參數

這個方法沒有參數。

返回值

這個方法會傳回發生錯誤的驗證錯誤和資料行名稱。

需求

Requirement 價值觀
版本
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。 Windows Server 2008 或 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5。 Windows Server 2003 或 Windows XP 上的 Windows Installer
DLL
Msi.dll
IID
IID_IView定義為 000C109C-0000-0000-C000-000000000046