From: Mihai N. on

> std::vector< TCHAR > szBuf( 64*1024 );
> TCHAR * pszBuf = &szBuf[0];

Or:
CString str;
TCHAR * pszBuf = str.GetBuffer( 64*1024 );
...
// store stuff in pszBuf
...
str.ReleaseBuffer();

And you end up with a nice CString ready to use.



--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
From: Tom Serface on
I beginning to agree with you... :o)

Tom

"Mihai N." <nmihai_year_2000(a)yahoo.com> wrote in message
news:Xns9B8DC72BD9F28MihaiN(a)207.46.248.16...
>
>> I think that Tom was mislead by this documentation (if I read 'cb'
>> prefix, I think of sizeof(), too, like Tom did; instead, if I read 'cch'
>> prefix, I think about _countof()).
>
> See, the safest way to not be mislead by the documentation is to not
> read it at all (like me :-)