⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmaplugn.pas

📁 Delphi源码REAlRMSDK.rar
💻 PAS
📖 第 1 页 / 共 2 页
字号:

    (************************************************************************
     *	Method:
     *	    IRMAPluginReloader::ReloadPlugins
     *	Purpose:
     *	    Causes the client core to reload all plugins.
     *
     *)

    function ReloadPlugins: HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAPluginReloader}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAPluginFactory
 *
 *  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_IRMAPluginFactory:
 *
 *	{00000C04-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAPluginFactory: TGUID = '{00000C04-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAPluginFactory}

type
  IRMAPluginFactory = interface (IUnknown)
  ['{00000C04-0901-11d1-8B06-00A024406D59}']

    (*****************************************************************
     *	Method:
     *	    IRMAPluginFactory::GetNumPlugins
     *	Purpose:
     *	    Report the number of Plugins within the DLL.
     *
     *	Parameters:
     *)

    function GetNumPlugins: UINT16; stdcall;

    (*****************************************************************
     *	Method:
     *	    IRMAPluginFactory::GetPlugin
     *	Purpose:
     *	    Returns an IUnknown interface to the requested plugin.
     *
     *	Parameters:
     *)

    function GetPlugin(uIndex: UINT16; out pPlugin: IUnknown): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAPluginFactory}

(****************************************************************************
 *
 *  Interface:
 *
 *	IRMAGenericPlugin
 *
 *  Purpose:
 *
 *	Interface exposed by a plugin DLL to inform the client / server core
 *	that your plugin wishes to have InitPlugin called immediately.
 *
 *  IID_IRMAGenericPlugin:
 *
 *	{00000C09-0901-11d1-8B06-00A024406D59}
 *
 *)

const
  IID_IRMAGenericPlugin: TGUID = '{00000C09-0901-11d1-8B06-00A024406D59}';
  {$EXTERNALSYM IID_IRMAGenericPlugin}

type
  IRMAGenericPlugin = interface (IUnknown)
  ['{00000C09-0901-11d1-8B06-00A024406D59}']

    function IsGeneric(var bIsGeneric: BOOL): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAGenericPlugin}

const
  IID_IRMAPluginHandler: TGUID = '{00000200-b4c8-11d0-9995-00a0248da5f0}';
  {$EXTERNALSYM IID_IRMAPluginHandler}

  IID_IRMAPlugin2Handler: TGUID = '{00000201-b4c8-11d0-9995-00a0248da5f0}';
  {$EXTERNALSYM IID_IRMAPlugin2Handler}

type
  IRMAPlugin2Handler = interface (IUnknown)
  ['{00000200-b4c8-11d0-9995-00a0248da5f0}']

     (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::Init
     *
     *	Purpose:
     *	    Specifies the context and sets the pluginhandler in motion.
     *
     *)

    function Init(pContext: IUnknown): HRESULT; stdcall;

     (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::GetNumPlugins2
     *
     *	Purpose:
     *	    Gets the info of a particular plugin.
     *
     *)

    function GetNumOfPlugins2: ULONG32; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::GetPluginInfo
     *
     *	Purpose:
     *	    Gets the info of a particular plugin.
     *
     *)

    function GetPluginInfo(unIndex: UINT32; out Values: IRMAValues): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::FlushCache()
     *
     *	Purpose:
     *	    Flushes the LRU cache -- Unloads all DLLs from memory
     *	    which currenltly have a refcount of 0.
     *)

    function FlushCache: HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::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.
     *)

    function SetCacheSize(nSizeKB: ULONG32): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::GetInstance
     *
     *	Purpose:
     *
     *	    This function will return a plugin instance given a plugin index.
     *
     *)

    function GetInstance(index: UINT32; out pUnknown: IUnknown): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::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().
     *
     *)

    function FindIndexUsingValues(values: IRMAValues; var unIndex: UINT32): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::FindPluginUsingValues
     *
     *	Purpose:
     *	    Finds a plugin  which matches the set of values given. A Plugin
     *	    instance is returned.
     *
     *)

    function FindPluginUsingValues(values: IRMAValues; out pUnk: IUnknown): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::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.
     *)

    function FindIndexUsingStrings(PropName1, PropVal1, PropName2, PropVal2,
      PropName3, PropVal3: PChar; var unIndex: UINT32): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::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.
     *)

    function FindPluginUsingStrings(PropName1, PropVal1, PropName2, PropVal2,
      PropName3, PropVal3: PChar; out pUnk: IUnknown): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::FindImplementationFromClassID
     *
     *	Purpose:
     *	    Finds a CommonClassFactory plugin which supports the
     *	    ClassID given. An instance of the Class is returned.
     *)

    function FindImplementationFromClassID(const GUIDClassID: TGUID; out pIUnknownInstance: IUnknown): HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::Close
     *
     *	Purpose:
     *	    A function which performs all of the functions of delete.
     *
     *
     *)

    function Close: HRESULT; stdcall;

    (************************************************************************
     *	Method:
     *	    IRMAPlugin2Handler::SetRequiredPlugins
     *
     *	Purpose:
     *	    This function sets the required plugin list
     *
     *
     *)

    function SetRequiredPlugins(ppszRequiredPlugins: PPChar): HRESULT; stdcall;

  end;
  {$EXTERNALSYM IRMAPlugin2Handler}

implementation

function RMACreateInstance; external 'embd3260.dll' name 'RMACreateInstance';
function RMAShutdown; external 'embd3260.dll' name 'RMAShutdown';

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -