locked
dll installed but doesn't work! RRS feed

  • Question

  • I have a dll file that works fine in my 32-bit laptop but when I install it on my 64-bit PC it doesn't work!

    I have tried both System32 and SYSWOW64, they return successful installation but when I run a script that uses a class from the dll, it returns:

    Error: ActiveX component can't create object

    Code: 800A01AD 

    Monday, February 13, 2012 12:44 PM

All replies

  • Have you registered your component? It doesn't matter where you put the dll file, but you have to register it. Open a command prompt and enter:

    regsvr32 <path_to_dll_file>


    Check out My Blog. Now updated to actually work!

    Monday, February 13, 2012 9:26 PM
  • Yes I have registered it using the command prompt in administrator mode,

    the problem is that the dll containing the classes I need is a 32-bit COM object and my PC is 64-bit so it can't run the VB script simply by double clicking on it. However, I found a way to run the script using the Microsoft Virtual PC (XPM), but I am pretty sure that there should be an easier way.

    Monday, February 13, 2012 10:27 PM
  • You can accomplish this by just running your VBScript in 32-bit mode. The easiest way is to run a 32-bit command prompt, then execute the script from there. See the answer to this question for details.

    Check out My Blog. Now updated to actually work!

    Tuesday, February 14, 2012 2:30 PM
  • Is your .dll managed or unmanaged.

    If Managed, compile it again with "Any CPU" and it will work.

    If Un-managed, you need a 64-bit version of the dll.

    Thanks


    Vidya Vrat Agarwal. http://dotnetpassion.blogspot,com

    Friday, March 9, 2012 8:10 PM