Re: CString help
- From: "jp2code" <poojo.com/mail>
- Date: Thu, 21 Jun 2007 14:57:05 -0500
Wow! Thanks gang! I had 27 occurrences of "GetBuffer(0)" in my code, and not
one call to ReleaseBuffer.
That's fixed now, though.
I have a little Borland background. There, I had to use AnsiString (like
std::string) and I accessed the data using AnsiString::c_str(). When I first
started using VC, GetBuffer looked like Msft's equivalent. Wrong! :)
"Ajay Kalra" wrote:
Why use GetBuffer here? You dont need it. Just pass the CString.
Operator LPCTSTR will take care of the rest.
Also, you must call ReleaseBuffer after calling GetBuffer:
http://msdn2.microsoft.com/en-us/library/ms928943.aspx
---
Ajay
.
- Follow-Ups:
- Re: CString help
- From: David Wilkinson
- Re: CString help
- From: Ajay Kalra
- Re: CString help
- References:
- CString help
- From: jp2code
- Re: CString help
- From: Ajay Kalra
- CString help
- Prev by Date: Re: HELP PLEASE!!!
- Next by Date: Re: HELP PLEASE!!!
- Previous by thread: Re: CString help
- Next by thread: Re: CString help
- Index(es):
Relevant Pages
|