tags:

views:

17

answers:

0

Hi, I have C# com object and i'm trying to call function from jscript. This function get parameters (other com object) and use another dll to do something. The object created but when i'm calling the function i'm getting this error: Could not load file or assembly 'MyDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

var connection = new ActiveXObject("MyClass.ConnectionClass");
connection.A = "A"
connection.B = "B"

var instanceRef = new ActiveXObject("MyClass2.Class");
instanceRef.Create(connection);

The Create function throw the exption i wrote above (whithin the create function i'm using MyDLL to do something).

By the way - the same code works in powershell.

What can be the reason? Thanks is advance!