M
Mosfet
Hi,
I would like to retrieve a stream containing a unicode string, so I
would like to know what is the best methode to retrieve this stream.
Here is what is currently done :
do
{
pStream->Read(szBuf, 255, &ulNumChars);
if (ulNumChars >0)
{
static CString strBodyPart;
memmove(strBodyPart.GetBuffer(ulNumChars), szBuf, ulNumChars);
strBody += strBodyPart;
strBodyPart.ReleaseBuffer(ulNumChars);
}
} while (ulNumChars >= 255);
I would like to replace this code by something portable and I don't know
if I should use a vector<BYTE> or a std::string.
How would you do it in a efficient maner ?
I would like to retrieve a stream containing a unicode string, so I
would like to know what is the best methode to retrieve this stream.
Here is what is currently done :
do
{
pStream->Read(szBuf, 255, &ulNumChars);
if (ulNumChars >0)
{
static CString strBodyPart;
memmove(strBodyPart.GetBuffer(ulNumChars), szBuf, ulNumChars);
strBody += strBodyPart;
strBodyPart.ReleaseBuffer(ulNumChars);
}
} while (ulNumChars >= 255);
I would like to replace this code by something portable and I don't know
if I should use a vector<BYTE> or a std::string.
How would you do it in a efficient maner ?