views:

24

answers:

2

I have a .NET library that I'm registering for COM interop. Everything works fine on my machine (windows 7 x64) -- I register the library using regasm and VBScript can run CreateObject just fine. I unregister it and CreateObject fails. Just as you'd expect.

However, when I put this exact same library on my server (Windows Server 2008 x64) and run regasm (which says the library was registered correctly), I cannot get VBScript's CreateObject to actually work. I keep getting an error

800A01AD (ActiveX component can't create object)

which is the exact error I get on my local box when I unregister the library from COM.

The only thing I can come up with is that this is a security thing. What do I need to check vis a vi security in COM?

A: 

Can you show the full command you are using to register the .dll?

according to the article here :http://www.osmstudios.com/Display.asp?Page=asp_emaildll

you should be running the following commands from the command line:

regasm <location of file from the root> /tlb:<name of DLL>.dll 

gacutil -i <location of file from the root>
Jesse McCulloch
+1  A: 

There are two versions of Regasm.exe on an x64 machine. Sounds like you used the 32-bit version, it only adds registry keys to the 32-bit view of the registry (HKLM\Software\Wow6432Node). To make it work for code that runs in 64-bit mode you'll have to also register it for 64-bit code. And of course your .NET component must not have any dependencies on 32-bit unmanaged code.

The 64-bit version is located in c:\windows\microsoft.net\framework64

Or use the 32-bit version of the vbscript engine.

Hans Passant
my library is getting called by a 32 bit app, so I doubt it's using 64 bit version of VBScript engine...
statichippo
Well, swap 64 and 32 in my answer. But use both versions of Regasm before you do.
Hans Passant