帮助...无法创建ActiveX组件错误 [英] Help...Cannot create ActiveX component Error

查看:232
本文介绍了帮助...无法创建ActiveX组件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助.当我在下面运行此代码时,我需要它连接到远程计算机并从edm文件中提取信息.如果我使用本地主机,则可以使用,但是当我放置一台计算机(zachary)而不是使用"时.我得到无法创建activeX组件".

请帮忙...

I need some help. When i run this code below i need it to connect to a remote computer and pull information from an edm file. if i use the local host it works but when i put a machine(zachary) in stead of using a "." I get "Cannot create activeX component".

Please help...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim strComputer As String = TextBox1.Text
    objsh = CreateObject("WScript.Shell")

    ''# Get the Novadigm system folder
    StrSystemDir = GetIdm("system")

    ''# Use ASERVICE.EDM to read
    strObject = StrSystemDir & "Lib\SYSTEM\RADIA\SOFTSRVC\ASERVICE.EDM"

    Dim process = GetObject("winmgmts://zachary/root/novadigm:NVD_Agent")
    Dim method = process.Methods_("GetValue")
    Dim inParameters = method.inParameters.SpawnInstance_()
    inParameters.Path = strObject
    Dim outParameters = process.ExecMethod_("NumberOfInstances", inParameters)
    Dim StrHeaps = (outParameters.InstanceCount)
    num_TextBox.Text = StrHeaps
    For i = 0 To StrHeaps Step +1
        inParameters.Index = i

        inParameters.Property = "ZOBJNAME"
        outParameters = process.ExecMethod_("GetValue", inParameters)
        Dim Value1 As String = outParameters.Value

        inParameters.Property = "ZAVIS"
        outParameters = process.ExecMethod_("GetValue", inParameters)
        Dim Value2 As String = outParameters.Value

        ListView1.Items.Add(Value1).SubItems.Add(Value2)


    Next

End Sub

推荐答案

您可能想看看:
http://www.lewisroberts .com/2006/02/28/remote-scripting-activex-component-cant-create-object-on-wshcontroller-object/ [
You might wat to have a look at this:
http://www.lewisroberts.com/2006/02/28/remote-scripting-activex-component-cant-create-object-on-wshcontroller-object/[^]

Good luck!


我所做的就是将文件复制到本地计算机并编辑该文件,然后在完成后将其复制回该计算机.之所以如此行之有效,是因为我们发现最好编辑一个副本,然后直接替换成副本以代替它.
What I did was copy the file to the local machine and edit the file and then when I''m finished it copies back to the machine. This works out great because we found out its better to edit a copy then replace it vice e dieting it directly.


这篇关于帮助...无法创建ActiveX组件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆