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

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Mon, 7 Feb 2005 18:09:25 -0800

On Tue, Feb 08, 2005 at 02:53:21PM +1300, Jeff McClintock wrote:
> So no special keyword like on windows?, I've now get something like this...
> extern "C" {
> IUnknown* GetPluginFactory(void)
> {
> // snip
> }

So that seems to be how it has to be done.  Yuck.  Does __declspec()
apply to the next symbol declared, or is it some global flag?  If it
applies to the next symbol, I'd rather see a tighter binding:

EXPORT_THIS_SYMBOL IUnknown *GetPluginFactory()




IUnknown *GetPluginFactory()


IUnknown *

> ..as to the factory being an object, or just a function.  I'm not 
> worried either way.

I think making it an object is just OO masturbation.  It feels good, but
it doesn't really achieve anything.  

Invoking the dll entry point is querying for metadata.  It discovers the
list of plugins in that package.  Then you can go out and read the
associated metadata file (I feel dirty just saying that) and/or query the
plugin further for more metadata.

As for external metadata, I'll survive with it, but we STILL need to
provide internal metadata, too, for things like wrappers.

Lastly, what the heck is an IUnknown in C?  Where's some definition for

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: