Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Automatically update comctl32.dll

Posted on 1998-03-12
5
294 Views
Last Modified: 2013-12-03
We change an application (using BC5 with Win32 API) to use the new feature included with the new comctl32.dll (Ver 4.72). When a system that as not been upgraded with the new version of comctl32.dll start the application the following message appears:

The App.exe file is linked to missing export comctl32.dll:initcommoncontrolsEx.

How can we detect an invalid comctl32.dll before the application start an display that error message.

The goal is to start a second application that will updtate the comctl32.dll automatically from the first one.
0
Comment
Question by:ayelle
  • 3
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 260 total points
ID: 1411926
Use the Win32API function GetFileVersionInfo on the comctl32.dll and compare the version you get back with the minimum version that you know contains the required function.
0
 

Author Comment

by:ayelle
ID: 1411927
The problem is that as soon as the application start, it display the error messages concerning the missing export comctl32.dll:initcommoncontrolsEx (The application don't even start). I know that i can look for the version of the DLL with some API fonction. But my problem is that the application don't even start!
0
 
LVL 32

Expert Comment

by:jhance
ID: 1411928
What language/programming environment are you using?  You need to check the DLL version BEFORE creating any windows.  By creating a window that uses any of the common controls, you will get the comdtl32.dll loaded by default.
0
 

Author Comment

by:ayelle
ID: 1411929
I'm using WIN32 API with borland C++ 5.02. I'm placing a MessageBox right in my WinMain procedure (before creating any windows by calling the CreateWindow fonction) and the error pop out before the MessageBox.

Is it normal ?

0
 
LVL 32

Expert Comment

by:jhance
ID: 1411930
The right way to solve this is to have your installer check for the required versions of this DLL and install the correct one if needed.  

Another possibility, if you can't go the installer route, would be to write a small loader program that has no COMCTL32 objects in it which runs and checks your DLL version.  If it's too old, it loads the right one, if it's OK, it loads the main application and exits.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question