DZpatch
=======


Microsoft(R) Foxpro(tm) for Windows(tm) has a problem running on Pentium-class
computers with processor speeds of 333 megaherz and higher. As soon as a
program written in Foxpro for Windows 2.5 or 2.6 tarts to launch you may
get an error message saying "Divide by Zero or Divide Overflow". DZPatch is
a fix for this problem. It modifies 32 bytes in the middle of the Foxpro library files
(i.e. foxprow.exe and foxw2600.esl for Foxpro 2.6) to prevent the error from
occurring.

DZPatch is freeware written by me, Andrew Forber (forber@interlog.com). It has
been made available by me and posted by Abri Technologies as a courtesy to the Foxpro
community.

I'm not associated with Abri Technologies in any way, so please don't phone or write
them if you have problems or questions. The patch has been extremely well tested,
and has worked for everyone who's tried it so far, that I know of.

I'm happy to get email from you about the program, but the time I can spend
helping you with it is limited. If dzpatch doesn't do the job for you by all
means email me, but also post a query on the Usenet news group
microsoft.public.fox.programmer.exchange. The folks there will likely help you,
as they've helped me many times.

This ZIP file contains two versions of DZPatch. DZPATCH.PRG is Foxpro 
source code, which you can run to perform the patch if you wish (and
if you have the full Foxpro developer's environment). 

DZPatch.PRG also contains detailed comments that describe how the patch works.
You can open DZPATCH.PRG with a text editor (such as Notepad).

DZPatch.EXE is a 32-bit command-line program you can run to patch the
program. It differs from DZPatch.prg in that:

o You don't need to have the Foxpro development system in order to run it. 
  This makes it possible to patch programs if you are the end-user of a program
  which was written in Foxpro.
o You don't have to run Foxpro on a slower machine to patch a file to 
  run on a fast machine. (DZPatch.EXE is written in C, not Foxpro.)
o DZPatch.exe will patch all versions of Foxpro that have the problem,
  not just FPW2.5/2.6a. (It may even patch other programs not written
  in Foxpro, but built using the same compiler. These would be older
  programs. In any case, it can't damage a program that doesn't need
  patching, so don't feel shy about trying it.)
o DZPatch.exe recognizes that the runtime files may be read-only on
  your computer, and will patch them anyway, leaving the read-only
  flags as it found them. (With DZPatch.prg you have to manually rename
  files, un-protect them, patch them, rename them back again, and then
  re-write-protect them, as described in the .PRG file.)
o It only runs on Windows '95, '98 or NT3.51/4. If you are using Windows 3.1 or 
  NT 3.1 or 3.50 you will need to patch your program under a newer operating
  system, and then copy it back to the older one. Fortunately you only have to
  do it once.

***********************************
Running DZPatch.EXE
***********************************
If you have a program that was written in Foxpro for Windows 2.6 by a third 
party, you will see a file called FOXW2600.ESL on your hard disk. The name
varies in the obvious pattern for other versions. To patch the program to 
eliminate the Divide By Zero / Divide Overflow error, 

o Copy dzpatch.exe to the directory where the ESL file resides.
o Open an MS-DOS(r) box on your screen, and change to that directory.
o Run the command dzpatch.exe, giving it the name of the ESL file as a
    command line argument, e.g.

     dzpatch foxw2600.esl

o Only if you have the Foxpro development system installed you will also need to
  run the program against the Foxpro development application:

     dzpatch foxprow.exe

dzpatch will indicate whether it has succeeded in patching the files.


**************************************
Important Safety Tips!
**************************************

o It's a good idea to make backups of your ESL and FOXPROW.EXE files before
  running the program on them. Just in case.

o If you patch the ESL file and it doesn't seem to cure the problem, check your
  path. You may have other copies of the ESL sitting in obscure places on your
  hard drive, and one of them may be getting loaded instead of the one you
  patched.

o At some point in the future, if you patch foxprow.exe, some virus checkers may
  look at the file and gulp at you. Don't panic. They've simply noticed that something
  has changed the internal contents of an executable, and they consider that suspicious.

Good luck!

Andrew Forber
October, 1998

==============================================================================

Foxpro, Windows, Windows NT, Windows for Workgroups, and MS-DOS are trademarks of
Microsoft.
