1

For reasons I won't get in to, I have to create an object from a .NET dll in javascript. The browser I'm using is some ridiculous proprietary thing, but that means it has no security settings, so I'm 100% that's not the issue, before everyone starts chiming in about IE's ActiveX settings.

I found the .dll that held the class I needed, and regasm'ed it. I tracked down its CLSID in my registry, just to make sure that everything took and that the library names were still the same.

So now I'm calling new ActiveXObject() using its ProgID in Javascript, and my try-catch is returning "Automation server can't create object." Any other object I try to make works fine, just not this one.

I've been using this class successfully inside Visual Basic, but the Committee Upstairs has decided that instead of a nicely packaged .EXE, they want a web app that runs inside this browser of theirs (I guess to justify wasting all that money on a license for it).

So, what have I forgotten to do? What's the correct chain of events that needs to take place to successfully create an object from a .NET dll in JavaScript?

mplungjan
  • 169,008
  • 28
  • 173
  • 236
NickGlowsinDark
  • 337
  • 1
  • 6
  • 17
  • 1
    You have forgotten to post some code – mplungjan Apr 01 '14 at 12:28
  • The code isn't the problem, it's the process. I've discovered that if I use an tag, I can create the object, but not access any of its methods or properties. Something about the way I tried to make it COM-accessible; that's all I'm looking for clarification on. – NickGlowsinDark Apr 01 '14 at 12:41

1 Answers1

0

Can you

  1. use a reflector (i.e.. ilspy) a) given it's not obfuscated

  2. decompile the library

  3. migrate the methods/functions into a JavaScript library? You might be able to use a tool like JSil to help you convert that code if you are unfamiliar with the library code base.

mg3
  • 121
  • 1
  • 5