Symbian Developer Library

SYMBIAN OS V6.1 EXAMPLE CODE

[Index] [Previous] [Next]



Interface to resource files example code


ReadArray—reading contents of resource file into array

Found in: epoc32ex\Base\ResourceFiles\ReadArray


Description

ReadArray is an example of how to load data from resource files into a class.

It loads the resource identified as SECOND from the resource file; this is an array of DATA structures. (The resource FIRST is not used in this example)

The example constructs a CResDataArray object to contain an array of CResData objects, one for each DATA structure in the array. The CResDataArray object can also display the individual items of each DATA structure at the test console. All WORD, BYTE and LONG are interpreted as signed values.

The example follows on from the Reading from a resource file example.


Classes used

[Top]


ReadData—reading from a resource file

Found in: epoc32ex\Base\ResourceFiles\ReadData


Description

ReadData is an example of how to load data from resource files into a class.

It loads the resource identified as resource FIRST from the resource file. This is a simple resource of type DATA. The example constructs a CResData object to hold the individual items corresponding to the items in a DATA structure.

The CResData object can also display the individual items at the test console. All WORD, BYTE and LONG data are interpreted as signed values


Classes used

[Top]


ReadText—reads "Hello world!” from a resource file

Found in: epoc32ex\Base\ResourceFiles\ReadText


Description

ReadText demonstrates reading text ("hello world!") from a resource file and writing the text to a console.


Classes used

[Top]


SigCheck—checking a resource file’s signature

Found in: epoc32ex\Base\ResourceFiles\SigCheck


Description

SigCheck is an example of how the signature of a resource file is checked before it is used.

SigCheck reads a text string from a single resource file, SigCheck.rss, in the standard way and uses RResourceFile::ConfirmSignatureL() to check the 'identity' of the resource file.


Classes used

[Top]


MultiRead1—reading multiple resource files

Found in: epoc32ex\Base\ResourceFiles\MultiRead1


Description

MultiRead1 is an example of a class that is capable of using more than one resource file; MultiRead1 however uses only a single resource file.

This example, together with MultiRead2 (which uses more than one resource file), shows how to use multiple resource files with cross-referenced resources.

It introduces the class CMultipleResourceFileReader, capable of reading resources from multiple resource files.


Classes used

[Top]


MultiRead2—reading multiple resource files with cross-referenced resources

Found in: epoc32ex\Base\ResourceFiles\MultiRead2


Description

MultiRead2 shows how to use multiple resource files with cross-referenced resources. It depends on the resource file created for the MultiRead1 and SigCheck projects.

It introduces a second resource file, MultiRead2, which contains an LLINK to a resource defined in the MultiRead1 project. The important point to note is that the effect of introducing this second resource file is minimal: just another #include file; and the logic in doExampleL() would be identical whether the LLINK pointed to another resource in the same file or a different file.


Build Notes

You must have built MultiRead1 and SigCheck beforehand.


Classes used