Bonjour,

J'aimerai concat�ner deux chaines LPTSTR, en cherchant j'ai trouv� "lstrcat" :

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. 
);
Mais dans mon code :

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);
- "final" contient "null", ce qui montre que lstrcat a �chou�, mais pourquoi ?!
- "tmp1" n'a pas chang�, malgr� la doc :
__inout LPTSTR lpString1 Pointer to a null-terminated string. The buffer must be large enough to contain both strings
Merci pour votre aide.