Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help]Saving files from net - C++
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Wed Jul 18, 2007 5:46 am    Post subject: [Help]Saving files from net - C++ Reply with quote

i'm trying to code a program wich downloads a file from the net, but i'm blocked after i've received the data with recv, on how to save it to a file.. (i know it's a silly question, but i can't find anything on google just some random download pages)

should i create an empty file first then write to it in binary mode or there is an another way?

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Wed Jul 18, 2007 6:48 am    Post subject: Reply with quote

you recv it into a buffer, you use createfile and writefile to dump it to a file
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Wed Jul 18, 2007 10:37 pm    Post subject: Reply with quote

ok thanks a lot Smile
_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Fri Jul 20, 2007 3:46 am    Post subject: Reply with quote

does URLDownloadToFile work in C++?
_________________
Get kidnapped often.
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Fri Jul 20, 2007 3:58 am    Post subject: Reply with quote

isn't URLDownloadToFile IE dependant?
_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Fri Jul 20, 2007 4:02 am    Post subject: Reply with quote

yes. does anyone now have IE nowadays, e.g. you using windows 95 still or something?

i wouldnt say it is a perfect solution but it seems a lot more straightforward

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Fri Jul 20, 2007 5:21 am    Post subject: Reply with quote

btw i'm getting
FilesDownloader.cpp urlmon.h: No such file or directory.
and i've already put #include <urlmon.h> and linked to urlmon.lib...

but looks like dev C++ missing the header file

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Jul 20, 2007 9:59 am    Post subject: Reply with quote

dev-c++'s header files/libraries are old and smelly. If you want to continue using dev-c++ then download the latest things from the mingw website and replace all your files. otherwise, get a better compiler (or do dynamic linking but that's a temporary solution to a permanent problem).
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Fri Jul 20, 2007 10:21 am    Post subject: Reply with quote

Dev sucks

go with VC++

can dev even compile something that isnt cmd line?

_________________
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Jul 20, 2007 10:34 am    Post subject: Reply with quote

dev doesn't suck, MingW sucks, but most people don't know how/don't bother to set dev up to use a different compiler than MingW.
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Fri Jul 20, 2007 11:14 pm    Post subject: Reply with quote

i'm using dev c++ because i'm connected from an internet point (i'm on holiday) and visual c++ is too big and slow to download :/
_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Sat Jul 21, 2007 4:25 am    Post subject: Reply with quote

Robotex wrote:
i'm using dev c++ because i'm connected from an internet point (i'm on holiday) and visual c++ is too big and slow to download :/


PROGRAMMING on a HOLIDAY?!

yeah ok, maybe its time to relax and do some light coding...=.=

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Jul 21, 2007 4:34 am    Post subject: Reply with quote

blland wrote:
Robotex wrote:
i'm using dev c++ because i'm connected from an internet point (i'm on holiday) and visual c++ is too big and slow to download :/


PROGRAMMING on a HOLIDAY?!

yeah ok, maybe its time to relax and do some light coding...=.=


Aha, who would program on holiday? Thats a bit.. Strange considering theres many more things you could be doing!

Remember, what you do on holiday stays on holiday! Twisted Evil
Back to top
View user's profile Send private message MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat Jul 21, 2007 3:23 pm    Post subject: Reply with quote

noz3001 wrote:
blland wrote:
Robotex wrote:
i'm using dev c++ because i'm connected from an internet point (i'm on holiday) and visual c++ is too big and slow to download :/


PROGRAMMING on a HOLIDAY?!

yeah ok, maybe its time to relax and do some light coding...=.=


Aha, who would program on holiday? Thats a bit.. Strange considering theres many more things you could be doing!

Remember, what you do on holiday stays on holiday! Twisted Evil


You keep telling yourself that, maybe your herpes will go away. Laughing
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Sat Jul 21, 2007 10:40 pm    Post subject: Reply with quote

well, i'm in a foreign country, i can't speak the local language, and i don't know much the places :/
i haven't got much to do, except homework...

btw updating the windows 32 api headers has deleted getaddrinfo and urlmon is still missing

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites