Hi!
So, habe das in der
DPR wie folgt gemacht :
Delphi-Quellcode:
program sampleprg;
uses
Windows, Controls, Dialogs,
Forms,
MainUnit
in '
MainUnit.pas'
{Mainform};
const
dllname = '
SetupDlg.dll';
URL ='
http://beispiel.url/test.php';
// --- für DLL ---
type
TFNSetupDlgShowModal =
function(parent: Pointer; getURL: PChar): Integer;
stdcall;
var
setupsuccess: integer;
lib: HMODULE;
SetupDlgShowModal: TFNSetupDlgShowModal =
nil;
// ---------------
{$R *.res}
begin
Application.Initialize;
Application.Title := '
Beispiel DLL Prog';
// --- DLL laden & ausführen ---
lib := LoadLibrary(@dllname[1]);
if lib <> 0
then @SetupDlgShowModal := GetProcAddress(lib, '
SetupDlgShowModal');
if Assigned(SetupDlgShowModal)
then setupsuccess:=SetupDlgShowModal(
nil, PChar(
URL))
else begin
MessageDlg('
DLL "SetupDlg.dll" konnte nicht geladen werden !',mtError,[mbOk],0);
setupsuccess:=mrCancel;
end;
if setupsuccess=mrOK
then begin
// -----------------
Application.CreateForm(TMainform, Mainform);
Application.Run;
// --- DLL entladen ---
end;
if lib <> 0
then FreeLibrary(lib);
// --------------------
end.
Kann man das so machen ?????
Funktionieren tut es, aber das heisst ja nix
lg