Google'i grupid ei toeta enam uusi Useneti postitusi ega tellimusi. Ajalooline sisu jääb vaadatavaks.
Dismiss

Visual Foxpro under VMware - solved!

20 vaatamist
Liigu esimese lugemata sõnumi juurde

Lukas Rypacek

lugemata,
8. okt 2001, 12:58:0708.10.01
kuni
I have had problems running Visual Foxpro 6 (any SP) or VFP7 under
VMWare version 2, or VMware 3 beta - guest system Windows 9x. The
application keeps throwing GPF immediately after it starts. The same
is for VFP6.EXE (VFP7.EXE) and the runtime (VFP6R.DLL, VFP7R.DLL).

After some time I figured out a tweak. I don't know exactly why it
works, but it works just fine. Stepping in a debugger I found that
VMWare has troubles with the "SIDT" instruction. I don't know, why
Foxpro needs to call this but in each version (6 or 7) there is a
function call in the Foxpro runtime executing this instruction. The
tweak is to prevent this instruction to happen. I know it is there for some
reason and that it might not work correctly without it, but I have not
spotted any problems and patched it runs under VMware perfectly.

How to do it:
Make a backup!

If your are not really interested in what are you doing, just patch:
open VFP6R.DLL, VFP6.EXE in hex-editor.

search: 55 8B EC 51 51 53 53 51 52 0F 01 4D F8 8B 5D FA
replace: C3 8B EC ...... dtto ......

VFP7R.DLL, VFP7.EXE

search: 51 51 53 53 51 52 0F 01 4C 24 10 8B 5C 24 12
replace: C3 51 53 .... dtto .....

(the change is only at the begging of the string)

If you don't believe me, disasemble, find SIDT instruction surrounded
by real code, scroll up several line, search for RET - this is the end
of previous function. Right after this end, several lines before SIDT
place another RET, thus eliminating the function call.

Have fun and run your Visual Foxpro apps with VMWare.

Bye
Lukas Rypacek

0 uut sõnumit