tags:

views:

202

answers:

2

i have created a C# dll file on my machine as shown below:

namespace myDLL
{   
   public class myClass
   {
      public string myFunction()
      {
          return "I am Here";
       }
   } 
}

then i created a tlb file with "tlbexp" command, then i used the "regasm" command n registered this dll on my machine.

When i created an object of type myClass on my machine using VBScript, everything is working fine... here i used the CreateObject() method as shown below:

Set myObj = CreateObject("myDll.myClass")

Now i want to create an object of type myClass from VBScript that is running on another machine, how can i do this. please help me how can i access that dll file, am using the CreateObject() function as shown below:

Set HD = CreateObject("myDll.myClass","myMachineName")

now am getting error as "permission denied".

+1  A: 

It appears that this is supported if the assembly is built with as COM visibility enabled.

http://stackoverflow.com/questions/600012/is-it-possible-to-execute-a-net-assemblydll-from-vbscript

By the way, I was pretty delighted to find out that there is a JScript compiler for .NET which allows one to write .NET code using JScript and also to target other .NET assemblies but unfortunately I haven't found anything similar for VBScript.

jpierson