Thanks for the reply!
No, I am not deriving from CString , so I don't have any idea of PXSTR too..
Basically the actual code is the below.
CoverageType = ems[i]->coverageType;
I have a requirement where I have to get values from web service response. Now I want to take the response (ems[i]->coverageType) and assign it to a CString varibale and show in an application list box.
So when I run my application in release mode and try to debug, the application is unable to go furthur than this line
CoverageType = ems[i]->coverageType;
So I get an "unhandled exception" dialog error box and when I click on debug to see where the application is failing , it goes to" PXSTR pszBuffer = GetBuffer( nLength );" present in atlsimpstr.cpp (which is an mfc file)
Let me know if the description is clear.
Main Topics
Browse All Topics





by: itsmeandnobodyelsePosted on 2009-08-26 at 15:37:25ID: 25192973
The GetLength and GetBuffer functions look like CString::GetLength and CString::GetBuffer member functions.
Did you derive from CString? If so, what is PXSTR?
>>>> CoverageType is (CString) and ems[i]->coverageType is (char*)
What has CoverageType to do with the code posted?
>>>> PXSTR pszBuffer = GetBuffer( nLength );
That statement probably fails if nLength < 0 or nLength is a huge integer (greater than that the heap manager can provide as contiguous memory).