ça Marche maintenant , excuse moi si j'ai porté qlq changement
Merci beaucoup pour votre aimable courtoisie
et ton précieux aide
voici ma DLL opérationnelle avec changment de chemin dynamique
et ceci grace à JMP77
que les personnes qui ont en besoin l'exploite au nom de JMP77
//=====================
procedure TForm1.dynamiq_DLL(ma_som : Currency; var retour_som : Currency);
type
TDincDonc = Procedure (ma_som : Currency; var retour_som : Currency);
var
DllInstance : THandle;
DincDonc : TDincDonc;
begin
{Ouverture de la dll}
DllInstance := LoadLibrary(PChar(MonAdr + '\MaDll.dll'));
Try
If DllInstance = 0 then ShowMessage('Impossible de charger la dll "MaDll.dll"') {Impossible de charger la dll}
else
begin
@DincDonc := GetProcAddress(DllInstance,'TDincDonc');
If not(@DincDonc = nil) then
begin
{Lancement de la procedure}
DincDonc(MaSom,RetourSom);
end
else ShowMessage('Impossible de trouver la procédure "DincDonc"'); {Impossible de trouver la procédure}
end;
Finally
FreeLibrary(DllInstance);
end;
end;