Bonjour,
J'aimerai concaténer deux chaines LPTSTR, en cherchant j'ai trouvé "lstrcat" :
Mais dans mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 LPTSTR lstrcat( __inout LPTSTR lpString1, // Pointer to a null-terminated string. The buffer must be large enough to contain both strings. __in LPTSTR lpString2 // Pointer to the null-terminated string to be appended to the string specified in the lpString1 parameter. );
- "final" contient "null", ce qui montre que lstrcat a échoué, mais pourquoi ?!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 LPTSTR tmp1; LPTSTR tmp2; LPTSTR final; tmp1 = TEXT("test"); tmp2 = TEXT("test2"); final = lstrcat(tmp1, tmp2);
- "tmp1" n'a pas changé, malgré la doc :Merci pour votre aide.__inout LPTSTR lpString1 Pointer to a null-terminated string. The buffer must be large enough to contain both strings
Partager