Solved

MFC program written in 95 does not execute in 98

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 major drawbacks of deploying applications by GPO is the complete lack of any centralized reporting. After a normal deployment, there are two ways to find out if it was successful – by looking in the event log, and by looking in the log of…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

749 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