I wrote five articles about using Windows auto update APIs in March July. Article . Describes how to use system APIs for automatic updates. Program . After the article was published, some people asked me questions in this regard and I answered them one by one.
The following are some common problems:
Many may use VC for development. Here we provide some resources:
The http://www.codeproject.com/KB/install/whotfixcheck2.aspx can download its Source code
1. The patch path can be obtained. But it may not be all patches.
2. The automatically updated API is based on the COM component of the Windows system. Therefore, once the COM component of the system breaks down, the API may become unavailable.
3. In my articleCode Both are based on the wua Of The V6 version. if the version is not V6, you can upgrade it to V6 and run it again.
4. No matter the client you write or Microsoft's automatic update program, it calls the automatically updated DLL. Is based on the DLL.
When calling the DLL, no matter who calls it, there is only one process corresponding to it. (Svchost.exe ). In this process, there is only one instance. Therefore, as long as the DLL is being processed, it will not accept the second processing.
5. How to Implement Asynchronous operations (refer to the Code provided at the end of this article, which is limited to. Net), I used delegation in the code.
Article list:
Windows automatic update API (1)
Windows automatic update API (2)
Windows automatic update API (3)
Windows automatic update API (4)
Windows automatic update API (5)
If you are interested in this aspect, you can read the first article and refer to the code. I believe you can understand it very well.
Finally, I made a program in August, covering the content mentioned in the article, supporting proxy servers and asynchronous operations in the LAN. Forgive me for the fact that the mini-program is a little simple. Just use it as a demo. The code can be run in XP, but not in Vista.
I am very happy to share with you the technology. At the same time, if you have suggestions and good experience, you can leave your valuable comments. Thank you very much.
Download Code: autoupdateapp.rar
Author: appleseeker
Date: 2008-06-28