Re: Problem registering dmcscripting dll in Windows 64 Pro
I'm attempting to do write a C{sharp} program to access the dll for scripting and I'm receiving a similar problem as has been posted in by others in the thread.
Computer: Win 7 Ultimate 64 Bit
dbPoweramp Ver: 15.0 (preceded by attempts with R14.2)
Development IDE: Visual Studio Pro 2013
other bits:
a) dbPoweramp 15 was installed using it's installer (where it reports it registered it's dll's - particularly the 64 bit version ~543 kb in size from "Program Files")
b) Preceding my attempt with 15 I was attempting to use the 14.2 release dll (~529 kb), which I registered manually using Regsvr32 (these attempts were unsuccessful)
c) Target in the IDE is set to Any CPU (but x86 was also attempted - trying anything at that point)
d) The proper dll's for 15 and 14.2 were added successfully as references to the project in VS during each attempt
Specifically, the error in VS debug is as follows:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Retrieving the COM class factory for component with CLSID {1C2E0932-61B5-4EAB-A832-06EE6564047D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
The exception pops up in the console when with the following (when not running debug mode):
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Retrieving the COM class factory for component with CLSID {1C2E0932-61B5-4EAB-A832-06EE6564047D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.RuntimeTypeHandle.CreateInstance( . . . )
at System.RuntimeType.CreateInstanceSlow( . . . .)
at System.RuntimeType.CreateInstanceDefaultCtor( ....)
at System.Activator.CreateInstance ( . . . .)
at System.Activator.CreateInstance (. . . )
at {the line of code in my C* program which is calling the DMCSCRIPTINGLib.Converter() constructor}
I realize this may very well be partly a setup issue with the development environment - but it seems like it might be something which is common enough that others might benefit from understanding what isn't happy in the setup. I would really like to be able to write a program in C{sharp} or Java that can access/manipulate my music tags, catalog etc the way I need/want it done, and so using this interface is pretty important to that end.
So if anybody can shed some light onto why me (and it appears others) are getting this COMException it would be greatly appreciated. Thanks,
Also, if there is some other piece of info needed which I left out just ask - I tried to get most relevant facts.
<<UPDATE:>>
This other thread was raised discussing what looks to be the same problem, but offered no resolution: "REGISTER dmcscripting.dll for use on Windows 7 64 bit with VB 2010 Express"
I looked around on the web, some people have suggested that some COM objects require admin privilege to be exercised and that running the IDE as administrator fixes that issue. So I tried restarting VS as Admin, but unfortunately the behavior is the same.
<<UPDATE\>>
Last edited by scooby; December 23, 2014, 07:14 AM.
Re: Problem registering dmcscripting dll in Windows 64 Pro
Originally posted by Spoon
The example .vbs script runs on your system?
No, I created a small VB script to (using the exampels) to create a dMCScripting.Converter object. After succesfully getting the WshShell object and assigning it to WshShell as in the example, CreateObject with dMCScripting.Converter failed. The unhandled exception occurred stating "Cannot create ActiveX component". This is from within VS being run as Administrator in debug mode.
Also, my registry currently has the following entries:
<<Update>>
I should add that these registry entries are under HKCR but I also attempted to create an identical entry under HKCU for dmcscripting.converter while troubleshooting yesterday - but no breakthrough.
Re: Problem registering dmcscripting dll in Windows 64 Pro
A Brief Announcement:
I think I've been able to prove to myself that this is something to do with permissions of the account used by VS to execute the creation of the COM component (or something along those lines). I can successfully create a vbs which creates the COM component if called via an admin command prompt with cscript by own hands. But, when I write a C{sharp} program in VS to call cscript with the same vbs, it (the visual basic script) fails to create the COM object.
This seems odd, since I'm running VS in Administrator mode. Perhaps running VS as Administrator does not extend to running executables as an Administrator?
I have not been able to find a setting yet to make VS run executables it builds as administrator.
Re: Problem registering dmcscripting dll in Windows 64 Pro
Originally posted by Spoon
Try on the build settings page >> Platform Target >> 64 bits
Yeah that's exactly right. I had to change the target from "Any CPU" to "x64" in the project. Then it worked creating the object in C{sharp}. Note that this was also running VS as administrator. Also, along the way I changed the project setting in a number of locations to allow more permissions including the one-click settings to allow full permissions. I don't know yet if that was all necessary. I should try to create a new project without all the extra stuff and see if setting target to x64 was enough. I'll post back with the result so that others may know what I find.
Re: Problem registering dmcscripting dll in Windows 64 Pro
Originally posted by scooby
Yeah that's exactly right. I had to change the target from "Any CPU" to "x64" in the project. Then it worked creating the object in C{sharp}. Note that this was also running VS as administrator. Also, along the way I changed the project setting in a number of locations to allow more permissions including the one-click settings to allow full permissions. I don't know yet if that was all necessary. I should try to create a new project without all the extra stuff and see if setting target to x64 was enough. I'll post back with the result so that others may know what I find.
thanks!
Yeah - works fine without admin privilages or anything else (default project settings) as long as x64 is the target type instead of Any CPU.
Re: Problem registering dmcscripting dll in Windows 64 Pro
It seems that old Common Controls DLL is being loaded into your process, preventing dBpoweramp DLLs using new methods from loading.
Your exe used to create the process must have a manifest instructing Windows to load Common Controls 6 from the relevant WinSxS folder. The default (no manifest) is to load Common Controls 5.82 from Windows\System32, which is Windows 2000 era stuff preserved for compatibility with very old programs.
Comment