We have this code. Currently this is small (110k) dll. This dll can download and update files from internet. Update information stored on server in XML format. Currently this dll have interface only for C++. Now we don't distribute or support this dll. But if you want you can test this technology. WinMp3Locator (www.winmp3locator.com) already use this tehnology. Sprry for my bad english. Vladimir Romanov (vromanov@reget.com) =======================update.h===================== #pragma once #ifndef NO_UPDATE_LOG #include "RgLog.h" #endif static const UINT wm_UpdatePresent=RegisterWindowMessage("AutoUpdatePresent"); static const UINT wm_UpdateFinished=RegisterWindowMessage("AutoUpdateFinished"); static const UINT wm_UnlockFile=RegisterWindowMessage("AutoUpdateUnlockFile"); // lParam - it is the handle for further passing to GetMessageInfo BOOL InitUpdateSystem ( LPCSTR szUpdateID, LPCSTR szUpdateURL, LPCSTR szRegKey = NULL); // szUpdateID -Id of update // szUpdateURL - URL of update // szRegKey - main registry key // it should be subkey of HKCU // by default using Software\\ReGet Software\\AutoUpdate // return FALSE if case of error void SetCookie(LPCSTR szCookie = NULL); // szCookie - it would be sent as referer BOOL UpdateFromFile ( LPCSTR szFileName ); // szFileName - File with information about update // return FALSE if case of error BOOL IsAnyUpdateAvailable ( BOOL bForce = TRUE ); // bForce - FALSE check only new update // TRUE check all updates BOOL DownloadUpdate(BOOL bCheckUpdate, BOOL bAskForPackages, HWND hWnd); // downloads update in separate process // if CheckUpdate is TRUE new information will be retreived from server // if AskForPackages is TRUE the message about packages would be shown BOOL GetMessageInfo(LPARAM lParam, LPSTR szBuffer, int nBufferLength); // it is used for getting information about UnlockFile Message void RunAfterExit(LPCSTR szName); // it is uset for post an application to queue for further run (after update) void SetupUpdateSystem(); // it cleans the registry only #ifndef NO_UPDATE_LOG extern CRgLog g_UpdateLog; #endif #ifndef AUTOUPDATE_EXPORTS # ifdef _DEBUG # pragma comment(lib,"T:\\AutoUpdate\\debug\\Update.lib") # else # pragma comment(lib,"T:\\AutoUpdate\\Release\\Update.lib") # endif #endif //AUTOUPDATE_EXPORTS ============ Update.xml file sample ===============
M
Member_15198877
@Member_15198877