当前位置:首页 > ASP教程 > 应用技巧

asp代码实现检测组件是否安装的函数

<%
'******************************
'函数:isobjinstalled(strclassstring)
'参数:strclassstring,组件对象名
'作者:阿里西西
'日期:2007/7/13
'描述:检测组件是否安装
'示例:<%=isobjinstalled(strclassstring)%>
'******************************
function isobjinstalled(strclassstring)
    on error resume next
    isobjinstalled = false
    'err = 0
    dim xtestobj
    set xtestobj = server.createobject(strclassstring)
    if err<>-2147221005 then isobjinstalled = true else isobjinstalled = false end if
    set xtestobj = nothing
    'rr = 0
end function
%>
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!