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 


[C++] File transfer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Apr 01, 2009 8:26 am    Post subject: [C++] File transfer Reply with quote

What APIs do I use for creating file transfers? I can imagine using sockets, but do I literally send the file data over? There must be some kind of better method to doing it. I'm asking because I'm creating an auto-update for a program.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Apr 01, 2009 9:12 am    Post subject: Reply with quote

Yes you literally send data over lol. ReadFile, and send. There might be an easier method. What do you want to send it over? Ftp? Http?
_________________
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Wed Apr 01, 2009 10:51 am    Post subject: Reply with quote

TransmitFile() can be used to send files over winsock sockets. You can pass it the path of the file you want to send. I don't know about efficiency and I don't know if it checks if the data was send correctly (like a CRC check).
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Apr 01, 2009 11:51 am    Post subject: Reply with quote

tombana wrote:
TransmitFile() can be used to send files over winsock sockets. You can pass it the path of the file you want to send. I don't know about efficiency and I don't know if it checks if the data was send correctly (like a CRC check).


Thank you. I'll try that tonight.

lurc wrote:
Yes you literally send data over lol. ReadFile, and send. There might be an easier method. What do you want to send it over? Ftp? Http?


I'm going to use winsock for it. I can't believe you can actually literally send it over Laughing
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Wed Apr 01, 2009 1:25 pm    Post subject: Reply with quote

Rembember that when you manually send the file over winsock you have to divide the file up into chunks of max 4 kb or so. Otherwise the winsock buffer can't hold the data.
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Apr 01, 2009 3:49 pm    Post subject: Reply with quote

TransmitFile() doesn't require that, does it?
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Wed Apr 01, 2009 4:24 pm    Post subject: Reply with quote

How else would you send it? And I suggest using TransmitFile if your a beginner with winsock. But if you know enough winsock I'm sure you can find a more efficient way.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Apr 01, 2009 7:41 pm    Post subject: Reply with quote

I think TransmitFile() is probably the best way to do it over winsock.
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Wed Apr 01, 2009 7:49 pm    Post subject: Reply with quote

if you upload the files to a server/website, you can download them using

URLDownloadToFile()

_________________
Back to top
View user's profile Send private message Send e-mail
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Apr 01, 2009 8:05 pm    Post subject: Reply with quote

I could do that, but I probably won't. I like the idea of transferring from winsock better.
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
Page 1 of 1

 
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