A dll tem que estar na mesma pasta do executavel.
var
DLLHandle :THandle;
NomeDaFuncaoOuProcedure :function(Parametro1:String; Parametro2 :Integer):String; stdcall;
Retorno :String;
begin
try
try
DLLHandle := LoadLibrary('NomeDaDLL.dll');
if DLLHandle > 0 then
begin
NomeDaFuncaoOuProcedure := GetProcAddress(DLLHandle, 'NomeDaFuncaoOuProcedure');
Retorno := NomeDaFuncaoOuProcedure(Parametro1, Parametro2);
end
raise Exception.Create('DLL não encontrada.');
finally
FreeLibrary(DLLHandle);
end;
except on E: Exception do
ShowMessage(E.Message);
end;
end;