Solved

MFC program written in 95 does not execute in 98

Posted on 1998-10-27
3
159 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
[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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

707 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