Symbian3/SDK/Source/GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69.dita
changeset 7 51a74ef9ed63
parent 0 89d6a7a84779
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69" xml:lang="en"><title>Writing
       
    13 the Version 2 Registration Resource File</title><shortdesc>Writing a version 2 registration resource file is similar to writing
       
    14 a standard registration resource file.  </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    15 <context>       <p>All the variables required to write a standard registration
       
    16 resource file must be set. In addition:  </p>     </context>
       
    17 <steps-unordered>
       
    18 <step id="GUID-7F2A2305-31F5-431E-8DB5-467859CF5814"><cmd>Set<codeph> resource_format_version</codeph> to
       
    19 the value of <codeph>RESOURCE_FORMAT_VERSION_2</codeph> defined in <filepath>RegistryInfoV2.rh</filepath>.
       
    20  </cmd>
       
    21 </step>
       
    22 <step id="GUID-28395805-0EBC-4A16-9AD5-FE88F412EE5C"><cmd>In the <codeph>IMPLEMENTATION_INFO</codeph> resource
       
    23 that declares the properties of a single implementation, set an additional
       
    24 member <codeph>rom_only</codeph>.  </cmd>
       
    25 <info><p><codeph>rom_only</codeph> set to 1 indicates the ROM-only implementation
       
    26 must be used.  </p><p><codeph>rom_only</codeph> set to 0 indicates the ROM-only
       
    27 implementation can be overidden.  </p><note> <codeph>rom_only</codeph> value
       
    28 must be set individually for all implementations declared in a version 2 registration
       
    29 resource file. </note></info>
       
    30 <info><p>A RAM plug-in can also use a version 2 registration resource file.
       
    31 However, the implementation must set <codeph>rom_onlymember</codeph> to 0.
       
    32 In case it is set to one the plug-in cannot be used.   </p></info>
       
    33 </step>
       
    34 </steps-unordered>
       
    35 <example><p>The following example gives a resource registration file for an
       
    36 implementation collection with two implementations. The first implementation
       
    37 cannot be overridden by a RAM-based plug-in and the second can be overridden
       
    38 by a RAM-based plug-in.</p><codeblock xml:space="preserve">// 10009DB1.RSS
       
    39 //
       
    40 #include "RegistryInfoV2.rh"
       
    41 
       
    42 RESOURCE REGISTRY_INFO theInfo
       
    43 {
       
    44 // resource_format_version must always be set as follows
       
    45 resource_format_version = RESOURCE_FORMAT_VERSION_2;
       
    46 
       
    47 // Normal plug-in parameters
       
    48 dll_uid = 0x10009DB5;
       
    49 interfaces = 
       
    50 	{
       
    51 	INTERFACE_INFO
       
    52 		{
       
    53 		interface_uid = 0x10009DC9;
       
    54 		implementations = 
       
    55 			{
       
    56 			IMPLEMENTATION_INFO
       
    57 				{
       
    58 				implementation_uid = 0x10009DCA;
       
    59 				version_no = 1;
       
    60 				display_name = "Example Implementation - ROM-only ";
       
    61 				default_data = "text/wml";
       
    62 				opaque_data = "";
       
    63     
       
    64 				// This implementation CANNOT be overridden by a RAM-based plug-in
       
    65 				rom_only = 1;
       
    66 				},
       
    67 			IMPLEMENTATION_INFO
       
    68 				{
       
    69 				implementation_uid = 0x10009DCB;
       
    70 				version_no = 1;
       
    71 				display_name = "Example Implementation - not ROM-only ";
       
    72 				default_data = "text/wml";
       
    73 				opaque_data = "";
       
    74 
       
    75 				// This implementation CAN be overridden by a RAM-based plug-in
       
    76 				rom_only = 0;
       
    77 				}
       
    78 			};
       
    79 		}
       
    80 	};
       
    81 }</codeblock></example>
       
    82 </taskbody><related-links>
       
    83 <link href="GUID-B541BD01-29BE-4CB7-9420-ABEE0BDC9BA4.dita"><linktext>Writing a
       
    84 Standard Registration Resource File</linktext></link>
       
    85 <link href="GUID-39186342-960A-46A4-BC35-851F53665FA8.dita"><linktext>Writing the
       
    86 Version 3 Registration Resource File</linktext></link>
       
    87 </related-links></task>