PDA

View Full Version : Tag reading with Visual Basic



cm29ds
02-16-2015, 05:57 AM
Hey Guys,

i'm trying to write a programm which is able to read tags from any FLAC file. I used this guide to read tags with dbPoweramp Music Converter: https://www.dbpoweramp.com/developer/dMC-Scripting%20vb%20.NET.txt

So I imported the DMCScripting.dll from the dbPoweramp into my Visual Basic Project and put this into a Button:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim dMC
dMC = CreateObject("dMCScripting.Converter")
Dim i
For i = 0 To 10000
Dim Element As String, Value As String
Element = ""
Value = ""
Call dMC.ReadIDTag("C:test.flac", i, Element, Value)
If Element = "" Then Exit For
MessageBox.Show(Element + ": " + Value)
Next
End Sub

While debugging i always get a exception at the marked point: The Active-X Componet could not be created. I realy have no idea how to fix this error. Please tell me wether it is possible to read all tags out of a FLAC file.


Sorry for my bad English...

Spoon
02-16-2015, 06:19 AM
Save the .vbs script file to your computer and run it, this will show that dBpoweramp is correctly registered with system.