[gmpi] Re: low level API - Abstract Factory summary

  • From: "gogins@xxxxxxxxxxxx" <gogins@xxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 9 Feb 2005 17:38:34 -0500

In the COM system, there is a utility program that interrogates a COM DLL
for an entry point, which when called, registers the COM classes in the DLL
with the COM libraries and the system registry. When the COM factory is
called to create a COM object, the COM factory looks in the registry, finds
where the DLL is located, and gets a pointer to the factory in the DLL. The
COM factory (i.e. the operating system) then uses the DLL factory to create
an instance of the requested class, which it (i.e. the operating system)
then passes back to the COM client. 

The installer for a software package invokes the registration utility to
register any COM objects in the package with the operating system.

In other words, in COM, the COM client rarely deals directly with a DLL. It
deals only with the operating system. In my view, this is an excellent
system. And, there is no reason it cannot co-exist with calling factories
in the DLLs directly. It would be ideal if GMPI DLLs had factories that
would work with COM on Windows or be callable directly by plugin hosts.

Original Message:
-----------------
From: Jeff McClintock jeffmcc@xxxxxxxxxx
Date: Thu, 10 Feb 2005 11:26:44 +1300
To: gmpi@xxxxxxxxxxxxx
Subject: [gmpi] Re: low level API - Abstract Factory summary


 >>We are not solving a new problem (talking to a plugin).  The problem's
 >>already been solved, many times over.  Choosing an existing solution is
 >>quicker, less buggy, and less risky than re-inventing our own.
 >
 >
 > Does COM mandate that a dynamically loaded object (dll) have a factory
 > style interface?  If so, I missed that in my (admittedly not thorough)
 > browsing of various COM docs.


I think it's the convention.  If everything else is called via it's 
interface, seems strange to make an exception for the factory.

Sure it's only one function, a borderline case for an interface if ever 
there was one. A bit long winded yes, but we only need write this code 
once. We may as well be consistant.  Add the COM boilerplate code, then 
forget it.

Best Regards,
Jeff


----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: