Bonjour,
je suis en train de coder une DLL en c++ qui sera appelé par un L4G (gupta centura). La méthode qui cause problème doit remplir un tableau de string passé par reference.
Léger rappel : centura appel la méthode en c++ depuis la DLL, c++ rempli le tableau passé par référence et centura récupère les valeurs.
- Le cas qui plante
Voici la déclaration dans centura
Et voila l'implémentation en c++Function: CreateMsgDe
Description:
Export Ordinal: 0
Returns
Parameters
String: LPSTR
String: LPSTR
String: LPSTR
String: LPSTR
String: LPSTR
Number: INT
Number: INT
String: LPSTR
String: HARRAY
Et bien sur ca plante royalement quand j'execute (*test_c)[0] = "tmp";void CreateMsgDe(LPSTR subj, LPSTR body, LPSTR email, LPSTR Cc, LPSTR filePath, int Importance, int Envoi, LPSTR De, LPSTR * test_c[])
{
(*test_c)[0] = "tmp";
...
}
Si vous pouvez m'aider ca s'errais sympa, car je tourne en rond depuis un bon moment.
- Au fait j'ai aucun problème si je passe qu'un String et non un tableau de string. Je faisait comme ca :
Voici la déclaration dans centura
Et voila l'implémentation en c++Function: CreateMsgDe
Description:
Export Ordinal: 0
Returns
Parameters
String: LPSTR
String: LPSTR
String: LPSTR
String: LPSTR
String: LPSTR
Number: INT
Number: INT
String: LPSTR
String: LPSTR
D'avance merci.void CreateMsgDe(LPSTR subj, LPSTR body, LPSTR email, LPSTR Cc, LPSTR filePath, int Importance, int Envoi, LPSTR De, LPSTR * test_c)
{
*test_c = "tmp";
...
}
Partager