这段代码为什么会报错啊?

lengx7 lengx7 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
	char MYEXEPathA[255];
CString MYEXEPath ;
CString MYINIPathFile;

::GetCurrentDirectory(255,MYEXEPathA);
MYEXEPath=MYEXEPathA;
MYINIPathFile=MYEXEPath+"\\test.ini";

void GetIniTest(CString& str,DWORD i=1)
{
LPSTR tastr;
CString testr;
testr.Format("ABC%d",i);
::GetPrivateProfileString("ListUser",testr,"",tastr,20,MYINIPathFile);
str.Format("%s",tastr);
}

CString showstr;
GetIniTest(showstr);


以上代码,在GetIniTest执行完毕的时候会跳到free.c文件中,这是为什么啊?
#ifdef CRTDLL
else if ( __active_heap == __V5_HEAP )
{
__old_sbh_region_t *preg;
__old_sbh_page_t * ppage;
__old_page_map_t * pmap;
_mlock(_HEAP_LOCK );
__try {

if ( (pmap = __old_sbh_find_block(pBlock, &preg, &ppage)) != NULL )
__old_sbh_free_block(preg, ppage, pmap);

}
__finally {
_munlock(_HEAP_LOCK );
}

if (pmap == NULL)
{
retval = HeapFree(_crtheap, 0, pBlock);
if (retval == 0)
{
errno = _get_errno_from_oserr(GetLastError());
}

}
}
#endif /* CRTDLL */
else // __active_heap == __SYSTEM_HEAP
#endif /* _WIN64 */
{
retval = HeapFree(_crtheap, 0, pBlock);
if (retval == 0) //就中断在这里!
{
errno = _get_errno_from_oserr(GetLastError());
}
}
}


...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
lengx7
VC/MFC 16,550 成员 421,606 内容