Solved

Automatically update comctl32.dll

Posted on 1998-03-12
5
303 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
[X]
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
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

696 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