Each converter DLL requires an associated information file. This file allows the converter architecture to read the properties of the converters in the DLL without having to load the DLL itself.
The following information is written to a resource file:
A single CONARC_RESOURCE_FILE
resource which contains
an array of CONVERTER_DATA
resources.
Each CONVERTER_DATA
resource describes the properties
of a single converter. It specifies the UID of the converter, an array of
MIME resources describing the data types from which the converter can convert
and another array of MIME resources describing the data types to which the
converter can convert.
Each MIME resource specifies the supported MIME type. For example,
text/html, and an array of LANG_DATA
resources giving localized
human-readable names for that MIME type.
Each LANG_DATA
resource specifies a language ID and
a human-readable name for the MIME type in that language.
NOTE: The resource file is included within a start
resource ...
end block in the project file. Its target path must
be\resource\convert\
.
The following example is an information file for a converter DLL that contains one converter:
#include <conplugin.rh> #include "ExampleConv.hrh" RESOURCE CONARC_RESOURCE_FILE { converter_list = { CONVERTER_DATA { conv_uid = KExampleConvImplementationUid; // UID of the converter, as returned by CConverterBase2::Uid() from_list = { MIME { type = "example/qp"; lang_list = { // lang_id is a value from the TLanguage enumeration. 01 is English. LANG_DATA{lang_id=01;translation="quoted-printable"; } }; } }; to_list = { MIME { type = "example/text"; lang_list = { LANG_DATA { lang_id = 01; translation = "text"; }; } }; } }; }