clsUpdate is a ActiveX EXE that can be called from an executable and used to download program updates from a remote FTP Server. You can download multiple files, supports closing and restarting the app, shows file progress stats, and because it is an ActiveX EXE, it can run without the calling app. The code has lots of commenting, so it should be easy to follow.
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
Re-scan downloaded files using your personal virus checker before using it.
NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Scan the source code with Minnow's Project Scanner
If you don't have a virus scanner, you can get one at many places on the net
Terms of Agreement:
By using this code, you agree to the following terms...
You may use
this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
You may link to this code from another website, but ONLY if it is not wrapped in a frame.
You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
Looks like really tight code, but I am having a problem in clsUpdate. The sub UpdateApplication is gacking when I attempt to update the actual application exe file. It cannot copy over the file, because it is still running. I noticed you had an objwindow.Killapp commented out, which I am assuming was an attempt to actually delete the exe. What am I missing? Thanx... (If this comment was disrespectful, please report it.)
Sorry about that... I started writing this app and got sidetracked. Haven't tested everything. The project I wrote it for has never needed to shut it down ..yet. My original intent was to have this object called from code and pass it the proper settings and close out the app. Since it is an ActiveX exe, it could continue to run even without the calling program running, but my thinking was flawed. What will actually happen is that the object will get called run and finish running without making it to the application shutdown statement. The best solution is probably to pass the app hwnd to the activex exe and shut down the app using a win api call. I try working on it some more and post a newer version. (If this comment was disrespectful, please report it.)
I have a problem in CFTP/ function GETFTPFILESIZE: I want to download 5 setup files from FTP server, one of them is 13.6M. When I run the application on Windows NT4, everything is excellent. But when I run it on Windows 2000. It failed for downloading the third file. I debugged, the reason is FtpFindFirstFile()didn't return a value for the third file. I checked Microsoft web site, it says this API requires Minimum operating systems Windows NT. I think it should work on Win2K, am I wrong? Thanks! (If this comment was disrespectful, please report it.)
Hi there, it looks really good but when I load in the project1 which calls the activex exe it gives an error saying "Could not create reference", but I have compiled it with /regserver ... I can of course goto reference and choose it manually but shouldn't it be using the same GUID or something??
THanks in advance
Ian (If this comment was disrespectful, please report it.)
this codes are very useful if in your programs, you estimate to make various littles changes and you don't want to say to all the users "Download the new fix from the website" :P
Thanks, really thanks for this amazing code =) (If this comment was disrespectful, please report it.)
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular code, please
click here instead.)