首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

关于Unhandled exception in MFC Test to Dll.exe(MBTDLL): 0xC0000005: Access Violati

2013-10-19 
关于Unhandled exception in MFC Test to Dll.exe(MBTDLL): 0xC0000005: Access Violati我写了一个dll,并

关于Unhandled exception in MFC Test to Dll.exe(MBTDLL): 0xC0000005: Access Violati
我写了一个dll,并用一个MFC来测试它。
当我修改了dll中的char pathfile[254]为[60]就报错指示:       _mlock(_HEAP_LOCK);         /* block other threads */这一行出现错误。这是vc6.0自带的DBGHEAP.h中的语句。
我的部分源码:

bool ClientDll::ProcessTIP(TIP_HEAD* tip)
{
if (NULL == tip)
{
return false;
}

char pathfile[254];//我把这个文件路径字符修改为char pathfile[60]的时候就报错:
  //Unhandled exception in MFC Test to Dll.exe(MBTDLL): 
  //0xC0000005: Access Violati
TIP_HEAD* ntip = NULL;
bool res = false;
bool exitflag = true;

switch(tip->code)
{
case TIP_CODE_HB://前台传过来的心跳请求
printf("我收到了前台心跳请求!\r\n")......;
动态链接库 Unhandled
[解决办法]
越界了?
打印出向pathfile拷贝内容时的字符串长度

热点排行