Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Re:exe+wav - I think I've got but what do you think?

oracletwooracletwo Posts: 14Member
This is about attaching a wav file to an executable so that it's not
separate. My solution isn't elegant but I'm sure it'll work 'cause I've
done it with bmps: I'm going to try and put all the data of the small
wavs I'm using into an overlay unit, then hopefully print it all back
out into a new wav file. It won't be much bigger than the wav itself.

The only potential catch will be to make sure that all the data is
transferred to the new file. I'm just about to try it all out. Wish me
luck. Sure would like to get into TPW or Delphi. They are so great but
I hear the books needed are expensive. Best wishes... oracletwo

PS: Been having better luck working with pointers but using pointers won't solve the issue of not having separate files. Previously I used
binobj to make a wav file into an object and then to join them using
copy /b myprog.exe+mywav.obj but the object didn't stay attached.

Comments

  • _Atex__Atex_ Posts: 163Member
    : This is about attaching a wav file to an executable so that it's not
    : separate. My solution isn't elegant but I'm sure it'll work 'cause
    : I've
    : done it with bmps: I'm going to try and put all the data of the small
    : wavs I'm using into an overlay unit, then hopefully print it all back
    : out into a new wav file. It won't be much bigger than the wav itself.
    :
    : The only potential catch will be to make sure that all the data is
    : transferred to the new file. I'm just about to try it all out. Wish
    : me
    : luck. Sure would like to get into TPW or Delphi. They are so great
    : but
    : I hear the books needed are expensive. Best wishes... oracletwo
    :
    : PS: Been having better luck working with pointers but using pointers
    : won't solve the issue of not having separate files. Previously I used
    : binobj to make a wav file into an object and then to join them using
    : copy /b myprog.exe+mywav.obj but the object didn't stay attached.
    :


    It is possible to just attach the file after your exe, thus making one concatenated file. The trick is that you have to know at what position your data is and whats the length. To access it you'll open your exe file, [b]seek[/b] to the beginning of the data and read it from there. Your can do this with multiple files too, not just one. Look at this simple demo, it may give you an idea or two:

    [link]http://www.programmersheaven.com/mb/pasprog/386825/386825/saving-information/?S=B20000#386825[/link]
Sign In or Register to comment.