Hallo,
ich habe ein Problem mit dem (dyn.) Einlesen einer BPL Datei unter Delphi XE6.
Unter D2010 funktionierte es jahrelang problemlos, ich sehe aber nicht, was sich daran geändert haben könnte...
Hier der Source:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| AdressenpackageModule := LoadPackage(ExtractFilePath(Paramstr(0))+'Glorisframes.bpl'); if AdressenpackageModule <> 0 then begin AClass := GetClass('Tfrm_Adressen_Individual'); if AClass = nil then Begin ShowMessage('"Tfrm_Adressen_Individual" ist nicht in Glorisframes.bpl enthalten.'); End; end; |
Das "LoadPackage" gibt einen Wert <> 0 heraus, funktioniert also. Jedoch liefert das "GetClass" "NIL" zurück, obwohl in dem Package ein Frame dieses Namens existiert.
Hier der Source des Packages:
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:
| package Glorisframes; {$R *.res} {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION OFF} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES ON} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$DEFINE DEBUG} {$ENDIF IMPLICITBUILDING} {$RUNONLY} {$IMPLICITBUILD OFF} requires doa41dxe6, RaizeComponentsVcl; contains Adressenframe in 'Adressenframe.pas' ; end. |
Und hier die wesentlichen Teile des Frames:
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:
| unit Adressenframe; interface uses Windows, Messages, SysUtils, Classes, vcl.Forms, RzLabel, Oracle, Vcl.Controls, Vcl.StdCtrls; type Tfrm_Adressen_Individual = class(TFrame) Label1: TLabel; Label2: TLabel; Label3: TLabel; private Session : TOracleSession; Kundennummer : Integer; published Procedure Initialisieren (Kunde : Integer; mySession : TOracleSession); end; implementation {$R *.DFM}
procedure Tfrm_Adressen_Individual.Initialisieren(Kunde: Integer; mySession : TOracleSession); begin Kundennummer := Kunde; Session := mySession; Label2.Caption := 'Aktuelle Kundennummer : '+InttoStr(Kunde); end; Initialization RegisterClass(Tfrm_Adressen_Individual); Finalization UnRegisterClass(Tfrm_Adressen_Individual); end. |
Hat jemand vielleicht eine Idee, woran das jetzt unter XE6 scheitert, wo es doch "so schön" unter D2010 funktionierte ?
VIELEN DANK für Eure Hilfe !
TomR