Einzelnen Beitrag anzeigen

xSkaschY

Registriert seit: 19. Jun 2006
Ort: Bünde
95 Beiträge
 
Delphi 2007 Professional
 
#1

DLL und exception von der borlndmm.dll beim Programm beenden

  Alt 1. Jul 2006, 14:53
Hallo,

habe nun mal ein wenig mit dem DLL programmieren begonnen.

Das Tool funktioniert auch tadellos, jedoch beim schliessen des Programms bekomme ich eine exception reingewürgt.

Der Titel der Errormsg wird belohnend mit "Application Error" rausgeworfen und der Inhalt beläuft sich auf:

Exception EAccessViolation in module borlndmm.dll at 00003D76.
Access violation at adress 21663D76 in module 'borlndmm.dll'. Write of adress 212019A0.

Nur leider kann ich mit diesen Zahlen nichts Anfangen.

Der Sourcecode, wo die DLL's eingebunden werden sieht folgendermasen aus:

Delphi-Quellcode:
procedure TformMain.FormClose(Sender: TObject; var Action: TCloseAction);

begin

  try
  
    if assigned(imexCheckforUpdates) then try
      FreeLibrary(imexUpdate);
    except
      on E: Exception do begin
        MessageDlg('Fehler beim entladen der Dll imexUpdate.dll:'+#13+E.Message, mtError, [mbOk], 0);
        exit;
      end;
    end;

    if assigned(imexImportFile) then try
      FreeLibrary(imexImport);
    except
      on E: Exception do begin
        MessageDlg('Fehler beim entladen der Dll imexImport.dll:'+#13+E.Message, mtError, [mbOk], 0);
        exit;
      end;
    end;

  finally
    Application.Terminate;
  end;

end;
                 
procedure TformMain.FormCreate(Sender: TObject);

begin
  try
    if not assigned(imexUpdateSetHandle) then try
      imexUpdate := LoadLibrary('imexUpdate.dll');
    except
      on E: Exception do begin
        MessageDlg('Fehler beim Laden der Dll imexUpdate.dll:'+#13+E.Message, mtError, [mbOk], 0);
        exit;
      end;
    end;


    if not assigned(imexImportFile) then try
      imexImport := LoadLibrary('imexImport.dll');
    except
      on E: Exception do begin
        MessageDlg('Fehler beim Laden der Dll imexImport.dll:'+#13+E.Message, mtError, [mbOk], 0);
        exit;
      end;
    end;

  finally
    @imexImportFile := GetProcAddress( imexImport, 'imexImportFile');
    @imexImportSetHandle := GetProcAddress( imexImport, 'imexImportSetHandle');
    @imexCheckforUpdates := GetProcAddress( imexUpdate, 'imexCheckforUpdates');
    @imexUpdateSetHandle := GetProcAddress( imexUpdate, 'imexUpdateSetHandle');
  end;
end;
Wird daraus jemand schlau?


EDIT

Die .exe wird trotz beendigung weiter im Prozessmanager angezeigt!
  Mit Zitat antworten Zitat