After staring at that, I had to simplify it further ( a compulsion of
mine ).
CreateInstance() function now simply returns a pointer to the plugin.
It's still checked for errors, except by the factory.
----------header----------------- #include "plugin.h"
class Prototype_Plugin : public GMPI_Plugin { public: /* create function */ static GMPI_Plugin * GMPI_STDCALL CreateInstance(void);
/* test function */ virtual GMPI_RESULT GMPI_STDCALL Placeholder1( int32_t); };
----------------cpp-------------- #include "test_plugin.h" #include "factory.h"
/* Plugin unique ID */ /* IID vs URI undecided. For now using GUID */
/* instantiate a new plugin. Return NULL for failure */ GMPI_Plugin *Prototype_Plugin::CreateInstance(void) { return new Prototype_Plugin(); }
GMPI_RESULT Prototype_Plugin::Placeholder1( int32_t) { return GMPI_SUCCESS; }
---------------------------------------------------------------------- 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