Autoit 调用COM对象出错处理
来源:互联网 发布:fc2域名 编辑:程序博客网 时间:2024/05/22 12:47
; ObjEvent example
; COM Error Handler example
$oIE=ObjCreate("InternetExplorer.Application.1")
; Create Internet Explorer application
$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")
; Initialize a COM error handler
$oIE.UnknownMethod
; Deliberately call an undefined method
If @error then
Msgbox (0,"AutoItCOM test","Test passed:" & _
"We got an error number: " & @error)
Else
Msgbox (0,"AutoItCOM test","Test failed!")
Endif
Exit
; This is my custom defined error handler
Func MyErrFunc()
Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"&@CRLF&@CRLF & _
"err.description is: " &@TAB&$oMyError.description&@CRLF& _
"err.windescription:" &@TAB&$oMyError.windescription&@CRLF& _
"err.number is: " &@TAB&hex($oMyError.number,8)&@CRLF& _
"err.lastdllerror is: "&@TAB&$oMyError.lastdllerror&@CRLF& _
"err.scriptline is: " &@TAB&$oMyError.scriptline& @CRLF& _
"err.source is: " &@TAB&$oMyError.source&@CRLF& _
"err.helpfile is: " &@TAB&$oMyError.helpfile&@CRLF& _
"err.helpcontext is: " &@TAB&$oMyError.helpcontext)
Local $err = $oMyError.number
If $err = 0 Then $err = -1
SetError($err)
; to check for after this function returns
Endfunc
- Autoit 调用COM对象出错处理
- ADO COM出错处理
- c# 对COM+对象反射调用时地址参数处理
- c# 对COM+对象反射调用时地址参数处理 c# 对COM+对象反射调用时地址参数处理
- 调用 COM 对象
- ATL 调用COM对象
- AutoIT 调用dll
- Python调用autoit
- Unix 系统调用出错处理
- 通过反射调用COM对象
- C#中调用COM对象
- AE开发中,对 COM 组件的调用返回了错误 HRESULT E_FAIL,在地理处理中,即GP工具处理时出错
- AE开发中,对 COM 组件的调用返回了错误 HRESULT E_FAIL,在地理处理中,即GP工具处理时出错
- AutoIt
- AUTOIT
- AutoIt
- autoit
- autoit
- java exception java异常汇总(3)
- js空格判断
- 非递归遍历二叉树的四种策略-先序、中序、后序和层序
- IT工程师必看的十条建议
- 开发第一个ejb2.0实体bean CMP
- Autoit 调用COM对象出错处理
- 实现PROXY穿越(4):DES算法之二
- Java HashMap集合深度分析
- Java HashMap集合深度分析
- Linux date命令
- Session在web.config的设置
- Go.
- 【转载】C++中的存储区域
- 实现PROXY穿越(5):DES算法之三