Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4095
Number of posts: 14004

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re:exe+wav - I think I've got but what do you think? Posted by oracletwo on 19 Jan 2013 at 4:26 PM
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.
Report
Re:exe+wav - I think I've got but what do you think? Posted by _Atex_ on 24 Feb 2013 at 8:56 PM
: 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, seek 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:

http://www.programmersheaven.com/mb/pasprog/386825/386825/saving-information/?S=B20000#386825



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.