Converters need to provide the standard ECOM factory code to create an instance of the converter. For example,
CConverterBase2* CExampleConverter::NewL()
{
CConverterBase2* conv=new (ELeave) CExampleConverter();
return conv;
}
// Standard ECOM factory code
const TImplementationProxy ImplementationTable[] =
{
IMPLEMENTATION_PROXY_ENTRY(KExampleConvImplementationUid,CExampleConverter::NewL)
};
// Standard ECOM factory code
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
{
aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
return ImplementationTable;
}
For an explanation of this code, see How to export the implementation factories.