Based on the experiences of many netizens, s60 3rd MR/FP1/fp2 and s60 5th have some feature files in the system, indicating the actual version of the system. In some application scenarios, the system version of the target machine is very important, so that different DLL or EXE can be deployed for different systems to adapt to more models.
Currently, the most common method is to judge the series60 file, which is described as follows:
Z:/system/install/series60v3.0. Sis: s60 3rd Mr
Z:/system/install/series60v3.1. Sis: s60 3rd FP1
Z:/system/install/series60v3.2. Sis: s60 3rd fp2
Z:/system/install/series60v5.0. Sis: s60 5th
You can check the existence of these files in the PKG file to install the corresponding DLL or EXE, for example:
If (exists ("Z:/system/install/series60v3.2. Sis "))
"Sys/bin/AA. dll "-"! :/Sys/bin/AA. dll"
Elseif (exists ("Z:/system/install/series60v3.1. Sis "))
"Sys/bin/AA (0-7). dll "-"! :/Sys/bin/AA. dll"
Else
"Sys/bin/AA (0-8). dll "-"! :/Sys/bin/AA. dll"
Endif
This section describes how to install Aa if fp2. dll library. If FP1 is used, install AA (0-7 ). dll library, Mr is installed AA (0-8 ). dll library, and so on.
In the program, you can use the following functions to determine the system version:
Void cappinfo: determinsystemver (){
Isystemver = 30;
Rfs fs;
If (kerrnone! = FS. Connect () {return ;}
Tfindfile finder (FS );
If (kerrnone = finder. findbydir (_ L ("series60v5.0. Sis"), _ L ("Z: // system // install //"))){
Isystemver = 50;
} Else if (kerrnone = finder. findbydir (_ L ("series60v3.2. Sis"), _ L ("Z: // system // install //"))){
Isystemver = 32;
} Else if (kerrnone = finder. findbydir (_ L ("series60v3.1. Sis"), _ L ("Z: // system // install //"))){
Isystemver = 31;
}
FS. Close ();
}
The rest is free for everyone!