<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>5 Apr 2019 06:34:43 Z</lastBuildDate><pubDate>30 Oct 2018 11:47:03 Z</pubDate><description>Bonjour, &#13;
&#13;
N'arrivant pas à faire fonctionner une dll c++ qui prend un paramètre un tableau, j'ai voulu faire des tests pour savoir pourquoi ça ne marche pas.&#13;
&#13;
J'ai donc écrit cette fonction c++ très simple :&#13;
&#13;
extern "C" __declspec(dllexport) double val1(double * tab) {&#13;
&#13;
	return tab[1]; &#13;
}&#13;
&#13;
&#13;
puis avec WinDev je fais [code:wl]&#13;
&#13;
n est un entier système&#13;
n=ChargeDLL("tabtest.dll")&#13;
&#13;
rVal1 est un réel sur 8 octets&#13;
&#13;
ptab1 est un tableau de 3 réels&#13;
ptab1=[1,2,3]&#13;
&#13;
SI n=0 ALORS&#13;
	Info(ErreurInfo(errMessage))&#13;
SINON&#13;
	rVal1=AppelDLL32("tabtest.dll","val1",&amp;ptab1)&#13;
FIN&#13;
&#13;
Info(rVal1)&#13;
[/code]&#13;
&#13;
Cela m'affiche 0 pour tab[0], 8 pour tab[1] et 16 pour tab[2]. Avez-vous une idée pourquoi et comment passer en paramètres un tableau et ses valeur ? &#13;
&#13;
Merci pour votre aide.</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221551-tableau-dll/read.awp</link><title>Tableau dll c++</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
