Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to prevent a RAM-based plug-in from overriding a ROM-based plug-in

ECom provides two ways to prevent a RAM-based plug-in from being used:

[Top]


Using the ROM-only resolver

The ROM-only resolver provides the ability to prevent the use of plug-ins that are not in the ROM when searching for an implementation.

To use this resolver, applications must specify KRomOnlyResolverUid as the CResolver UID passed to those variants of REComSession::ListImplementationsL() and REComSession::CreateImplementationL() that take the TUid aResolverUid parameter.

If an installable upgrade to a ROM-based plug-in is correctly supplied by a vendor, then the ROM-only resolver will find and use the upgrade. Platform security controls are used to ensure that the upgrade is secure. For details, see How to upgrade ROM-based plug-ins securely.

[Top]


Preventing a ROM-based implementation from being overridden

A plug-in wishing to prevent one or more of its implementations being overridden by a RAM-based implementation with a higher version number can specify that those implementations are ROM-only. It does this in the source resource file (.rss).

The resource file is where the plug-in declares its set of implementations and interfaces. The resource structures are usually defined in the file RegistryInfo.rh, which is included in the source resource (.rss) file. However, a plug-in that wants to declare one or more ROM-only implementations must use slightly modified resource structures declared in the file RegistryInfoV2.rh, and this header file must be used instead of (i.e. not in addition to) RegistryInfo.rh.

The two structs: REGISTRY_INFO and IMPLEMENTATION_INFO are slightly modified in RegistryInfoV2.rh:

Note that RAM-based plug-ins can also use the version 2 resource file format. However, any implementation in such a plug-in that tries to declare itself as ROM-only is discarded and cannot be used.

See the example in writing a version 2 registration resource file.