类型:转载 责任编辑:asp 日期:2007/03/01
我在dll中编写了个函数,内容如下
bool _stdcall loadfile(file* fp)
{
cstdiofile file(fp);
cstring str;
file.readstring(str);\\调试运行到这句访问出错,把这句去掉正常运行
return true;
}
主程序中调用loadfile:
cstdiofile file;
cfileexception fe;
if( file.open(lpszpathname,\\文件路径和文件名
cfile::moderead,
&fe) ) {
loadfile(file.m_pstream);
}
各位看看,为什么,别告诉我换参数,还有函数定义没问题的
推荐阅读
跟踪看看是什么错误先吧!!!
还有就是你的dll是win32 dll呢还是mfc dll呢???