1, you need to do some preliminary operation before the program starts, I have modified the Application (Controls. Pas), so the project cannot build with the VCL,
2, the newly built the BPL, contains some custom TNewFrame, inherited from TFrame, through similar to the following function to join the program interface
The function build (c: TWinControl) : TNewFrame;
//...
The begin
F:=TNewFrame. Create (c);
F.P arent:=c;//- & gt; This leads to the AV
Result:=f;
end;
Export build;
The question is: will shut down the AV, there are two approach tested not AV
1, the program before the closing f.P arent:=nil, not AV; So every custom components to the parent:=nil,
2, build with the VCL, AV, but this will not be able to modify the Application
Excuse me what method, can modify the Application, without the parent:=nil
PS: my Delphi VCL July only DCP, no DPK, unable to build,