I'm on a Windows 10 64-bit system and I registered a dll using RegSvr32.
I received the following message after the RegSvr32:
--------------------------- RegSvr32 --------------------------- DllRegisterServer in myspecial.dll succeeded. --------------------------- OK ---------------------------
When I tried to run a basic VBS file that does the following:
Set obj = CreateObject("myspecial.clsmycode")
I receive the following message after trying to run that VBS code:
--------------------------- Windows Script Host --------------------------- Script: C:\test.vbs Line: 3 Char: 9 Error: ActiveX component can't create object: 'myspecial.clsmycode' Code: 800A01AD Source: Microsoft VBScript runtime error --------------------------- OK ---------------------------
Does anyone know what I am doing wrong or what I need to do to get this to work?
The solution:
My 32-bit DLL was indeed registered on my 64-bit Windows 10 system, however, I was trying to run the script in 64-bit mode. Also, since I was trying to use this DLL within ASP on IIS, it was not working because 32-bit applications were not enabled.
The problem was solved by doing the following:
1) Enabled 32-bit applications within the application pool within the IIS settings.
2) Ran the script in 32 bit mode using this method:
A: How do I run a VBScript in 32-bit mode on a 64-bit machine?