ASP判断dll文件是否已注册的函数
ASP #dll #函数2012-04-27 10:00
主要是用下面的函数:
<% '功能:检查是否存在系统组件或组件是否安装成功 '参数:组件名 Function IsObjInstalled(strClassString) On Error Resume Next IsObjInstalled = False Err = 0 Dim xTestObj Set xTestObj = Server.CreateObject(strClassString) If 0 = Err Then IsObjInstalled = True Set xTestObj = Nothing Err = 0 End Function '获取系统组件的版本号 Function getver(Classstr) On Error Resume Next getver= "" Err = 0 Dim xTestObj Set xTestObj = Server.CreateObject(Classstr) If 0 = Err Then getver=xtestobj.version Set xTestObj = Nothing Err = 0 End Function %>调用方法如下:
<% if IsObjInstalled("fso.file") =True then response.write( "已经安装")&getver("fso.file") end if %>
相关文章
- asp连接access数据库代码 2012/04/27
- asp中uft8和gb2312转换乱码解决方法 2012/04/27
- ASP组件Adodb.Stream用法介绍 2012/04/27
- 掌握ASP只需6步 2012/04/27
- ASP建立站内搜索 2012/04/27
- ASP初学者常用的代码 2012/04/27
- ASP 用stream读文件 2012/04/27
- ASP常见问答 2012/04/27
- IIS体系架构 2012/04/27
- IIS使用 2012/04/27