Proposal and RFC: DAL, the Desktop Abstraction Layer

Mike Hearn mike@navi.cx
Wed Jan 19 11:44:29 PST 2005


On Wed, 2005-01-19 at 17:31 +0000, Jamie McCracken wrote:
> A COM server is an application and it implements interfaces. 

That's not how COM works at all, sorry. I think you're being confused by
Microsofts inconsistent terminology: some parts of the system refer to
objects as servers, and others to processes as servers.

> The concept 
> of object instances is not really relevant because the COM server's 
> interfaces are a contract and you dont have any knowledge of whether any 
> actual instances of the underlying objects exist. 

A COM "server" in this context is an object which implements one or more
interfaces derived from IUnknown and obeys the COM identity laws. You
can't call a method on an interface without an actual constructed object
in the C++ sense, that's impossible. I'm not sure what you're thinking
of here but it's not the COM I know (and am implementing ...)

> When a COM server is 
> activated all its interfaces are available - its not like some 
> interfaces are only available if a document is open

One of the COM laws is that interfaces on an object cannot be available
at one time yet not at another, but you seem to be confusing this with a
different thing ...

>  rather its a case of 
> the COM server saying I dont have an open document therefore I cant 
> perform function X if an instance does not exist (EG if I tried to do a 
> word search and there was no open document, the text editor's search 
> method should return an error indicating there's no doc open). In 
> essence that means the interface is a separate object to the actual 
> object that performs the function on it. If it was not then obviously 
> you would seg fault if you called a method on an object that was not 
> instantiated. That does not and should not happen in COM so should it 
> not be the same with Dbus?

I'm not sure what you're trying to say here but a COM interface is just
a vtable, so you can't call a method on an object unless you have an
interface pointer. You can't get an interface pointer that doesn't point
to an actual object, that's impossible.

So to clarify, COM uses exactly the same concepts as DBUS does -
applications provide objects which implement one or more interfaces.
Applications themselves cannot implement interfaces, that's nonsensical.

thanks -mike



More information about the dbus mailing list