Jump to content
  • Advertisement
Sign in to follow this  
md_lasalle

Auto update Win32 .exe files

This topic is 4196 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

Hi all! I did a small launcher in my app that check with a server if the current version is still up to date. When the launcher detects a new version, it automatically downloads the files. How the file transfert works : -I'm chunking the files in 1k packets -Clients open a file in "wb" mode and rewrite the file on his side My problem is that it seems that my .exe files are considered as Invalid Win32 Application after the update i took a look at the file sizes, and they are the exact same!! what could be causing this ? thanks for any help.

Share this post


Link to post
Share on other sites
Advertisement
It sounds like the file is getting corrupted somewhere along the line, probably in some subtle and nasty way. I would recommend finding a binary difference (bindiff.exe comes with XP Pro; there are others available on the web) tool and seeing if you can locate the difference between the "clean" EXE and the downloaded one.

That should give you some hint as to where and how the corruption is being introduced.

Share this post


Link to post
Share on other sites
At a command prompt you can also do "fc /b original.exe downloaded.exe" to see the differences, albeit in a very rough dump form.

Share this post


Link to post
Share on other sites
Hey thanks guys! Apoch was right, something was corrupting the files along the way... just a desynchronism between the sizes of the send and receive buffers.

Server was sending 1k packets while receiver 510bytes packets

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!