I have an big MDI application developed with Delphi 5, and I need to add more new features, and new forms are in DLL with Delphi XE.
I have a very good example by Raymond Alexander, which works great on Delphi 5, but in trying to follow his example in my project, the DLL with Delphi XE not working properly, and gives me an error on the part of when I pass as a parameter the object "APPLICATION" and the DLL is not correctly received.
function Modulo_PPtos_Configuracion(No_Orden : Integer; PathDB : WideString ; PathDBConfig : WideString ; App : TApplication; Scr : TScreen) : Integer ; StdCall;
begin
if not Assigned(DmDatos) then
Abrir_BasesDeDatos(No_Orden, PathDB, PathDBConfig);
if not (assigned(frm_Configuracion)) then
begin
{$IFDEF MDI}
**Application := App;
SHOWMESSAGE(APPlication.MainForm.Name);
frm_Configuracion := Tfrm_Configuracion.Create(Application.MainForm);**
{$ENDIF}
{$IFNDEF MDI}
frm_Configuracion := Tfrm_Configuracion.Create(nil);
{$ENDIF}
end;
As you will notice when doing a debug displays a message, and where it fails, because the original failed to debug the following line of code.
Please excuse my English.