views:

31

answers:

1

and why does Implementation ID necessary in ECOM? UID3 is not enough?

thank you.

+1  A: 

All Symbian OS binaries have three UIDs: UID1, UID2, UID3.

  • UID1 specifies the target category (e.g. exe, dll) and is automatically inferred from the MMP file TARGETTYPE keyword.

  • UID2 specifies the target subcategory (e.g. generic dll or plug-in dll). For ECOM plug-in dlls it should be 0x10009d8d.

  • UID3 identifies the object itself and you must supply an unique value (picked from unprotected range or allocated from protected range). UID2 and UID3 are specified using the MMP file UID keyword.

ECOM plug-in resource files contain three kinds of UIDs:

  • dll_uid is a mechanism to map the interfaces/implementations contained in a plug-in resource file to a plug-in binary DLL. It's the same as the UID3.

  • interface_uid is a UID that identifies the interface the plug-in implements. A plug-in interface may have more than one implementation so a mechanism to identify their commonality is needed.

  • implementation_uid is an identifier for the interface implementation. Often it's the same as dll_uid but it doesn't need to be. It can be different to allow multiple interface implementations in a single binary.

So, UID3 is enough but the ECOM framework loding the resource files needs to know the binary dll_uid too to be able to load the implementation when requested.

laalto
The Implementation ID does not have to be the same as the UID3 of the DLL implementing the plugin (though it often is), so you can provide mutliple ECOM plugins in a single DLL.
MathewI
@Mathewl: You are right. Thanks for the comment. I've updated my answer.
laalto