DLL Delphi OutPut ShortString in C++
Bonjour a tous,
j'ai une DLL créer en Delphi qui me renvoi un ShortString. Exemple en c++
Code:
1 2
| ShortString MaVariableShortString;
MaFonction(MaVariableShortString); |
il devrait me renvoyer une chaine de caractere dans MaVariableShortString mais il me fai une violation d'accès. Alors j'ai mit
Code:
1 2 3
| PChar MaVariablePChar;
MaVariablePChar = StrAlloc(255);
MaFonction(MaVariablePChar); |
cela fonctionne mais il me renvoie une partie de ce qu'il devrait m'envoyer et entourés de caractères inconnus.... Quelqu'un voit l'erreur? Quelqu'un connait un autre équivalent a ShortString sous C++?? Merci d'avance