📄 hxplugn.h
字号:
*/ STDMETHOD(GetNextPluginInfo)( THIS_ REF(IHXValues*) pRetValues ) PURE; /************************************************************************ * Method: * IHXPluginSearchEnumerator::GetPluginAt * * Purpose: * Returns an instance of a plugin at a specific index in the list * */ STDMETHOD(GetPluginAt)( THIS_ UINT32 index, REF(IUnknown*) pIUnkResult, IUnknown* pIUnkOuter ) PURE; /************************************************************************ * Method: * IHXPluginSearchEnumerator:: * * Purpose: * Returns information about a plugin at a specific index in the list * */ STDMETHOD(GetPluginInfoAt)( THIS_ UINT32 index, REF(IHXValues*) pRetValues ) PURE;};// $EndPrivate./**************************************************************************** * * Interface: * * IHXPluginReloader * * Purpose: * * Tells the client core to reload all plugins. * * IID_IHXPluginReloader: * * {00000C03-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXPluginReloader, 0x00000C03, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXPluginReloaderDECLARE_INTERFACE_(IHXPluginReloader, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXPluginReloader methods */ /************************************************************************ * Method: * IHXPluginReloader::ReloadPlugins * Purpose: * Causes the client core to reload all plugins. * */ STDMETHOD(ReloadPlugins) (THIS) PURE;};/**************************************************************************** * * Interface: * * IHXPluginFactory * * Purpose: * * This interface is implemented by a plugin in order to have more then * one "RMA plugin" in a single DLL. I.e., a plugin author could * use this interface to have 3 different file format plugins in * a single DLL. * * IID_IHXPluginFactory: * * {00000C04-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXPluginFactory, 0x00000C04, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXPluginFactoryDECLARE_INTERFACE_(IHXPluginFactory, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXPluginFactory methods */ /***************************************************************** * Method: * IHXPluginFactory::GetNumPlugins * Purpose: * Report the number of Plugins within the DLL. * * Parameters: */ STDMETHOD_(UINT16, GetNumPlugins) (THIS) PURE; /***************************************************************** * Method: * IHXPluginFactory::GetPlugin * Purpose: * Returns an IUnknown interface to the requested plugin. * * Parameters: */ STDMETHOD(GetPlugin) (THIS_ UINT16 uIndex, IUnknown** pPlugin) PURE;};// $Private:/**************************************************************************** * * Interface: * * IHXPluginChallenger * * Purpose: * * This interface is implemented by a plugin in order to allow * verification of a plugin's authenticity, by issuing a challenge * and receiving a challenge response. * * IID_IHXPluginChallenger: * * {00000C05-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXPluginChallenger, 0x00000C05, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXPluginChallengertypedef struct _HXTimeval HXTimeval;DECLARE_INTERFACE_(IHXPluginChallenger, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXPluginChallenger methods */ /***************************************************************** * Method: * IHXPluginChallenger::Challenge * Purpose: * Challenge the plugin's authenticity. Returns a challenge * response which the caller can use to verify that the * plugin is authentic. * * Parameters: * tVal A time value which may be used to create the * challenge response. */ STDMETHOD(Challenge) (THIS_ HXTimeval /*IN*/ tVal, REF(IHXBuffer*) /*OUT*/ pResponse) PURE;};/**************************************************************************** * * Interface: * * IHXPluginQuery * * Purpose: * * Queries the plugin handler for information on plugins. * * IID_IHXPluginQuery: * * {00000C06-0901-11d1-8B06-00A024406D59} * */#define PLUGIN_FILE_PATH "PluginFilePath"#define PLUGIN_PATH "PlgPath"#define PLUGIN_DESCRIPTION "PlgDesc"#define PLUGIN_COPYRIGHT "PlgCopy"#define PLUGIN_MOREINFO "PlgMore"#define PLUGIN_MIMETYPES "PlgMime"#define PLUGIN_EXTENSIONS "PlgExt"#define PLUGIN_OPENNAME "PlgOpen"#define PLUGIN_MULTIPLE "PlgMult"DEFINE_GUID(IID_IHXPluginQuery, 0x00000C06, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXPluginQueryDECLARE_INTERFACE_(IHXPluginQuery, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXPluginQuery methods */ /************************************************************************ * Method: * IHXPluginQuery::GetNumPluginsGivenGroup * * Purpose: * Gets the number of plugins associated with a particular class id. * */ STDMETHOD(GetNumPluginsGivenGroup) (THIS_ REFIID riid, REF(UINT32) /*OUT*/ unNumPlugins) PURE; /************************************************************************ * Method: * IHXPluginQuery::GetPluginInfo * * Purpose: * Gets the info of a particular plugin. * */ STDMETHOD(GetPluginInfo) (THIS_ REFIID riid, UINT32 unIndex, REF(IHXValues*) /*OUT*/ Values) PURE;};// $EndPrivate./**************************************************************************** * * Interface: * * IHXGenericPlugin * * Purpose: * * Interface exposed by a plugin DLL to inform the client / server core * that your plugin wishes to have InitPlugin called immediately. * * IID_IHXGenericPlugin: * * {00000C09-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXGenericPlugin, 0x00000C09, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXGenericPluginDECLARE_INTERFACE_(IHXGenericPlugin, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXGenericPlugin methods */ STDMETHOD(IsGeneric) (THIS_ REF(BOOL) /*OUT*/ bIsGeneric) PURE;};DEFINE_GUID(IID_IHXPluginHandler, 0x00000200, 0xb4c8, 0x11d0, 0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);DEFINE_GUID(IID_IHXPlugin2Handler, 0x00000201, 0xb4c8, 0x11d0, 0x99, 0x95, 0x0, 0xa0, 0x24, 0x8d, 0xa5, 0xf0);#undef INTERFACE#define INTERFACE IHXPlugin2HandlerDECLARE_INTERFACE_(IHXPlugin2Handler, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXPlugin2Handler Methods */ /************************************************************************ * Method: * IHXPlugin2Handler::Init * * Purpose: * Specifies the context and sets the pluginhandler in motion. * */ STDMETHOD(Init) (THIS_ IUnknown* pContext) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::GetNumPlugins2 * * Purpose: * Gets the info of a particular plugin. * */ STDMETHOD_(ULONG32,GetNumOfPlugins2) (THIS) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::GetPluginInfo * * Purpose: * Gets the info of a particular plugin. * */ STDMETHOD(GetPluginInfo) (THIS_ UINT32 unIndex, REF(IHXValues*) /*OUT*/ Values) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::FlushCache() * * Purpose: * Flushes the LRU cache -- Unloads all DLLs from memory * which currenltly have a refcount of 0. */ STDMETHOD(FlushCache) (THIS) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::SetCacheSize * * Purpose: * This function sets the size of the Cache. The cache is * initally set to 1000KB. To disable the cache simply set * the size to 0.If the cache is disabled a DLL will be * unloaded whenever it's refcount becomes zero. Which MAY * cause performance problems. */ STDMETHOD(SetCacheSize) (THIS_ ULONG32 nSizeKB) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::GetInstance * * Purpose: * * This function will return a plugin instance given a plugin index. * */ STDMETHOD(GetInstance) (THIS_ UINT32 index, REF(IUnknown*) pUnknown) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::FindIndexUsingValues * * Purpose: * Finds a plugin which matches the set of values given. An index * is returned which can be used to either get the values (using * GetPluginInfo) or an instance can be created using GetPluing(). * */ STDMETHOD(FindIndexUsingValues) (THIS_ IHXValues*, REF(UINT32) unIndex) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::FindPluginUsingValues * * Purpose: * Finds a plugin which matches the set of values given. A Plugin * instance is returned. * */ STDMETHOD(FindPluginUsingValues) (THIS_ IHXValues*, REF(IUnknown*) pUnk) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::FindIndexUsingStrings * * Purpose: * Finds a plugin which matches the set of values given. An index * is returned which can be used to either get the values (using * GetPluginInfo) or an instance can be created using GetPluing(). * NOTE: that a max of two values may be given. */ STDMETHOD(FindIndexUsingStrings) (THIS_ char* PropName1, char* PropVal1, char* PropName2, char* PropVal2, char* PropName3, char* PropVal3, REF(UINT32) unIndex) PURE; /************************************************************************ * Method: * IHXPlugin2Handler::FindPluginUsingStrings * * Purpose: * Finds a plugin which matches the set of values given. A Plugin * instance is returned. * NOTE: that a max of two values may be given. */ STDMETHOD(FindPluginUsingStrings) (THIS_ char* PropName1, char* PropVal1, char* PropName2, char* PropVal2, char* PropName3, char* PropVal3, REF(IUnknown*) pUnk) PURE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -