|
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-39186342-960A-46A4-BC35-851F53665FA8" xml:lang="en"><title>Writing |
|
13 the Version 3 Registration Resource File</title><shortdesc>The version 3 registration resource file is an evolution of the |
|
14 version 2 . This version is evolved to accommodate extended interfaces. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
15 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-6-1-10-1-1-8-1-4-1-5-1-4-1-5-1-6-1-3-1"> |
|
16 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-6-1-10-1-1-8-1-4-1-5-1-4-1-5-1-6-1-3-1-1"><cmd>Set Info_format |
|
17 to the type of info record that is, <codeph>IMPLEMENTATION_INFO</codeph> or <codeph>BINARY_IMPLEMENTATION_INFO</codeph>. |
|
18 </cmd> |
|
19 </step> |
|
20 <step id="GUID-BCDAAECA-1C25-4D09-A495-97949B5EF2C8"><cmd><codeph>default_data</codeph>: |
|
21 The data identifier field used by the resolver to determine if the implementation |
|
22 matches a client request.</cmd> |
|
23 <info><p>In <codeph>IMPLEMENTATION_INFO</codeph> structure, the data type |
|
24 is changed to accommodate maximum 2 strings with 255 bytes each. </p><p>In <codeph>BINARY_IMPLEMENTATION_INFO</codeph>, |
|
25 the data type is changed to accommodate a maximum 512 bytes. </p></info> |
|
26 </step> |
|
27 <step id="GUID-7892DD48-0E0A-4209-B463-5DDA71F8021D"><cmd><codeph>opaque_data</codeph>: |
|
28 A binary data field that can contain additional data. This additional data |
|
29 can be used by the custom resolvers. </cmd> |
|
30 <info><p>In <codeph>IMPLEMENTATION_INFO</codeph> structure, the data type |
|
31 is changed to accommodate maximum 2 strings with 255 bytes each. </p><p>In <codeph>BINARY_IMPLEMENTATION_INFO</codeph> structure, |
|
32 the data type is changed to accommodate a maximum 512 bytes. </p></info> |
|
33 </step> |
|
34 <step id="GUID-3A4E66EE-31A6-4717-A6A6-14C4881E962C"><cmd><codeph>extended_interfaces</codeph> a |
|
35 maximum 8 UID's extended interfaces for both <codeph>IMPLEMENTATION_INFO</codeph> structure |
|
36 and <codeph>BINARY_IMPLEMENTATION_INFO</codeph> structure. </cmd> |
|
37 </step> |
|
38 <step id="GUID-76A1CE8A-169C-43A2-9231-B310FDF8EEC2"><cmd><codeph>FLAG_ROM_ONLY</codeph> changed |
|
39 from bool data type to bit flag. </cmd> |
|
40 <info><p><codeph>rom_only</codeph> set to 1 indicates the ROM-only implementation |
|
41 must be used. </p><p><codeph>rom_only</codeph> set to 0 indicates the ROM-only |
|
42 implementation can be overidden.</p></info> |
|
43 </step> |
|
44 <step id="GUID-AF2EFD83-7116-472A-A1AE-4043236EA238"><cmd>In <codeph>REGISTRY_INFO</codeph> structure, |
|
45 the resource_format_version must be <codeph>RESOURCE_FORMAT_VERSION_3</codeph> . |
|
46 </cmd> |
|
47 </step> |
|
48 <step id="GUID-668E4137-3339-4C40-8721-9F9109C936A1"><cmd>In I<codeph>NTERFACE_INFOstructure</codeph>, |
|
49 the <codeph>interface_uid</codeph> is renamed to <codeph>instantiation_interface_uid</codeph>. </cmd> |
|
50 </step> |
|
51 <step id="GUID-C4B7C81E-0472-4401-8CA2-EC46D5E48EC5"><cmd>In <codeph>REGISTRY_INFO</codeph> structure, |
|
52 the <codeph>resource_format_version</codeph> must be <codeph>RESOURCE_FORMAT_VERSION_3</codeph>. |
|
53 </cmd> |
|
54 </step> |
|
55 </steps> |
|
56 <example><codeblock xml:space="preserve">#define IMPLEMENTATION_INFO_RECORD_TYPE1 1 |
|
57 STRUCT IMPLEMENTATION_INFO |
|
58 { |
|
59 BYTE info_format; // = IMPLEMENTATION_INFO_RECORD_TYPE1 |
|
60 LONG implementation_uid; |
|
61 BYTE version_no; |
|
62 LTEXT display_name; |
|
63 LEN BYTE LTEXT8 default_data[]; // maximum 2 strings with 255 bytes each |
|
64 LEN BYTE LTEXT8 opaque_data[]; // maximum 2 strings with 255 bytes each |
|
65 LONG extended_interfaces[]; // maximum 8 extended interfaces |
|
66 BYTE flags; |
|
67 } |
|
68 |
|
69 #define IMPLEMENTATION_INFO_RECORD_TYPE2 2 |
|
70 STRUCT BINARY_IMPLEMENTATION_INFO |
|
71 { |
|
72 BYTE info_format; // = IMPLEMENTATION_INFO_RECORD_TYPE2 |
|
73 LONG implementation_uid; |
|
74 BYTE version_no; |
|
75 LTEXT display_name; |
|
76 BYTE default_data[]; // maximum 512 bytes |
|
77 BYTE opaque_data[]; // maximum 512 bytes |
|
78 LONG extended_interfaces[]; // maximum 8 extended interfaces |
|
79 BYTE flags; |
|
80 } |
|
81 |
|
82 STRUCT INTERFACE_INFO |
|
83 { |
|
84 LONG instantiation_interface_uid; |
|
85 STRUCT implementations[]; // maximum 8 implementations for each interface |
|
86 } |
|
87 |
|
88 STRUCT REGISTRY_INFO |
|
89 { |
|
90 LONG resource_format_version; // Use RESOURCE_FORMAT_VERSION_3 |
|
91 LONG dll_uid; |
|
92 STRUCT interfaces[]; // maximum 4 interfaces |
|
93 } </codeblock></example> |
|
94 <postreq><p><ul> |
|
95 <li><p>Maximum of four<codeph>INTERFACE_INFO</codeph> structures can be defined |
|
96 in one resource file. </p></li> |
|
97 <li><p>Maximum of eight <codeph>IMPLEMENTATION_INFO</codeph> or <codeph>BINARY_IMPLEMENTATION_INFO</codeph> structures |
|
98 in each <codeph>INTERFACE_INFO</codeph> . Totally eight structures can be |
|
99 defined. </p></li> |
|
100 <li><p>Maximum eight extended interfaces in each<codeph> IMPLEMENTATION_INFO</codeph> record. </p></li> |
|
101 <li><p>In a <codeph>IMPLEMENTATION_INFO</codeph> record a maximum of two strings |
|
102 with 255 bytes each can be used for <codeph>default_data</codeph> or<codeph>opaque_data</codeph> definitions. </p></li> |
|
103 <li><p>In a <codeph>BINARY_IMPLEMENTATION_INFO</codeph> record, a maximum |
|
104 of 512 bytes each for <codeph>default_data</codeph> or <codeph>opaque_data</codeph> definitions. |
|
105 </p></li> |
|
106 </ul></p></postreq> |
|
107 </taskbody><related-links> |
|
108 <link href="GUID-B541BD01-29BE-4CB7-9420-ABEE0BDC9BA4.dita"><linktext>Writing a |
|
109 Standard Registration Resource File</linktext></link> |
|
110 <link href="GUID-64D62DD8-3D9C-4659-9658-C0B4D74D6E69.dita"><linktext>Writing the |
|
111 Version 2 Registration Resource File</linktext></link> |
|
112 </related-links></task> |