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

📄 pluginstype.pas

📁 枫叶插件管理器 版本:1.0.0.0 说明: 基于API DLL形式的插件管理器
💻 PAS
字号:
Unit PluginsType;

Interface

Uses Windows;

Type
  TPicFormat = (SG_BMP, SG_ICON);

  PAddPluginPic_CallBack = Function(Handle: THandle; PicFormat: TPicFormat; ResName, ResType: PChar): Integer;

  PPluginManagerInfo = ^TPluginManagerInfo;
  TPluginManagerInfo = Record
    App,
      MenuItem: Pointer;
    LibHandle: DWORD;
    AddPluginPicCallBack: PAddPluginPic_CallBack;
  End;

  PPluginInfo = ^TPluginInfo;
  TPluginInfo = Record
    Version: PChar;
    Name: PChar;
    Description: PChar;
    ModulePath: Function: PChar; stdcall;
  End;

  PPluginModule = ^TPluginModule;
  TPluginModule = Record
    PluginInfo: Function: PPluginInfo; stdcall;
    PluginManagerInfo: Procedure(PMI: PPluginManagerInfo); stdcall;
    About: Procedure(This_Module: PPluginModule); stdcall;
    Config: Procedure(This_Module: PPluginModule); stdcall;
    Initialize: Function(This_Module: PPluginModule): Integer; stdcall;
    Terminate: Function(This_Module: PPluginModule): Integer; stdcall;
    Start: Function(This_Module: PPluginModule): Integer; stdcall;
    Stop: Function(This_Module: PPluginModule): Integer; stdcall;
    Uninstall: Function(This_Module: PPluginModule): Integer; stdcall;
  End;

  Sg_PluginInfo = Function: PPluginModule;

Function GetModulePath: PChar; stdcall;
Implementation

Function GetModulePath: PChar; Stdcall;
Var
  ModuleName: String;
Begin
  SetLength(ModuleName, 260);
  GetModuleFileName(HInstance, PChar(ModuleName), Length(ModuleName));
  Result := PChar(ModuleName);
End;

End.

⌨️ 快捷键说明

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