diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-79370E26-4549-5F31-99A3-8D0341F58F08.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-79370E26-4549-5F31-99A3-8D0341F58F08.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,62 @@ + + + + + +Retrieving +Versions and Device Type Information

This section explains the tasks that can be performed using System +Utilities such as retrieving software and language package versions and device +type information.

+
Retrieving +the current software version

To retrieve the software version of +the device, call GetSWVersion() function. This function sets +the parameter passed to a Unicode string holding the current software version.

TBuf<KSysUtilVersionTextLength> version; +if( SysUtil::GetSWVersion( version ) == KErrNone ) + { // Use the version string. ... + } +
+
Retrieving +the current software version for the current language package

To +retrieve the software version of the device which is compatible with the currently +installed language package, call GetLangSWVersion(). This +function sets the parameter passed to a Unicode string holding the required +software version.

+
Retrieving +the current language package version

To retrieve the version of +the currently installed language package, call GetLangVersion(). +This function sets the parameter passed to a Unicode string holding the language +package.

Note: The following functions read data from text files:

    +
  • GetSWVersion() reads from Z:\\resource\\versions\\sw.txt

  • +
  • GetLangSWVersion() reads from Z:\\resource\\versions\\langsw.txt

  • +
  • GetLangVersion() reads from Z:\\resource\\versions\\lang.txt

  • +

The GetSWVersion() and GetLangSWVersion() functions convert the newline +character "\n" to the Unicode newline character but GetLangVersion()function +does not convert.

+
Retrieving +the device type information

To retrieve the device type information, +call GetDeviceTypeInfoL() function. It consists of a pointer to an instance +of CDeviceTypeInformation. This instance contains the complete set of device +type information attributes that are provisioned by the device manufacturer.

TPtrC16 modelNamePtrC; +if( User::LeaveIfError( deviceTypeInfo->GetModelName( modelNamePtrC ) ) == CDeviceTypeInformation::KDefaultValue ) + { + // We have a default attribute value, do something else + ... + } +else + { + // We have a device creator supplied attribute value. + ... + } +
+
+System Utilities +Overview +Checking +the Availability of Memory +
\ No newline at end of file