1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35:
| DLL_Handle := LoadLibrary('DLL'); if handle = 0 then begin MessageDlg('DLL konnte nicht geladen werden.', mtError, [mbOK], 0); exit; end; try @StarteDLL := GetProcAddress(DLL_Handle, 'StarteDLL'); if @StarteDLL = nil then begin MessageDlg('Startfunktion konnte in DLL nicht gefunden werden.', mtError, [mbOK], 0); exit; end;
if StarteDLL( Application.Handle, PChar(Var1), PChar(Var2), PChar(Var3), Var4, Var5, PAnsiChar(Var6), Var7) then begin end else begin MessageDlg('DLL wurde nicht erfolgreich beendet.', mtInformation, [mbOK], 0); end; finally @StarteDLL := nil; FreeLibrary(DLL_Handle); DLL_Handle := 0; end; |