Ver Mensaje Individual
  #1  
Antiguo 13-02-2016
Ramsay Ramsay is offline
Miembro
NULL
 
Registrado: ene 2016
Posts: 104
Reputación: 9
Ramsay Va por buen camino
Evitar errores en BlockInput

Hola ,estoy haciendo una funcion para bloquear el teclado , en algunos ejemplos se usa una funcion para verificar que blockinput existe en el user32.dll , queria saber si uso try y except puedo evitar que se muestren errores en caso de que la funcion no existe.

Código Delphi [-]
function BlockInput(fBlockInput: Boolean): DWORD; stdcall; external 'user32.DLL';

procedure TForm1.btnTestClick(Sender: TObject);
begin
try
  begin
    BlockInput(True);
  end
except
  begin
    //
  end;
end;

¿ Si esta funcion no existe mostraria un error de todas formas al sistema ?
Responder Con Cita