----------------------------------------------------------------------------------
                      VFP 9.0 FIX - THE VERSION() FUNCTION RETURNS THE NEW VERSION INFORMATION
                                  March 2019
                 ----------------------------------------------------------------------------------
                                     CCB



1. BUG:

     In vfp9, usually the VERSION() function returns "Visual FoxPro 09.00.0000.7423 for Windows".

     In VFP Advanced, usually the VERSION() function returns "Visual FoxPro 10.00.0000.00 for Windows".
     For backward compatibility, we can disable the VERSION() function returns the new version information,
     then the VERSION() function will return "Visual FoxPro 09.00.0000.7423 for Windows".


2. CAUSE:

     There are some BUGs in the following code.


3. RESOLUTION:

     We can write some code to fix the BUG.

     Fun5000e2 :: ; proc near


     ;
     ;                 ----------------------------------------------------------------------------------
     ;                      VFP 9.0 FIX - THE VERSION() FUNCTION RETURNS THE NEW VERSION INFORMATION
     ;                                  March 2019
     ;                 ----------------------------------------------------------------------------------
     ;                                     CCB
     ;
     ; The VERSION() function returns the new version information.
     ;
     ; 2019/3/12, by ccb
     ;

     ;         pushd 01CFFh                                                    ;0x005000e2 :        68ff1c0000
     ;         pushd 00h                                                       ;0x005000e7 :        6a00
     ;         pushd 00h                                                       ;0x005000e9 :        6a00
     ;         pushd 09h                                                       ;0x005000e9 :        6a09

             cmp dword ptr vfpa_sys9018_data,00h
             jne Label5000e3
             pushd 01CFFh
             pushd 00h
             pushd 00h
             pushd 09h
             jmp Label5000ed
     Label5000e3 ::
             pushd 00h
             pushd 00h
             pushd 00h
             pushd 0Ah
             jmp Label5000ed


     Label5000ed ::
             pushd offset Data921d80                                                  ;0x005000ed :        68801d9200
             push  dword ptr [ esp + 24 ]                                    ;0x005000f2 :        ff742418
             call Fun43089c                                                  ;0x005000f6 :        e8a107f3ff
             add esp , 018h                                                  ;0x005000fb :        83c418
             ret 04h                                                         ;0x005000fe :        c20400


4. APPLIES TO:

     VFP 10.0.0.0 (VFP Advanced)


5. REFERENCE WEBSITES:

     1, baiyujia.com:
     http://www.baiyujia.com
     http://www.baiyujia.com/vfpdocuments/f_vfp9fix76.asp


6. OTHER:

     For reference only, there is no guarantees.

     Any questions or suggestions, please send me an email at ccb2000@163.com.