Im using the winsock control to build a simple FTP-program. I know how to download a file in ASCII from the server.

But what about binary files, such as images?

I've tried to just get the data and store it into a new file...but it doesn't work...I guess that I should do some reading in binary file access etc...but for now...how is it done?

Maybe someone could show me some basic explanations in how binary data is used, how it works and in what way I can and should use it...or just how I save it into a new file.

Thanks in advance!