Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[RESOLVED] Trouble accessing com library
Hi Gintaras, hi all

i have trouble with a Com library use.

I followed the steps showed in help file, it's an Illustrate dbpoweramp com object.
According to their documentation, it's a dll called dmscript.dll

So in QM i used Register, i get result= Component success, library did not try
I inserted typelib in init2 function

typelib DMCSCRIPTINGLib {E0F7789A-88C0-450B-AD6C-A7EB6D227127} 1.0

Copy      Help
DMCSCRIPTINGLib.Converter dMC._create

dMC is created and I can access com's interface, as shown, colored items prove it is accessible.

BUT this code fails:

Copy      Help
dMC.WriteIDTag("q:\avant.mp3" "Artist" "HHHHH")

error: Error (RT) in Macro6: 0x80040154, Classe non enregistrée**. ?
**Classe non enregistrée = unregistered class or something near...

What did I do wrong?
Nothing wrong with code. Maybe something wrong with the component, maybe it uses some other component that is unavailable. Also try to call its methods through IDispatch.

IDispatch dMC._create("progid")
dMC.WriteIDTag("q:\avant.mp3" "Artist" "HHHHH")

or in vbscript.
str code=
;set dMC=CreateObject("progid")
;dMC.WriteIDTag("q:\avant.mp3" "Artist" "HHHHH")
VbsExec code
is progid the dll path? or the name DMCSCRIPTINGLib ? or {E0F7789A-88C0-450B-AD6C-A7EB6D227127}? or wht else?
The component probably has code examples somewhere. It is like in examples. Usually it is like "Componentname.Classname". Or use uuidof(Typelibname.Classname).
ok, too complicated for me, thus it seems on dbpoweramp forums that it could be related that
x64 windows OS (like my Windows 8.1 x64 laptop) have problem to use
32 bits com objects (like this one), even if registering is ok

Is QM able to trick this?
ok last attempt

using regservr32 shows success too from library inside program directory, not from windows system
Macro Macro6
Copy      Help
typelib DMCSCRIPTINGLib "$program files$\Illustrate\dBpoweramp\dMCScripting.dll"
Macro Macro6
Copy      Help
DMCSCRIPTINGLib.Converter l._create

fails with error:

Warning in Macro6: This COM component was not registered: C:\Program Files (x86)\Illustrate\dBpoweramp\dMCScripting.dll
QM now registered it automatically. Automatic registration will not always work. Use it only when testing new components. ?
Error (RT) in Macro6: 0x80040154, Classe non enregistrée. ?

Probably this: ... Win7-64bit

My explanation (I guess):
On 64-bit Windows the program installs/registers only 64-bit version of the component. Also installs other 64-bit components that are used by the first component.
QM can use only 32-bit components. And they cannot use 64-bit components.
You register 32-bit version, and then _create succeeds. Then the component function internally tries to create other object, but its 32-bit version is not registered.
Need to know what is the second component, find its 32-bit dll, and register.
Well, it's tough because i don't have the possibility to do it.
hence, the project is mixing now 32 & 64 bits program as the migration is on its way, but not all the modules are completed so
it would be a chore to do.
I'll wait until total migration is over, maybe then i'll will work flawllessly.

but maybe you can help though here.

the 32 bit program coreconverter can be invoked as command line.
general syntax is this:

"C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe -infile=''q:\avant.mp3'' -convert_to=''[ID Tag Update]''
"c:\program files\illustrate\dBpoweramp\coreconverter.exe" -infile="c:\afile.wav" -outfile="c:\outfile.mp3" -convert_to="mp3 (Lame)" -V 2 -convert_to=''[ID Tag Update] -exportart=''q:\folder.jpg'

RunConsole2("C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe -infile=''q:\avant.mp3'' -convert_to=''[ID Tag Update]'' -exportart=''q:\folder.jpg''" _s "q:\" 1)

but it does not work, maybe because my x64 windows machine fails to operate with 32 bits command.
Too, can you recall me the syntax for escaping brackets, my examples in my code does not ring a bell anymore.
Maybe that way could be used if you explain me how to achieve it.
Macro Macro2119
Copy      Help
str s=
;"C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe" -infile="q:\avant.mp3" -convert_to="[ID Tag Update]"
RunConsole2 s
no, not working and as the shell command window is just flickering, i can't get why in console.

The QM output only show letter "E"...
Ok Gintaras,

the command line works with other syntax

Macro NettoyerTagsNormal
Copy      Help
str s=
;"C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe" -infile="q:\avant.mp3" -outfile="q:\gg.aif" -convert_to="Aiff"

so I really think the problem comes from the brackets in the tag update name, they seem mandatory.
Any other way to format it?

should be exactly
-convert_to="[ID Tag Update]"
QM does not change the string, does not replace [ ].
TADA!!! (sound of victory)

tweaked like this:

Copy      Help
str g="[ID Tag Update]"
str s=
;"C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe" -infile="q:\avant.mp3" -outfile="q:\gg.aif" -convert_to="{g}" -exportart="folder.jpg"

RunConsole2 s _s

After hours of struggle, it is a SUCCESS.

TY Gintaras....
Yes, use F if the tag is variable.
Macro Macro2126
Copy      Help
str s1=
;"C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe" -infile="q:\avant.mp3" -outfile="q:\gg.aif" -convert_to="[ID Tag Update]" -exportart="folder.jpg"

str g="[ID Tag Update]"
str s2=
;"C:\Program Files (x86)\Illustrate\dBpoweramp\CoreConverter.exe" -infile="q:\avant.mp3" -outfile="q:\gg.aif" -convert_to="{g}" -exportart="folder.jpg"

out s1
out s2
out s1=s2

Forum Jump:

Users browsing this thread: 1 Guest(s)