G
Guest
One of my applications is built with VC 6.0.
I planned to move the existing code to .NET. As the first step I just wanted
to build the existing code without any modifications (Unmanaged code) with VC
7.1 compiler.
We used Microsoft Studio .NET 2003 to do that.
Our application uses one of the third party library (Stingray). So we
rebuilt the Stingray
Studio 2004 too with .NET compiler.
Everything is fine as of now.
But the running instance is crashing at the following piece of code
What could be the problem?
void CUxx_MS_TreeCtrl:rawSubItem(LvPaintContext* pPC)
{
//fnTrc fn_name ( "CUxx_MS_TreeCtrl:rawSubItem", TRC_CYCTIME );
COLORREF txtColor = GetRGBColor(UXX_BLACK);
if (pPC->lvi.iSubItem == 0)
{
//Get our owner drawn data
CString strText;
int iImage;
CRect rectText;
CRect rcIndent;
BOOL bEditing = (pPC->lvi.iItem == m_nEditItem) && (pPC->iCol ==
m_nActiveColumn);
TvPaintContext* pTvPC = (TvPaintContext*)pPC;
BOOL bSelected = (pTvPC->tvi.state & TVIS_SELECTED) != 0;
iImage = bSelected ? pTvPC->tvi.iSelectedImage : pTvPC->tvi.iImage;
BOOL bHasImage = HasImage(&(pTvPC->tvi));
strText = pTvPC->tvi.pszText;
...
…
….
}
It says the pszText notified by the arrow as Bad pointer.
I planned to move the existing code to .NET. As the first step I just wanted
to build the existing code without any modifications (Unmanaged code) with VC
7.1 compiler.
We used Microsoft Studio .NET 2003 to do that.
Our application uses one of the third party library (Stingray). So we
rebuilt the Stingray
Studio 2004 too with .NET compiler.
Everything is fine as of now.
But the running instance is crashing at the following piece of code
What could be the problem?
void CUxx_MS_TreeCtrl:rawSubItem(LvPaintContext* pPC)
{
//fnTrc fn_name ( "CUxx_MS_TreeCtrl:rawSubItem", TRC_CYCTIME );
COLORREF txtColor = GetRGBColor(UXX_BLACK);
if (pPC->lvi.iSubItem == 0)
{
//Get our owner drawn data
CString strText;
int iImage;
CRect rectText;
CRect rcIndent;
BOOL bEditing = (pPC->lvi.iItem == m_nEditItem) && (pPC->iCol ==
m_nActiveColumn);
TvPaintContext* pTvPC = (TvPaintContext*)pPC;
BOOL bSelected = (pTvPC->tvi.state & TVIS_SELECTED) != 0;
iImage = bSelected ? pTvPC->tvi.iSelectedImage : pTvPC->tvi.iImage;
BOOL bHasImage = HasImage(&(pTvPC->tvi));
strText = pTvPC->tvi.pszText;
...
…
….
}
It says the pszText notified by the arrow as Bad pointer.