[Prev][Next][Index][Thread]

Re: Documentation suggestion



> 
> Hi,
> 	Section 4.4.1 of the oskit manual describes the COM interface structure, 
> which does not give a representative picture of the oskit implementation -- 
> and can be quite misleading.
> 
> All of the oskit code assumes the function table pointer is the first thing in 
> the COM object implementing the COM interface e.g. services.c ; whereas the 
> diagram in 4.4.1 shows it somewhere in the middle. 

Not so.
The function table pointer can indeed be anywhere in the object,
it could even be last.

For instance, if an object exports multiple interfaces (via multiple
function pointers), the function pointers are at multiple positions,
not all of which can be the first.  See oskit/freebsd/net/socketcomio.c
for an example.  We have adopted the convention to use the first n
slots in our implementations, but this convention is entirely
arbitrary.  

Remember that a reference to a COM object is a pointer to a pointer to
a function pointer table; a pointer to the object implementing the
interface is never exported.  Don't be confused by the fact that for most
single-interface exporting objects, the two are the same.

	- Godmar


Follow-Ups: References: