Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

How can I find out the software build version of a Symbian device?

From Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (17 Feb 2005)
Last edited: hamishwillee (14 Jun 2012)


How can I find out the software build version of a S60 device in numeric format?


The method SysUtil::GetSWVersion(TDes& aValue) returns the device software version information as a string. The same information is returned in a dialog when the sequence *#0000# is entered in phone idle view. Sometimes it is useful for an application to know the version information as integer values. The following code demonstrates how to extract the software version as unsigned integer values from the string:
#include <SysUtil.h>    // link against sysutil.lib
void GetNumericSWVersionL(TUint& aMajor, TUint& aMinor, TUint& aBuild)
    TBuf<KSysUtilVersionTextLength> versionString;
    TLex parser(versionString);
    // Skip non-digit characters from the beginning
    // Get major version value
    // Next character should be '.'
    if(parser.Get() != '.')
    // Get minor version value
    // If next char is '.' or '(', string contains
    // also the build version
    TChar next = parser.Get();
    if(next == '.' | next == '(')
        aBuild = 0;

This page was last modified on 14 June 2012, at 04:54.
20 page views in the last 30 days.