View Full Version : How do I access a VB .dll from Javascript

01-08-2005, 01:02 AM

I am a C++ programmer new to Javascript.

I am trying to access a VB .dll from Javascript.

Is this possible?

I am new and hope this is not too naive a question.

The basic idea I have here is to place proprietary information and methods in a .dll, since the Javascript can be read by anyone.

Thanks so much for your help!


Chris Schene

01-08-2005, 11:12 PM
Something similar is possible via the res:// protocol, but practically only when hosted by mshta.exe. Otherwise, registering a Windows Script Component from inside a dll (if possible) would give you a callable COM object. Then there's JScript.Net which provides resource/compile capabilities & stuff.
Basically, I don't know. ;)

01-10-2005, 11:27 AM
if you create the dll as an activeX, you can use it wit javascript's createactivex thingy

01-13-2005, 02:26 AM

I tried the createActivexObject and it worked great!

I did have to tag the .dll as "safe for scripting" and "safe for initilaization" uisng the VB package deployment wizard to avoid getting an annoying warning message when the objuect was loaded.

Thanks much!