
Originally Posted by
Bulat Ziganshin
'l' command only returns archive totals. listing isn't implemented because it wasn't requested
facompress/cls isn't required, but if you use them - make sure that all dlls is from the same freearc package because API was modified in Sep2011
try
Code:
errcode = DLL.CallFunction("unarc.dll", "FreeArcExtract",'NULL,"x","c:\\testext\\test.arc" ','NULL,DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
thanks for the reply. your code sample had the same result. i tried to access unarc.dll with the external dll call in freepascal and the behavior was exactly the same. the file gets read completely, but nothing is extracted:
Code:
function FreeArcExtract(a,b,c,d,e,f,g,h,i,j,k:PAnsiChar): integer; cdecl; external 'unarc.dll';
begin
FreeArcExtract(nil, 'x', 'C:\testext\test.arc', nil, nil, nil, nil, nil, nil, nil, nil);
// also doesn't work: FreeArcExtract(nil, 'x', '-dpc:\testext', '--', 'C:\testext\test.arc', nil, nil, nil, nil, nil, nil);
end;
end.
since your "LoadLibrary"-based delphi example compiles and runs fine, that leads me to believe that the dll doesn't support all call methods. i wanted to keep it simple, since i'm not that experienced in that regard, but it looks like i need to shape up quicker than i had planned 
Edit: I switched to the LoadLibrary calling method and still get the same behaviour: The file is read but nothing gets extracted. What am I doing wrong?
Code:
var
Form1: TForm1;
Handle: THandle;
FreeArcExtract: function(a,b,c,d,e,f,g,h,i,j,k: PAnsiChar): integer; cdecl;
implementation
{$R *.lfm}
//function FreeArcExtract(a,b,c,d,e,f,g,h,i,j,k:PAnsiChar): integer; cdecl; external 'unarc.dll';
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
Handle := LoadLibrary('UNARC.DLL');
FreeArcExtract := GetProcAddress(Handle, 'FreeArcExtract');
FreeArcExtract(nil, 'x', '-dpc:\testext', '--', 'C:\testext\test.arc', nil, nil, nil, nil, nil, nil);
FreeLibrary(Handle);
end;
end.