Re: Introspection



On Tue, 11 Jan 2005 18:17:19 +0100, Maciej Katafiasz wrote:
> Hmm, so you're supposed to have function with magic name constructible
> from CLSID that when called does the right thing and makes it so that
> afterwards everything is in place and we can construct objects of given
> type right away? Did I understand it right?
> 
> /me tries to map that concept to Python and Guile...

No, it's simpler than that.

1) You call  CoCreateInstance( {some-com-128-bit-id} );

2) COM looks that ID up in the registry which says "This object
   can be found in foobar.dll", so it dlopens foobar.dll and grabs
   the DllGetClassObject function, then calls it with that ID

3) Your object implementation provides that function and hands back
   a class factory, which COM then uses to manufacture an object instance

No magic function name construction is needed because PE doesn't have a
stupid linking model that causes symbols to conflict.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]