Sorry for the late response, I read the email notification of your post but forgot to reply. Anyway, here's a quick example function that takes input from Data and then fills it with a new value.
function Reverse(mWnd, aWnd: hWnd; Data, Parms: PChar; Show, NoPause: Boolean): Integer; stdcall;
var
Temp: String;
I: Integer;
begin
SetLength(Temp, Length(Data));
for I := 0 to Length(Data) do
begin
Temp[I] := Data[Length(Data)-I]; // Reversing string by retrieving characters from Data one at a time
end;
StrCopy(Data, PChar(Temp)); // Putting reversed string back into data
Result := 3;
end;
Using
$dll(something.dll, Reverse, hello there) would return
ereht ollehThere's no direct way to pass more than one parameter to a DLL I'm afraid; the simplest way is to tokenize them somehow. For instance if you know the parameters won't have a semi-colon in them you can just use
$dll(something.dll, SomeFunction, value1;value2;value3) and then parse Data inside the DLL.