Author Topic: Tags Library  (Read 60963 times)

chrisw100

  • Posts: 1
Re: NEW: Tags Library
« Reply #400 on: 23 Jun '17 - 09:48 »
Hi All

Apologies if this has been covered, but I can't seem to find details anywhere to help on how to update a cart tag and then save it back to the wav. It appears that I'm not setting the new value correctly, as if I  execute TagsLibrary_Save to a different filename, it will write 3k worth of tag data.

Heres the code (VB6) where I'm trying to set the EndDate value of cart chunk. Sadly the VB6 example doesn't have any save code example.
If I execute the TagsLibrary_SetTag code on its own, it returns a value of -1

Thank you

Chris.


Public Function SaveTag(FileName As String) As Integer
    If Not FileExists(FileName) Then
        SaveTag = TAGSLIBRARY_ERROR_WRITING_FILE
        Exit Function
    Else
        SaveTag = TagsLibrary_SetTag(LngTags, StrPtr("CART EndDate"), StrPtr("2017/01/01"), ttWAV)
        SaveTag = TagsLibrary_Save(LngTags, StrPtr(FileName), ttWAV)
    End If
End Function

3delite

  • Posts: 890
Re: NEW: Tags Library
« Reply #401 on: 28 Jun '17 - 05:14 »
Your code looks ok, checked the library's code and I don't see a reason why it doesn't work.
Is StrPtr() resulting a unicode string? All Tags Library functions require unicode strings.

EWeiss

  • Posts: 336
Re: NEW: Tags Library
« Reply #402 on: 28 Jun '17 - 06:30 »
Your code looks ok, checked the library's code and I don't see a reason why it doesn't work.
Is StrPtr() resulting a unicode string? All Tags Library functions require unicode strings.

see..
http://vb.mvps.org/tips/varptr/

greets
« Last Edit: 28 Jun '17 - 06:52 by EWeiss »