Bonjour a tous alors j'ai une petite enigme si quelqu'un pense connaitre la raison d'un plantage miraculeux... alors pour faire simple je transforme un tableau de BYTE en CString avec la fonction suivante :
void MDBConvert_OTC(const BYTE *chaine, int longueur, CString &rep,CString &reponse)
{
_TCHAR Tmp;
for (int k=0;k<longueur;k=k+2)
{
Tmp = chaine[k] + ((chaine[k+1])<<8);
reponse += Tmp + " "; <= la ca marche
rep += Tmp; <= la ca plante
}
}
sur la 2e affectation j'ai une erreur d'assertion dans une MFC :
void PASCAL CString::Release(CStringData* pData)
{
if (pData != _afxDataNil)
{
ASSERT(pData->nRefs != 0); <= la ca plante
if (InterlockedDecrement(&pData->nRefs) <= 0)
FreeData(pData);
}
}