Solved

MFC program written in 95 does not execute in 98

Posted on 1998-10-27
3
156 Views
Last Modified: 2013-11-14
I wrote a program using visual c++ 5.0(MFC). I added some code for opening common dialog boxes like the file open, file save/save as... and it runs perfectly on my windows 95 machine. When I copy it over to any windows 98 machine and double click on it you can here the drive do its thang but then nothing happens, and there is nothing in the close program dialog box(ctrl+alt+del). Is there extra code or includes that I need to make this run under 98?
0
Comment
Question by:backdraf
3 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1176356
The other computer probably has an older copy of either the common dialog DLLs or the MFC DLLs.  The code is hanging because it is trying to use the old DLL.  See if you can find and install the newer DLL.

Unfortunately, I don't know the DLL names, or I would list them.
0
 
LVL 3

Expert Comment

by:danny_pav
ID: 1176357
If you want a nice tool for finding DLL dependencies, look for a tool called PESX
0
 
LVL 2

Accepted Solution

by:
jrmcg earned 50 total points
ID: 1176358
The DLL and OCX file(s) that you need to check are

ComDlg32.dll and ComDlg32.ocx

I would almost guarantee that what you're looking at is getting the .ocx file.
On the computer you wrote the program on (Win95) find the ComDlg32.ocx file in the Windows\System directory.  Check the date on this file and compare it to the date of the same file on the Win98 computer.  Chances are that the Win98 file will be older.  If this is true, copy that file into the Win98 computer's Windows\System Directory, Click on Start then Run and Type:
Regsvr32 C:\Windows\System\ComDlg32.ocx
and hit Enter.  It should give you a message that the file registration succeeded.  Try and run your program now and it should work without a problem.

I would try this before messing with the ComDlg32.dll.

Other files to check version/dates on would be:

mfc40.dll      ** copy to directory and reboot -- is self-registering
msvcrt40.dll  ** must be registered manually as above
msvcrt.dll      ** must be registered manually as above

Update these only if they are newer and the Comdlg32.ocx file does not fix the problem.

I have had to do this numerous times on different computers.  TGFI (Thank God For Installshield).

If this still doesn't solve the problem I can still help, but I am pretty sure it is going to be that first file.

J.R.


0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now