Ver Mensaje Individual
  #3  
Antiguo 10-06-2010
vejerf vejerf is offline
Miembro
 
Registrado: ene 2007
Posts: 206
Reputación: 18
vejerf Va por buen camino
Siguiendo con la investigación y con el tema he dado con lo siguiente que no es más que la carga de la librería dinámicamente
Código Delphi [-]
type
  TDLLFUNC = function(Par1: String; Par2: Double; Par3: Integer; Par4: TXSDateTime): String;
...
procedure PruebaCargaFuncion;
var
  LibHandle: THandle;
  DLLFunc: TDLLFunc;
  Resultado : String;
begin
  LibHandle := LoadLibrary('dlllibrary.dll');  
  try
    @DLLFunc := GetProcAddress(LibHandle,'DllFunction');
    if Assigned(DLLFunc) then
      Resultado := DLLFunc(MyString,MyDouble,MyInteger,MyTXSDateTime);
  finally
    Free(LibHandle);
  end;
end;

Ejecutando en el depurador me dice que 'Not enough actual parameters' cuando miro la variable DLLFunc y por supuesto nunca asigna la función. Ya no sé por donde seguir. Gracias.
__________________
"Patientia et constantia taelecum"
Responder Con Cita