Symbian3/SDK/Source/GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE task
+  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task id="GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69" xml:lang="en"><title>Writing
+the Version 2 Registration Resource File</title><shortdesc>Writing a version 2 registration resource file is similar to writing
+a standard registration resource file.  </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context>       <p>All the variables required to write a standard registration
+resource file must be set. In addition:  </p>     </context>
+<steps-unordered>
+<step id="GUID-7F2A2305-31F5-431E-8DB5-467859CF5814"><cmd>Set<codeph> resource_format_version</codeph> to
+the value of <codeph>RESOURCE_FORMAT_VERSION_2</codeph> defined in <filepath>RegistryInfoV2.rh</filepath>.
+ </cmd>
+</step>
+<step id="GUID-28395805-0EBC-4A16-9AD5-FE88F412EE5C"><cmd>In the <codeph>IMPLEMENTATION_INFO</codeph> resource
+that declares the properties of a single implementation, set an additional
+member <codeph>rom_only</codeph>.  </cmd>
+<info><p><codeph>rom_only</codeph> set to 1 indicates the ROM-only implementation
+must be used.  </p><p><codeph>rom_only</codeph> set to 0 indicates the ROM-only
+implementation can be overidden.  </p><note> <codeph>rom_only</codeph> value
+must be set individually for all implementations declared in a version 2 registration
+resource file. </note></info>
+<info><p>A RAM plug-in can also use a version 2 registration resource file.
+However, the implementation must set <codeph>rom_onlymember</codeph> to 0.
+In case it is set to one the plug-in cannot be used.   </p></info>
+</step>
+</steps-unordered>
+<example><p>The following example gives a resource registration file for an
+implementation collection with two implementations. The first implementation
+cannot be overridden by a RAM-based plug-in and the second can be overridden
+by a RAM-based plug-in.</p><codeblock xml:space="preserve">// 10009DB1.RSS
+//
+#include "RegistryInfoV2.rh"
+
+RESOURCE REGISTRY_INFO theInfo
+{
+// resource_format_version must always be set as follows
+resource_format_version = RESOURCE_FORMAT_VERSION_2;
+
+// Normal plug-in parameters
+dll_uid = 0x10009DB5;
+interfaces = 
+	{
+	INTERFACE_INFO
+		{
+		interface_uid = 0x10009DC9;
+		implementations = 
+			{
+			IMPLEMENTATION_INFO
+				{
+				implementation_uid = 0x10009DCA;
+				version_no = 1;
+				display_name = "Example Implementation - ROM-only ";
+				default_data = "text/wml";
+				opaque_data = "";
+    
+				// This implementation CANNOT be overridden by a RAM-based plug-in
+				rom_only = 1;
+				},
+			IMPLEMENTATION_INFO
+				{
+				implementation_uid = 0x10009DCB;
+				version_no = 1;
+				display_name = "Example Implementation - not ROM-only ";
+				default_data = "text/wml";
+				opaque_data = "";
+
+				// This implementation CAN be overridden by a RAM-based plug-in
+				rom_only = 0;
+				}
+			};
+		}
+	};
+}</codeblock></example>
+</taskbody><related-links>
+<link href="GUID-B541BD01-29BE-4CB7-9420-ABEE0BDC9BA4.dita"><linktext>Writing a
+Standard Registration Resource File</linktext></link>
+<link href="GUID-39186342-960A-46A4-BC35-851F53665FA8.dita"><linktext>Writing the
+Version 3 Registration Resource File</linktext></link>
+</related-links></task>
\ No newline at end of file