Solved

MFC program written in 95 does not execute in 98

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
If you don't know how to downgrade, my instructions below should be helpful.
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

911 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

22 Experts available now in Live!

Get 1:1 Help Now