首页产品库评测行情新闻|手机数码笔记本台式机DIY硬件数字家庭数码相机办公外设|软件下载游戏开发|社区

更多

数码相机
MP4
LCD
机箱
音箱

软件资讯设计 工具 系统 开发 安全 办公 陶吧 IT教育 Windows 7 | 下载中心天极下载中心诚征下载通路合作伙伴
天极网 > 软件频道 > 网页陶吧>在ASP页里面注册DLL的VBScript CLASS

在ASP页里面注册DLL的VBScript CLASS

2007-03-26 10:51作者:龙犊整理出处:天极Yesky责任编辑:龙犊

  ’-----------------------------------------

  ’目的: 删除某一个节点

  ’参数: 节点内容

  ’返回: 找不到节点就返回TRUE

  ’-----------------------------------------

以下是引用片段:
  public function ReNode(strPath)
  dim objNode
  set objNode = SelectNode(strPath)
  if objNode is nothing then
  ReNode = true
  else
  call s_objNodeRoot.removeChild(objNode)
  call s_objXml.save(s_strXmlPath)
  end if
  end function

  ’-----------------------------------------

  ’目的: 寻找某个节点

  ’参数: strPath: 节点内容

  ’返回: 找到就返回该节点,找不到就返回nothing

  ’-----------------------------------------

以下是引用片段:
  private function SelectNode(ByVal strPath)
  dim objNode
  strPath = UCase(strPath)
  for each objNode in s_objNodeRoot.childNodes
  if UCase(objNode.childNodes.item(0).nodeValue) = strPath then
  Set SelectNode = objNode
  exit function
  end if
  next
  set SelectNode = nothing
  end function

  ’--------------------------------------------

  ’目的: 查看DLL文件列表里某个文件注册状态

  ’参数: 该文件路径

  ’返回: 1=已经注册

  ’ 0=未注册

  ’ -1=找不到该文件

  ’--------------------------------------------

以下是引用片段:
  public function CheckDll(strPath)
  dim objNode
  set objNode = SelectNode(strPath)
  if objNode is nothing then
  CheckDll = -1
  else
  CheckDll = Cint(objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue)
  end if
  end function

  ’--------------------------------------

  ’目的: 将所有未注册的DLL注册

  ’返回: 如果有某个DLL注册失败就返回TRUE

  ’--------------------------------------

以下是引用片段:
  public function RegAllNode()
  dim objNode
  for each objNode in s_objNodeRoot.childNodes
  if objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "0" then
  if Reg(objNode.childNodes.item(0).nodeValue , true) then
  objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = 1
  else
  RegAllNode = true
  end if
  end if
  next
  end function

  ’-----------------------------------------

  ’目的: 注册DLL

  ’参数: strPath: 要注册Dll文件路径

  ’ blnLoding: 是否等待注册完成才继续执行程序

  ’返回: 如果blnLoging=TRUE,注册成功就返回True

  ’-----------------------------------------

以下是引用片段:
  private function Reg(strPath , blnLoding)
  dim objShell
  set objShell = CreateObject("Wscript.Shell")
  if objShell.Run("regsvr32.exe /s " & strPath , , blnLoding) = 0 then
  Reg = true
  end if
  set objShell = nothing
  end function

  End Class


  阅读关于 ASP DLL VBScript CLASS 的全部文章 热卖推荐: 手机 诺基亚 MP5 电脑包 双卡双待 手机链 U盘 笔记本电脑

关注此文的读者还看过:

返回网页陶吧首页

共3页。 上一页123

软件频道最新更新

热点推荐

IT嘉年华

编辑推荐

软件下载

热门
推荐

网友关注

软件
资料
游戏

装机推荐

文章排行

本周
本月
最新更新
天极服务|关于我们|About us|网站律师|RSS订阅|友情合作|加入我们|天极动态|网站地图|意见反馈|MSN/QQ上看天极
Copyright (C) 1999-2012 Yesky.com, All Rights Reserved 版权所有 天极网络