Results 1 to 3 of 3

Thread: problem using binary data with a stream

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Location
    Aberdeen, WA
    Posts
    2

    problem using binary data with a stream

    I have a database of my MP4 music files, and I'm trying to use VBA to modify the Header info.

    I can load the file into a stream, modify the part of the header that I want to, but I can't write back to the stream.

    I believe it has something to do with converting to Unicode and back.

    If I don't convert to unicode and back, I can write, but as soon as I conver, I can't write. It says "Arguments are of the wrong type, are out of acceptable range, or are in conflict with oneanother.

    Here's the code:

    Dim st As Stream
    Set MyStream = New Stream
    MyStream.Open
    MyStream.Type = adTypeBinary

    MyStream.LoadFromFile "c:\audia.m4a"
    Dim stri As Variant, aoeu as String
    stri = MySteram.Read()
    aoeu = StrConv(stri, vbUnicode)

    ' Replace the text in the header that I want, etc...

    stri = strconv(aoeu, vbFromUnicode)
    MyStream.write (stri)
    MyStream.Close

    --------------

    I don't really know much about unicode, so hopefully it's something simple.


    Thanks for any help!
    Last edited by Evan Scamman; Oct 30th, 2004 at 11:42 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width