Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

31337noob

NEED HELP PLEASE!

This topic is 5229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want to know how to bind two or more files together. like a exe attached to a jpg and it will also run the exe thats what binding is. how do i do this? thanks in advanced.

Share this post


Link to post
Share on other sites
Advertisement
You''re being a little vague. Are you developing an application you want to attach resources to? Are you developing a pak file format? What language? What platform? More info is needed.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://www.catb.org/~esr/faqs/smart-questions.html#bespecific

Share this post


Link to post
Share on other sites
If you just need to distribute your exe with the file its easy


dim ifl() as byte
dim ffl() as byte
dim ofl() as byte
open exefile for binary as #1
redim ifl(lof(1))
get #1, , ifl
close #1
open fileadded for binary as #1
redim ffl(lof(1)) as byte
get #1, , ffl
close #1
for x = 0 to ubound(ifl)
ofl(x) = ifl(x)
next x
for x = 0 to ubound(ffl)
ofl(x + ubound(ifl) + 1) = ffl(x)
next x
open outfile for binary as #1
put #1, , ofl
put #1, , ccur(ubound(ifl))
close #1


That just 1. gets the two files, 2. puts the exe before the jpg and 3. puts the length of the exe on the end of it.

To get it out, just use

dim bn() as byte
dim lf as currency
dim of() as byte
open file for binary as #1
redim bn(lof(1) - 4)
get #1, bn
get #1, lf
close #1
open file for binary as #1
redim of(ubound(bn) - lf)
get #1, lf, of
close #1
open fout for binary as #1
put #1, of
close #1


Thats how i do it... if you want something different, just ask.

Share this post


Link to post
Share on other sites
Do you mean file associations? Where you have SomeFile.yourFileExtension and you want your own application to start whenever the file is double clicked? IIRC, your app will receive the filename as an argument to your main method, then you need the registry to associate the .something with your actual exe.

try here

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!