|
’---------------------------------------------
’目的: 添加一个DLL项目
’参数: strPath: DLL文件地址
’ blnReg: 添加后是否将其注册
’返回: 如果要求添加后注册,注册成功就返回1,注册失败返回0,已经有该项目并注过册就返回-1
’---------------------------------------------
以下是引用片段: public function AddNode(strPath , blnReg) dim objNewNode dim strStart dim objNode strStart = "0" set objNode = SelectNode(strPath) if objNode is nothing then if Reg(strPath , true) then strStart = "1" AddNode = true else AddNode = false end if set objNewNode = s_objXml.createElement("Dll") call objNewNode.setAttribute(s_strAttributeName , strStart) objNewNode.Text = strPath call s_objNodeRoot.appendChild(objNewNode) call s_objXml.save(s_strXmlPath) else if blnReg then if objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "1" then AddNode = true else if Reg(strPath , true) then objNode.Attributes.getNamedItem(s_strAttributeName).nodeValue = "1" call s_objXml.save(s_strXmlPath) else AddNode = false end if end if else AddNode = false end if end if end function |
上一页 [1] [2] [3] [4] 下一页 |