jlm
asked on
Help!!! Multi-Platform DLL Integration with Delphi
I work in a multi-platform development environment and NEED to be able to share functionality between:
Delphi 2.0/3.0
Clarion 2.0
Visual Basic 4.0/5.0
Visual FoxPro 5.0
Our development team has experts in each of these platforms. We want to be able to share particular functions developed in one platform with the ALL ot the other platforms. Through the use of DLLs, we want to be able call a function, pass it parameters, have it act upon the parameters, and return a result, and potentially modify the input parameters.
This process sounds VERY simple in theory (every development platform's manuals make it sound soooo easy), but, in fact, we have had "limited successes".
I know that everyone has their "Favorite" platform, but has anyone successfully demonstrated that what I describe is possible.
ANY SAMPLE CODE/DLLS THAT DEMONSTRATES ANY OF THE ABOVE PLATFORMS WORKING TOGETHER WOULD GREATLY BE APPRECIATED. Please include any instructions and specifics, such as compiler directive, additional support DLLS, yadayadaya...
I don't mean to be blunt, BUT!!! If you have not actually been successful with what I have described above, please don't speculate.
Delphi 2.0/3.0
Clarion 2.0
Visual Basic 4.0/5.0
Visual FoxPro 5.0
Our development team has experts in each of these platforms. We want to be able to share particular functions developed in one platform with the ALL ot the other platforms. Through the use of DLLs, we want to be able call a function, pass it parameters, have it act upon the parameters, and return a result, and potentially modify the input parameters.
This process sounds VERY simple in theory (every development platform's manuals make it sound soooo easy), but, in fact, we have had "limited successes".
I know that everyone has their "Favorite" platform, but has anyone successfully demonstrated that what I describe is possible.
ANY SAMPLE CODE/DLLS THAT DEMONSTRATES ANY OF THE ABOVE PLATFORMS WORKING TOGETHER WOULD GREATLY BE APPRECIATED. Please include any instructions and specifics, such as compiler directive, additional support DLLS, yadayadaya...
I don't mean to be blunt, BUT!!! If you have not actually been successful with what I have described above, please don't speculate.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for grading me. You might also want to keep in mind that there is a WM_CopyData windows message designed for inter-platform messages. It automatically adjusts the handles and buff addresses to be correct across platforms.
Cheers,
Ian C.
Cheers,
Ian C.
uses
Forms,
classes,
dialogs,
windows,
registry,
sysutils,
uSplash in 'uSplash.pas' {frmSplash},
uRegister in 'uRegister.pas' {frmRegister},
uEnterpas in 'uEnterpas.pas' {frmRegEnter};
{$R *.RES}
var
frmSplash : TfrmSplash;
frmRegister : TfrmRegister;
procedure ShowSplashScreen; stdcall; export;
begin
frmSplash := TfrmSplash.Create(Applicat
frmSplash.Show;
end;
procedure FreeSplashScreen; stdcall; export;
begin
frmSplash.Free;
end;
procedure SplashSetAction(szAction : pchar); stdcall; export;
begin
frmSplash.pnlAction.Captio
end;
function DisplayRegistration: integer; stdcall; export;
begin
frmRegister := TfrmRegister.Create(Applic
result := frmRegister.ShowModal;
frmRegister.Free;
end;
exports
ShowSplashScreen,
FreeSplashScreen,
DisplayRegistration,
SplashSetAction;
begin
// hide the froms created in the DLL from the Task Bar
IsLibrary := True;
Application.CreateHandle;
ShowWindow(Application.Han
Application.ShowMainForm := FALSE;
end.VB Code - Module to define the DLL callsDeclare Sub ShowSplashScreen Lib "kdExt.dll" ()
Declare Sub SplashSetAction Lib "kdExt.dll" (ByVal action As String)
Declare Sub FreeSplashScreen Lib "kdExt.dll" ()
VB Code Calling the DLL Private Sub Command1_Click()
ShowSplashScreen
SplashSetAction ("Loading")
End Sub
Private Sub Command2_Click()
FreeSplashScreen
End Sub
Andy