Automatic update check in MFC?

  • Thread starter sweetjones
  • Start date
  • Tags
    Automatic
In summary, the individual is looking for information on how to implement a feature in their MFC-based application that would allow them to check for updates from a designated website on start-up. One suggestion is to use anonymous ftp to download a file containing the latest version number and check it using MFC's CInternetSession and CFtpConnection classes.
  • #1
sweetjones
44
0
I have a dialog-based application in MFC, and I was wondering what class or component do I need to implement in the app to check for new updates? For example, on start-up have the app check for a new update from a designated website. I am using VSC++2005. Let me know if you need more info or a better clarification on what I'm talking about. Thanks In Advance!
 
Technology news on Phys.org
  • #2
Easiest way is to make an anonymous ftp connection to your site and download a simple file called eg 'latest.txt' and check the version number inside it.

Ftp is faily easy to implement from MFC see CInternetSession and CFtpConnection
 
  • #3


I am not an expert in MFC or VSC++2005, but I can provide some general guidance on implementing automatic update checks in an application.

Firstly, it is important to determine the specific requirements for your update check. For example, do you want to check for updates on application start-up or at regular intervals during use? Do you want to check for updates from a designated website or from a central server? These considerations will help determine the appropriate approach for implementing the update check.

In terms of the MFC framework, there are a few potential classes or components that could be used for implementing the update check. One option could be to use the CInternetSession class, which allows for connection to a remote server and retrieval of data. Another option could be to use the CWinHTTP class, which provides similar functionality for HTTP requests.

Once you have determined the appropriate class or component to use, you will need to implement the necessary code for connecting to the designated website or server and retrieving the update information. This may involve using functions such as OpenURL or SendRequest for HTTP requests, or similar methods for other protocols.

It is also important to consider error handling and ensuring the update check does not interfere with the functioning of the application. You may want to implement a timeout or other mechanisms to prevent the application from hanging if the update check takes too long or encounters errors.

In summary, implementing automatic update checks in an MFC application will likely involve using specific classes or components for connecting to a designated website or server and retrieving update information. It is important to consider the specific requirements and potential errors that may arise during the update check process.
 

1) What is automatic update check in MFC?

Automatic update check in MFC is a feature that allows MFC (Microsoft Foundation Classes) applications to automatically check for updates and notify the user when a new version is available. This helps to ensure that the user is always using the most current and secure version of the application.

2) How does automatic update check work in MFC?

Automatic update check works by using the Update API provided by MFC. This API checks for updates by connecting to a designated server and comparing the current version of the application to the latest version available on the server. If a newer version is found, the user is notified and given the option to download and install the update.

3) Can automatic update check be customized in MFC?

Yes, automatic update check can be customized in MFC. Developers can specify the frequency of update checks, the server to check for updates, and the behavior of the update process (e.g. automatically install updates or prompt the user for confirmation).

4) Is automatic update check in MFC secure?

Yes, automatic update check in MFC is secure. The update process uses industry-standard encryption and authentication methods to ensure that the update files are not tampered with during download. Additionally, MFC provides options for developers to digitally sign their updates, further enhancing security.

5) Can automatic update check be disabled in MFC?

Yes, automatic update check can be disabled in MFC. Developers can choose not to implement this feature in their application or provide an option for users to disable it. However, it is generally recommended to enable automatic update check to ensure that users have the latest and most secure version of the application.

Similar threads

  • Programming and Computer Science
Replies
11
Views
995
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
5
Views
4K
  • Programming and Computer Science
Replies
6
Views
8K
  • Computing and Technology
Replies
30
Views
2K
  • Programming and Computer Science
Replies
2
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
  • Computing and Technology
Replies
12
Views
2K
  • Computing and Technology
Replies
10
Views
8K
Back
Top