Writing a version 2 registration resource file is similar to writing a standard registration resource file.
All the variables required to write a standard registration resource file must be set. In addition:
Set resource_format_version
to
the value of RESOURCE_FORMAT_VERSION_2
defined in RegistryInfoV2.rh
.
In the IMPLEMENTATION_INFO
resource
that declares the properties of a single implementation, set an additional
member rom_only
.
rom_only
set to 1 indicates the ROM-only implementation
must be used.
rom_only
set to 0 indicates the ROM-only
implementation can be overidden.
Note:
rom_only
value
must be set individually for all implementations declared in a version 2 registration
resource file. A RAM plug-in can also use a version 2 registration resource file.
However, the implementation must set rom_onlymember
to 0.
In case it is set to one the plug-in cannot be used.
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.
// 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; } }; } }; }