Ver Mensaje Individual
  #13  
Antiguo 27-06-2012
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.293
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Wink

Prueba con algo así y te debería funcionar:;

Código Delphi [-]
var
  H: Thandle;
  res:integer;
  proc: procedure();stdcall;
begin
  H := LoadLibrary('Project1.dll');
  // Cargada correctamente?
  if (H >= 32) then begin
    MessageDlg('Cargada la DLL...', mtInformation, [mbOK], 0);
    proc := nil;
    @proc := GetProcAddress(H, 'StartHook');
    // Asignada?
    if Assigned(proc) then begin
      MessageDlg('Acceso a la función StartHook', mtInformation, [mbOK], 0);
      // llamada
      proc();
      MessageDlg('Se ha ejecutadoStartHook', mtInformation, [mbOK], 0);
      // Liberar
      FreeLibrary(H);
    end;
  end
  else
    MessageDlg('Error, no se ha encontrado Project1.DLL', mtError, [mbOk], 0)
 end.
end.

Para comprobarlo pon un dialog dentro del procedimiento y verás si se ejecuta.
Aquí he supuesto que la cabecera de la función coincide con esta:

Código Delphi [-]
proc: procedure();stdcall;
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita