Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fox 2.6 Windows give "I/O operation failure" message if a CD is 3

Status
Not open for further replies.

bigj

Programmer
Apr 12, 2000
7
0
0
CA
If there is no CD in the drive when the standalone exe runs, you get the "I/O operation failure" message. Does any one know how to prevent this message from occurring ? It seems to be related to the environment in which the EXE was created (my development PC had a CD in the drive when it was compiled). If the CD is in the drive it works okay. Unfortunately, the customer does not always keep a CD in the drive.
 
Somewhere in the program it does a call to a drive letter (directly or from a parameter) that is the CD rom drive of the customer. <br><br>1.&nbsp;&nbsp;Before CD rom writers came out several programmers did this to prevent people from duplicating and using software without paying for it. I still use this trick of looking for a file on my Web Server before I attempt any disk I/O operations to it.<br><br>2.&nbsp;&nbsp;In one of the screens you may use a ICON or BMP.&nbsp;&nbsp;Check the properties of your screens and replace any direct calls to drives letters with a memory variable.<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Foxpro encodes the path of the source files on the development machine into the EXE. When this EXE is run on another computer, it will check this path before looking internally inside the EXE for the various imbedded modules. So, if your development system has your source files on say G:\myprog\source and you try to run the resulting EXE on a computer that has a removable drive as G: then you will get this error. A resonable solution is to write a quick .PRG that scans the EXE after compilation for the source path (using FOPEN,FREAD,FWRITE...) and then replace the drive letter with C: that's guaranteed to exist an be non-removable (or at least not removed at the time..)
 
I had once download a program call "fix_apfl" that you run on the compiled app or exe.
 
You can also go to and get the free &quot;FixDrive&quot; program. It works great and with the source code you can modify it - just in case you have special circumstances (I did).

Rick
 
Thanks Rick. Though I dont need any fixes, it is just added to my collection. (in case any of my clients run into that problem). Thanks again.

Ramani :-9
(Subramanian.G)
FoxAcc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top