ComObjError() [AHK_L 53+]

COM 에러의 고지를 켜고 끕니다.

Enabled := ComObjError(Enable)

매개변수

Enable

불리언 값 (true 또는 false). 선택적.

Return Value [v1.0.91+]

This function returns the setting which was in effect before the function was called.

총평

Notification of COM errors is enabled by default.

COM errors may be raised by ComObjCreate(), ComObjGet(), ComObjActive(), ComObjConnect(), ComObjQuery() (if an invalid pointer is detected) or by a method or property of a COM object. Raising a COM error causes one of the following outcomes:

SettingOutcome
0 (disabled) The function, method or property returns a default value (typically an empty string), without showing an error dialog.
1 (enabled)

If there is an active Try block, an exception is thrown. 그렇지 않고:

An error dialog is shown, giving the user the option to continue the script. If the user chooses "Yes", the function, method or property returns a default value (typically an empty string) and the script continues. Otherwise, the script exits.

COM 객체에 접근하고 나면, A_LastError에는 COM 객체의 IDispatch::Invoke 함수가 돌려주는 HRESULT 코드가 담깁니다. The script may consult A_LastError within a Catch block or after the method or property returns, provided that ComObjError(false) has been used or the user did not choose to exit the script.

ComObjCreate(), ComObjGet(), ComObjActive(), ComObjConnect(), ComObjQuery()