Option Explicit
Private Type eTagMP3
TagIdent As String * 3
Title As String * 30
Artist As String * 30
Album As String * 30
Year As String * 4
Comment As String * 30
End Type
Private TagMP3 As eTagMP3
Private Function GetMP3Tag(Path As String) As String()
Dim fNum As Integer
fNum = FreeFile
Open Path For Binary As fNum
Seek #fNum, LOF(fNum) - 127
Get #fNum, , TagMP3.TagIdent
If TagMP3.TagIdent = "TAG" Then
Get #fNum, , TagMP3.Title
Get #fNum, , TagMP3.Artist
Get #fNum, , TagMP3.Album
Get #fNum, , TagMP3.Year
Get #fNum, , TagMP3.Comment
End If
Close #fNum
End Function
Private Sub Command1_Click()
GetMP3Tag "C:\ase.mp3"
MsgBox TagMP3.Comment
End Sub
Thursday, June 14, 2012
Memperoleh Tag Sebuah File MP3 - VB6 Code
Labels:
Multimedia