--------------------------------------------------------------------------------
[BUG/PRB.] VFP 9.0 FIX - LOCATE SOME OBSOLETE FILES ON DISK AT STARTUP
January 2026
--------------------------------------------------------------------------------
CCB
1. BUG:
In vfp9 (and vfp6, vfp7, vfp8), it will locate some obsolete files on disk at startup.
In VFP Advanced IDE (it is the same as vfp9 IDE), it will locate some obsolete files on disk at startup.
In VFP Advanced Runtime and VFP Advanced Multi-threaded Runtime, it will not locate any obsolete files on disk at startup.
2. CAUSE:
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Fun40b77b :: ; proc near
sub esp , 010Ch ;0x0040b77b : 81ec0c010000
mov eax , dword ptr [ Data937090 ] ;0x0040b781 : a190709300
mov dword ptr [ esp + 0108h ] , eax ;0x0040b786 : 89842408010000
mov eax , dword ptr [ Data9370e4 ] ;0x0040b78d : a1e4709300
push esi ;0x0040b792 : 56
xor esi , esi ;0x0040b793 : 33f6
;
; ---------------------------------------------------------------------
; VFP 9.0 FIX - LOCATE SOME OBSOLETE FILES ON DISK AT STARTUP
; July 2025
; ---------------------------------------------------------------------
; CCB
;
; Locate some obsolete files on disk at startup.
; Locate WIN.INI (for SYSTEM MENU: File --> Send).
;
; 2025/7/31, by ccb
;
cmp dword ptr vfpa_sys919101_data,00h
jne Label40b795
jmp Label40b7da
Label40b795 ::
cmp eax , 02h ;0x0040b795 : 83f802
jne Label40b7f0 ;0x0040b798 : 7556
Label40b79a ::
push edi ;0x0040b79a : 57
push esi ;0x0040b79b : 56
pushd offset Data918308 ;0x0040b79c : 6808839100
mov edi , offset Data918300 ;0x0040b7a1 : bf00839100
push edi ;0x0040b7a6 : 57
call GetProfileIntA ;0x0040b7a7 : ff15c4719100
cmp eax , 01h ;0x0040b7ad : 83f801
jne Label40b7d9 ;0x0040b7b0 : 7527
pushd 0105h ;0x0040b7b2 : 6805010000
lea eax , dword ptr [ esp + 12 ] ;0x0040b7b7 : 8d44240c
push eax ;0x0040b7bb : 50
pushd offset Data91aed0 ;0x0040b7bc : 68d0ae9100
pushd offset Data9182f8 ;0x0040b7c1 : 68f8829100
push edi ;0x0040b7c6 : 57
call GetProfileStringA ;0x0040b7c7 : ff15dc709100
xor ecx , ecx ;0x0040b7cd : 33c9
cmp ecx , eax ;0x0040b7cf : 3bc8
sbb esi , esi ;0x0040b7d1 : 1bf6
and esi , 0FFFFFFFEh ;0x0040b7d3 : 83e6fe
add esi , 03h ;0x0040b7d6 : 83c603
Label40b7d9 ::
pop edi ;0x0040b7d9 : 5f
Label40b7da ::
mov ecx , dword ptr [ esp + 010Ch ] ;0x0040b7da : 8b8c240c010000
mov eax , esi ;0x0040b7e1 : 8bc6
pop esi ;0x0040b7e3 : 5e
call Fun42bf1d ;0x0040b7e4 : e834070200
add esp , 010Ch ;0x0040b7e9 : 81c40c010000
ret ;0x0040b7ef : c3
4. APPLIES TO:
VFP 6.0.8167.0
VFP 6.0.8961.0 (SP5)
VFP 7.0.0.9262
VFP 7.0.0.9465 (SP1)
VFP 8.0.0.2521
VFP 8.0.0.3117 (SP1)
VFP 9.0.0.2412
VFP 9.0.0.3504 (SP1)
VFP 9.0.0.4611 (SP2)
VFP 9.0.0.5015 (SP2)
VFP 9.0.0.5411 (SP2)
VFP 9.0.0.5721 (SP2)
VFP 9.0.0.5815 (SP2)
VFP 9.0.0.6303 (SP2)
VFP 9.0.0.6602 (SP2)
VFP 9.0.0.7423 (SP2)
The bug has been fixed in VFP Advanced.
IMPORTANT NOTE:
For some security reasons, VFP will not locate any obsolete files on disk at startup in VFP Advanced Runtime and VFP Advanced Multi-threaded Runtime.
If you want to use DEFAULT.FKY (the default keyboard macro file), please add the following code to the main program:
IF VERSION(2)=0
RESTORE MACROS FROM DEFAULT.FKY && Restores the default macros in VFP Advanced Runtime and VFP Advanced Multi-threaded Runtime
ENDI
If you want to use FOXFONT.FON (the FoxFont font file), please install the FoxFont font.
5. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix388.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix28.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix100.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix102.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix103.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix287.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix354.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix355.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix356.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix357.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix386.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix387.asp
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|