Article # 230, added by Geoworks, historical record
| first | previous | index | next | last |

Determining version, country code or keyboard type on N9000C.



You can get version information from the INI file on the Nokia 9000
Communicator. The information is stored as a string in [UI]swSerialNumber.
The string is 27 characters long. This same string can be seen on the last
line of About this product. The whole string looks like this: 

	000000/00/2a0030808044001/0. 

The interesting part is: 2a0030808044001. The three first characters 
identify hardware version (here 2.10), six following characters identify 
software version (here 03.08.08), three following characters identify the 
country code (44 = Great Britain) and the last three characters identify 
the keyboard type (here 001 = English).

Here is sample code that shows how to extract the version information:
     
@start StringRes;
    @chunk TCHAR UICategory[] = "ui";
    @chunk TCHAR SWSerialNumber[] = "swSerialNumber";
@end StringRes;
     
...
     
@method TestProcessClass, MSG_TEST_PROCESS_GET_VERSION
{
    TCHAR   version[28] = "";
    TCHAR * category;
    TCHAR * key;
    word    value;
     
    MemLock( OptrToHandle( @UICategory ) ); 
    category = (TCHAR *) LMemDeref( @UICategory ); 
    key      = (TCHAR *) LMemDeref( @SWSerialNumber ); 
    InitFileReadStringBuffer( category,
         key,
         version,
         IFRF_SIZE | 28,
         &value );

    /*
     * Extract the information you want from version string. 
     */
    MemUnlock( OptrToHandle( @UICategory ) );
}