First make sure you have Delphi.
Second, whack open the test plugin. You will see the test functions kaitnieks put in there, delete them and make your own.
Next, find the function GetFunctionCount() and edit like so:
function GetFunctionCount(): Integer; stdcall; export;
begin
Result := 0; //How many functions you have
end;
Then find the function GetFunctionInfo and edit:
function GetFunctionInfo(x: Integer; var ProcAddr: Pointer; var ProcDef: PChar): Integer; stdcall;
begin
case x of
0:
begin
ProcAddr := @SomeFunction; // Your function name here;
StrPCopy(ProcDef, 'Insert function declaration here');
end;
1:
begin
ProcAddr := @Example;
StrPCopy(ProcDef, 'function Example : Bla;');
end;
else
x := -1;
end;
Result := x;
end;
For types do the same for function GetTypeCount() but for the type info procedure have something like:
function GetTypeInfo(x: Integer; var sType, sTypeDef: string): Integer; stdcall;
begin
case x of
0:
begin
sType := 'Insert Type Here';
sTypeDef := 'Insert type definition here';
end;
1:
begin
sType := 'TNumbers';
sTypeDef := 'record n1, n2: Integer; end;';
end;
1:
begin
sType := 'TNumber';
sTypeDef := 'Integer';
end;
else
x := -1;
end;
Result := x;
end;
Now, assuming you have done everything correctly, go to (Delphi 7) Project>Compile TestPlugin. This should output a DLL named TestPlugin. To use the types/functions just restart Scar and make sure no crazy errors appear.
Wow, go freddy for adding types for plugins (or was it implemented before?).