ada_azoul
Messages postés22Date d'inscriptionsamedi 31 juillet 2004StatutMembreDernière intervention 8 juin 2005
-
26 avril 2005 à 08:55
ada_azoul
Messages postés22Date d'inscriptionsamedi 31 juillet 2004StatutMembreDernière intervention 8 juin 2005
-
2 mai 2005 à 09:34
bonjour a tous
Jai besoin de mettre un chemin variant dans l'appelle de ma DLL
exple :
procedure DINDONC; external 'MADLL.DLL' index 1;
ce que je veux c'est a peux près ça, je ne cherche pas autre chose !
procedure DINDONC; external 'c:\monrepertoire\MADLL.DLL' index 1;
ou exactement ça
procedure DINDONC; external mon_adr+'\MADLL.DLL' index
ada_azoul
Messages postés22Date d'inscriptionsamedi 31 juillet 2004StatutMembreDernière intervention 8 juin 2005 2 mai 2005 à 09:34
==================Réponse
ç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;