请高手看看是什么原因造成的。错误现象为提示内存为0xfffffee1不能为read,但是用VC6.0的GO模式却能运行。
将这个函数用在VC 下 普通工程中却能正常运行。
主调函数:typedef std::queue<PTUNER_SETTING>  PARAQUEUE;
void CSerialDlg::OnDvbs() 
{
// TODO: Add your control notification handler code here
CString  str;
CString tempstr;
SetSystem(); str.Format("GetChosePara()->stest=%d",GetChosePara()->stest);
m_listinfo.InsertString(0,str);
//读取被测TUNER参数

if(ReadPara(myqueue))
{
int queuesize=myqueue->size()-1;
m_listinfo.InsertString(0,tempstr);
TUNER_SETTING *tempspara;
while(queuesize)
{
tempspara=myqueue->front();
tempstr.Format("frequence=%d",tempspara->tuner_s_para.frequence)
m_listinfo.InsertString(0,tempstr);
myqueue->pop();
queuesize--;
}
}
else
{
if(ReadPara(myqueue)==12)
{
m_listinfo.InsertString(0,"文件打开失败");
}
}
}
被调函数:int ReadPara(PARAQUEUE* inputpara )
{
FILE* parafile;
TUNER_SETTING* tempinputpara=(TUNER_SETTING*)malloc(sizeof(DVB_S_PARA));
if(GetChosePara()->stest)
{
if((parafile=fopen( "stest.txt","rb" )) != NULL)
{
while(!feof(parafile))
{
tempinputpara=(TUNER_SETTING*)malloc(sizeof(DVB_S_PARA));
fscanf(parafile,"%d,%d,%d,%d,%d",
 &(tempinputpara->tuner_s_para.frequence),
 &(tempinputpara->tuner_s_para.symbol_rate),
 &(tempinputpara->tuner_s_para.fec_inner),
 &(tempinputpara->tuner_s_para.power),
 &(tempinputpara->modulation_type));

if(tempinputpara->tuner_s_para.frequence>=950&&tempinputpara->tuner_s_para.frequence<=2150)
{
inputpara->push(tempinputpara);

}
else
{
return 12;
}

}

}


}
return 1;
}