library Sample;


uses
  Windows,
  Shared;

{$R *.RES}

var
 OwnerHandle: THandle;

const
 { Only change the values to these constants, not the names }
 my_name    = 'Generic Custom Plugin'; // <-- change this
 my_version = '1.0';                   // <-- and this
 my_author  = 'st0ner@charter.net';    // <-- and this
 help_file  = 'Custom.txt';            // <-- used for the edit server, when
                                       // loading a plugin to test or configure,
                                       // EditServerDir+\plugins\help_file is loaded

//== PLUGIN SHIT =============================================================//
procedure InitPlugin(Hndl:Integer); StdCall;
begin
{ do not change assigning of Hndl below. the plugin can use global var
  to access owner applicaton's handle passed to dll.}
 OwnerHandle := Hndl;
{ Use this procedure to create components, forms, or any other
  objects }
end;

procedure KillPlugin; StdCall;
begin
{ Use this procedure to create components, forms, or any other
  objects }
end;

function PluginInfo : PChar; StdCall;
var s: string;
begin
 { Keep this format the same!!!!!!!!!!!!!!! }
 s := my_name+'%'+my_version+'%'+my_author+'%'+help_file;
 Result := PChar(s);
 { Changing the above lines will crash the client. }
end;

function DoPluginAction(Action: integer; Param1,Param2: pChar;
                        Param3,Param4: integer; BoolVar: Boolean): pChar; stdCall;
begin
 { Result can be whatever u want it to be }
 Result := 'Internal Plugin Error';
 case Action of
  0:  begin
       { you can do whatever u want to do, using the params supplied,
         and sending Result back to client Change Result to whatever the
         plugin will reply with, example below.}
      Result := 'Plugin executed action 0.';
      end;

  1:  begin
      end;

  2:  begin

      end;

  3:  begin

      end;

  4:  begin
      
      end;

  5:  begin

      end;

  6:  begin

      end;

  7:  begin

      end;

  8:  begin

      end;

  9:  begin

      end;

  10: begin

      end;
  { you can keep adding functions below }
  end;
end;

//============================================================================//
exports
 InitPlugin,
 PluginInfo,
 Killplugin,
 DoPluginAction;
begin

 { Uncomment the next line to use initialization code. }
 // initialization
 { enter init code here! }

end.
 