1) V2Duration Usage example
'Set a reference to the V2Duration.dll : "Project" -> "Add reference" -> browse for V2Duration.dll .
'Now setup the Import once to avoid too long declarations:
Note: Put the following lines of code into a Sub!
'Declare calculation class object:
Dim V2Duration = New V2Duration.V2Duration
'Now I Show you 2 Options to read the *.v2m file:
'1) Read the *.v2m file from a path (into a Bytearray):
Dim File() As Byte = My.Computer.FileSystem.ReadAllBytes("C:\Users\Freefall\Desktop\Flowers.v2m")
'2) Read the *.v2m file out of the program ressources (into a Bytearray):
'Of course you need to put it into the ressources before!
'To do this, goto "Project" -> "Properties" -> "Ressources" -> drag & drop the file in._
Dim File() As Byte = My.Resources.Flowers
'-> Finally use the calculation function to show the music duration time:
MsgBox("The duration is " & V2Duration.CalcV2Dur(File).ToString & "s.")