diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-651C2913-2AB9-5873-B296-5C4233967F21-GENID-1-8-1-3-1-1-7-1-5-1.dita --- a/Symbian3/SDK/Source/GUID-651C2913-2AB9-5873-B296-5C4233967F21-GENID-1-8-1-3-1-1-7-1-5-1.dita Wed Mar 31 11:11:55 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ - - - - - -CONE -resource loader overview -
Purpose

The CONE Resource Loader utility is part -of the Symbian CONE component, and it offers methods for opening and closing -resource files. The actual reading of resources from an opened resource file -is done using various CCoeEnv provided -resource-reading methods.

-
Architectural Relationships

This utility is implemented -as a single class, RCoeResourceLoader. -Access to the CCoeEnv instance -is required in order to use this utility.

CONE Resource Loader can -be accessed through the RCoeResourceLoader class -that is defined in the header CoeUtils.h. The actual component -is linked to the cone.dll library.

-
Description

Usage

CONE Resource -Loader functionality can be accessed via public methods on an RCoeResourceLoader instance.

To use, an instance of RCoeResourceLoader is -first created. Then calling either one of the open methods of RCoeResourceLoader opens -the resource file. After the resource file is no longer needed, it must be -closed.

A single instance of RCoeResourceLoader can -only have a maximum of one resource file open at any time. If multiple simultaneously -open files are required, instantiate a separate RCoeResourceLoader for -each required file.

Example

The following example shows -how to use the RCoeResourceLoader class:

#include <CoeUtils.h> - -// … Other code … - -// Get CCoeEnv instance -CEikonEnv* eikEnv = CEikonEnv::Static(); - -// Initialize loader -RCoeResourceLoader rLoader(eikEnv); - -// Open resource file -_LIT( KSampleResourceFileName, "Z:\\System\\Apps\\sample\\sample.rsc" ); -TFileName fileName(KSampleResourceFileName); -rLoader.OpenL(fileName); - -// Push resource loader to cleanup stack, so that it will always be properly -// closed when popped. -CleanupClosePushL(rLoader); - -// Read a resource -iSomeArray = eikEnv->ReadDesC16ArrayResourceL(R_SOME_RESOURCE); - -// Pop and destroy rLoader from stack. -// This also calls close on rLoader since CleanupClosePushL was used. -CleanupStack::PopAndDestroy(); // rLoader -

For more information on individual methods, please see the -reference API for RCoeResourceLoader.

-
\ No newline at end of file