Okay - I would like to know how the CID number is generated - Do I use the
GUIDGEN program to create both an IID number and a CID number. I take it
that these numbers have to be different to each other. How does the CID
number interact with the system. Is this like a component registration
reference number?.
I have gathered that the IID number is placed in the header file which is
included by the application code when it is built and the xpt file is
placed in the components directory. My way of thinking is that the xpt
file is simply a reference to where Javascript can connect to the code in
the the plugin. Probably got my terminology and ideas totally wrong here
but I am trying to understand how this work in the basic sense for an
absolute beginner to XPCOM. Please could someone help to understand this
process.
Regards
Patrick McHale
Sean Echevarria wrote:
> Any given interface can be implemented by more than one component.
> You query components for the interfaces they support. You identify an
> interface by an IID. A component does not have the same identifier as
> any of the interfaces it implements.
>
> (not too verbose but hope that helps)
>
> On Wed, 24 Jan 2001 14:10:44 +0100, "Tobias Trelle"
> <[EMAIL PROTECTED]> wrote:
> >Hi,
> >
> >I have a question regarding the npsimple plug-in sample
> >located at /modules/plugin/test . This plug-in is
> >scriptable, so it's implemented as an XPCOM component
> >that goes into component subfolder.
> >
> >I observed that
> >
> >a) the binary has 312DA841-3DBF-11d3-BCFB-00A0C9C8D91D
> > as CID, defined in simpleCID.h:
> >
> > #define NS_SIMPLEPLUGIN_CID \
> > { 0x312da841, 0x3dbf, 0x11d3, \
> > { 0xbc, 0xfb, 0x0, 0xa0, 0xc9, 0xc8, 0xd9, 0x1d } }
> >
> >b) the IDL file nsISimplePluginInstance.idl (and the derived header
> > _xpidl\nsISimplePluginInstance.h) has
> > fa8728f0-117a-11d4-8fa5-0010a4e73d9a as IID:
> >
> > #define NS_ISIMPLEPLUGININSTANCE_IID \
> > { 0xfa8728f0, 0x117a, 0x11d4, \
> > { 0x8f, 0xa5, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}
> >
> >Why is there a difference between component ID and interface ID?
> >
> >Please try to explain it in simple words for an XPCOM beginner.
> >Can the interface be viewed as some kind of separate component
> >itself?
> >
> >TIA - Regards, Tobias Trelle