Este procedinmiento te registra Midas.dll para que no te de ese error.
Código:
procedure TFRMain.RegisterAxLib;
type
TRegProc = function : HResult; stdcall;
TRegAction = (raReg, raUnreg);
const
ProcName: array[TRegAction] of PChar = (
'DllRegisterServer', 'DllUnregisterServer');
Var
RegAction: TRegAction;
LibHandle: THandle;
FileName: String;
RegProc: TRegProc;
begin
FileName:='Ojo, Escribe la ruta\Midas.dll'; // Normalmente c:\windows\system32\Midas.dll
RegAction:=raReg;
LibHandle := LoadLibrary(PChar(FileName));
if LibHandle = 0 then raise Exception.CreateFmt('Error', [FileName]);
try
@RegProc := GetProcAddress(LibHandle, ProcName[RegAction]);
if @RegProc = Nil then
raise Exception.CreateFmt('Error', [ProcName[RegAction],
FileName]);
if RegProc <> 0 then
raise Exception.CreateFmt('Error', [ProcName[RegAction], FileName]);
finally
FreeLibrary(LibHandle);
end;
end;