GFMP3/DefaultHeaderCreator.frm
VERSION 5.00
Begin VB.Form Form1
Caption = "Default Header Creator"
ClientHeight = 2898
ClientLeft = 56
ClientTop = 406
ClientWidth = 4368
LinkTopic = "Form1"
ScaleHeight = 2898
ScaleWidth = 4368
StartUpPosition = 3 'Windows‑Standard
Begin VB.TextBox Text1
BeginProperty Font
Name = "Courier"
Size = 9.27
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2814
Left = 56
MultiLine = ‑1 'True
ScrollBars = 3 'Beides
TabIndex = 0
Top = 56
Width = 4270
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'(c)2003 by Louis. Opens '%programdir%\Default Empty ID3v2.3 Header.dat', reads in the binary string and transforms it into VB code that created exactly the read string.
'
'NOTE: use this program to get the default header for GFMP3.MP3TAG2_WriteByteEx().
'To get the data of the read file open Winamp 3, load any mp3 without ID3v2 TAG
'and save the empty TAG. Then open the mp3 file using a hex editor and copy the
'newly added bytes to 'Default Empty ID3v2.3 Header.dat'.
Private Sub Form_Load()
'on error resume next
Dim FilePath As String
Dim FileString As String
Dim LineLength As String
Dim Temp As Long
Dim Tempstr$
'preset
FilePath = App.Path
If Not (Right$(FilePath, 1) = "\") Then FilePath = FilePath + "\"
FilePath = FilePath + "Default Empty ID3v2.3 Header.dat"
'begin
Open FilePath For Binary As #1
FileString = String$(LOF(1), Chr$(0))
Get #1, 1, FileString
Close #1
Tempstr$ = "HeaderDefault = _" + Chr$(13) + Chr$(10)
For Temp = 1 To Len(FileString)
Tempstr$ = Tempstr$ + "Chr$(" + CStr(Asc(Mid$(FileString, Temp, 1))) + ")"
If Not (Temp = Len(FileString)) Then Tempstr$ = Tempstr$ + " + "
If (Temp Mod 16) = 0 Then
If Not (Temp = Len(FileString)) Then Tempstr$ = Tempstr$ + "_ " + Chr$(13) + Chr$(10)
End If
Next Temp
Text1.Text = Tempstr$
End Sub
[END OF FILE]