You'll have to load and unload the DLL yourself then (instead of declaring a function as external)
eg. suppose there is a procedure proc that takes an integer as parameter,
you'll have to do
something like this
type
TProcPtr = function(var iParm : Integer);
var
MyProcPtr : TProcPtr;
Handle : THandle;
Parm : integer;
begin
Handle := LoadLibrary('YOUR.DLL');
if Handle <> 0 then
begin
@MyProcPtr := GetProcAddress(Handle, 'proc');
if @MyProcPtr <> nil then begin
MyProcPtr(Parm);
{do sth}
end;
FreeLibrary(Handle);
end
else
application.messagebox('DLL not found', 'Error',
MB_OK);
end;