tmytのらくがき

個人の日記レベルです

超絶メモ

またもやソースコード
面白くないメモ日記でごめんね。


DelphiRegnessemのプラグインをUNsmPlugin.pas を使わずに書くときのために。
Project2のとことかGetPluginInfoの中身とかちょこちょこっと変えたら使える。
UNsmConsts, UNsmTypesにパスを通しておくように。

library Project2;

{$R *.res}

uses
  SysUtils,
  UNsmConsts,
  UNsmTypes;

function GetPluginInfo(const nInfNo: Integer; lpBuffer: PChar; const nSize: Integer): Integer; Stdcall;
begin
  Result := 0;
  case nInfNo of
    NMPI_APIVER:      StrPLCopy(lpBuffer, NSM_API_VERSION, nSize);
    NMPI_MODULENAME:  StrPLCopy(lpBuffer, '', nSize);
    NMPI_TITLE:       StrPLCopy(lpBuffer, '', nSize);
    NMPI_DESCRIPTION: StrPLCopy(lpBuffer, '', nSize);
    NMPI_AUTHOR:      StrPLCopy(lpBuffer, '', nSize);
    NMPI_COPYRIGHT:   StrPLCopy(lpBuffer, '', nSize);
    NMPI_PLUGINVER:   StrPLCopy(lpBuffer, '', nSize);
    else
      Exit;
  end;
  Result := StrLen(lpBuffer);
end;

function Initialize(const lpNsmInitInfo: PNsmPluginInitInfo): Integer; Stdcall;
begin
  Result := 0;
end;

function Terminate(): Integer; stdcall;
begin
  Result := 0;
end;

exports
  GetPluginInfo,
  Initialize,
  Terminate;

end.