Solved

My Word Processor won't run on WIn 98

Posted on 2004-10-10
18
186 Views
Last Modified: 2010-04-05
Hi team,
I wrote a simplified word processor in Delphi.
I have a bug though that I can't understand.
The exe will run no trouble on Win 2000 or XP, but when you try and run it on 98 or 98 SE it won't run.
Instead it gives an rror message
"This program has performed an illegal operation and will be shut down"

THe next error message is
Exception EInOutErrorin module prjWriter.exe at 000B5A8A. invalid filename

I have created a log file in the project unit of the application, but this never gets created so I from this I gather that the application doesn't even start the reading any of the code at all...

Any ideas?

Myles :)
0
Comment
Question by:myleseven2
  • 4
  • 4
  • 4
  • +2
18 Comments
 
LVL 31

Expert Comment

by:moorhouselondon
ID: 12272994
Have you tried putting this switch at the beginning of your code:-

{$IOChecks Off}

0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12273223
The problem could be that you're using Windows NT-specific instructions in your code. W2K and XP have been based upon the Windows NT sourcecode and while the Windows API's for 95/98 and NT/W2K/XP is quite similar, there are also quite a few compatibility problems. I think you just found one.
The best solution that I've seen in these cases is to just put W2K as minimum operating system. Saves you a lot of compatibility issues. :-)

If you want to solve it, then let me make a wild guess. It complains about an invalid filename so either the filename you're using is too big or it contains invalid characters. Are you using unicode filenames? Is the filename longer than 255 characters?
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 12273596
I agree with Workshop_Alex, it may just be worthwhile setting Win2K as the minimum OS. Win98 is very old nowadays, and i think you can safely assume *most* people will be using newer OSs.

The other option is to try and compile it using delphi on the 98 machine. This way you can determine more precisely from where the error is occuring.

Regards,

Hypoviax
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 12273603
Also try using try except blocks around you code (TRY..Code..EXCEPT..handleit) this may remove the issue that is occuring on the 98 machine.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 12274709
Maybe madExcept can help locating the code at fault?

http://help.madshi.net/madExcept.htm
http://madshi.net/madCollection.exe

(free for non-commercial use)
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 12274745
Madshi - you havn't been around here for ages. Good to see you back in action

Hypoviax
0
 
LVL 20

Expert Comment

by:Madshi
ID: 12274800
Thank you!!   :-)

Well, I've been here all the time more or less, but I'm only looking into questions I like now!
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12275411
Oh, no! Madshi, you're back? I was so hoping that I could gain enough points to finally get a higher score than you at EE... ;-)
Welcome back, old guy... :-P
0
 
LVL 20

Expert Comment

by:Madshi
ID: 12275473
No no, as I said, I'm only looking into questions that I like (just like I've done in the previous months). So no change here. I'm not going to chase for points, anymore...
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12275804
Phew! :-) Well, maybe you like to look at my post then, about loading an executable as a DLL. http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_21163413.html might be a real challenge for you. :-P
Oh, wait. Better don't. If you do answer it, I need to gain even more points to get past you... :)
0
 

Author Comment

by:myleseven2
ID: 12282595
Thanks for your help guys,
I have been away from the net for a while sorry about that....
I like the idea of putting W2K as the minimum operating system, but many of the users that (hopefully) will be using this program will have win 98 so I would like to try and solve the problem...

I will now try your suggestions...

Myles :o)
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12285580
They still use Windows 98? I would have expected most people would be using XP by now. People who still use 98 probably have systems that are about 5 years old, or older. But the XP Home edition should be supported well by those older systems, I assume. Increasing the minimum requirements is just a good idea because you don't want to have lots of trouble maintaining backwards compatibility. If you have to adjust your code to support 98, you might even have to drom some functionality because it might not be available on 98.

Many companies put W2K as minimum requirement these days, btw.
0
 

Author Comment

by:myleseven2
ID: 12294187
Yes I know, the thing is I am building some programs for a group of elderly people and alot of them, but not all, have elderly systems.

By the way is there much of a difference between 98 and SE?

I can't certain yet but initial testing seems to point that

{$IOChecks Off}

might be enough to solve the problem for 98, but I need further testing before I can be sure...
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 12294252
>>building some programs for a group of elderly people

Fair enough too. I reccomend that you don't push them onto newer OSs because they will have difficulty enough trying to learn the new one.

Have you tried compiling your app in a 98 machine?

Best Regards,

Hypoviax
0
 
LVL 31

Expert Comment

by:moorhouselondon
ID: 12295248
I compile and test my programs on Win98 and that's how I found out/resolved a similar problem (ICELicense seems to cause this exception to occur on W98).  BTW Win98SE is still being sold in the Distribution channel so there's some life left in it yet.  

If it is ascertained that this solution works for you, if you are concerned that there may be knock-on effects with other OS's you can handle the exception rather than ignoring it (i.e. if win98 then ignoreexception else handlexception).
0
 

Author Comment

by:myleseven2
ID: 12304431
Well I got to work and left my copy of Delphi at home again.... Dohhhh!
So I will have to leave the experiment of installing Delphi onto the 98 platform till tomorrow, sorry for the time delay...

One issue we were concerned about with testing our system on a system with Delphi on it is that the program might use some files from the Installed Delphi and so testing a program on a system with Delphi installed would be quite different 2 testing on a system without delphi...

What are your thoughts?
0
 
LVL 31

Accepted Solution

by:
moorhouselondon earned 75 total points
ID: 12305687
If the BDE is being used and the aliases is being created manually (by going into the BDE to create them) then you are working on the same target data regardless of location of the program files.  If you dynamically create aliases to be in a directory relative to the installation directory then you should be ok (unless you are using the Registry to store values, or other things that are singular on the target system - an ini file in a specific, absolutely defined location for example).  

If this is software you are going to package up and send out, then any tests that involve the creating of the initial environment need to be tested by removing everything from the pc to install and test. If however everything is in its own subdirectory then install everything into a new testbed directory then this should isolate you from the development system (subject to my para 1 above).
0
 

Author Comment

by:myleseven2
ID: 12999772
I am sorry other problems came up that needed dealing with, but thank you for your patience...
I will close this question now so not to leave anyone hanging.
THanks all for your help.
There are still problems, when I get a bit closer to be able to solving them then I might post another question up on E-E

Thanks agaian

Myles
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

16 Experts available now in Live!

Get 1:1 Help Now