COleException *pe;
pe->m_sc打印这个状态码看是什么,再判断是何种原因导致出错的。
pe->m_sc打印这个状态码看是什么,再判断是何种原因导致出错的。
解决方案 »
- 求vc++6.0前辈指点
- CDockablePane加上CRichEditCtrl没有滚动条
- 用visual studio 2010编译的程序在xp系统运行正常,但在2000系统上报不是合法的win32应用程序
- 我建一个try工程,CtryDoc类里用不了sendmessage和messagebox,它说不接受三个参数,为什么,要怎么才行,它要的句柄在哪里,怎么得到?
- 请大家帮忙修改:多线程CFile操作,从网上下载文件
- 到底有多少人用ace哦.我发现huihoo的论坛也没啥人了.
- 怎样做像资源管理器那样的窗口
- VC的高手请进来!!!
- 统计:有多少在成都的兄弟姐妹?
- 怎样能找到windows系统附件中写字板(wordpad.exe)的路径,注册表中的路径好像不能直接用呀
- sql数据导入到execl中
- ActiveX控件(microsoft office Spreadsheet11)导出execel报错
void Display_Save_AP_INFO(CListBox *pAP_List,CEdit *pAP_Info,CCheckComboBox *m_checkcombo,int ap_num,int save_flag,FILE *file_orange,FILE *file_apple,FILE *file_coco,FILE *file_pear,FILE *file_banana,PWLAN_AVAILABLE_NETWORK_LIST pVList)
{
UCHAR ucssid[32] = {0};
int i = 0;
CString str;
int m = 0;
pAP_List->ResetContent(); //复位列表框中的数据
pAP_Info->SetWindowText(""); //复位编辑框中的数据 CString temp_str;
CString strength_str;
char temp_string[50] = {0}; for(i = 0; i < ap_num; i++)//在编辑框中分行显示并且分行保存
{ int RSSI_strength = (int)(-100 + pVList->Network[i].wlanSignalQuality * 0.5);
strength_str.Format("%d",RSSI_strength);
strcpy_s((char *)ucssid,32,(char *)pVList->Network[i].dot11Ssid.ucSSID);
temp_str = ucssid;
pAP_List->AddString(temp_str);
temp_str = temp_str + " " + strength_str;
str = str + "\r\n" + temp_str;
if(save_flag)
{
try
{
if(m_checkcombo ->GetItemData(i))
{
try
{
CString strItem;
m_checkcombo -> GetLBText(i,strItem);
if(strItem == "Orange")
{
strength_str += "\n";
//file_orange->WriteString((LPCTSTR)strength_str);
strcpy_s(temp_string,(LPCTSTR)strength_str);
fprintf(file_orange,"%s",temp_string);
fflush(file_orange);
}
else if(strItem == "Apple")
{
strength_str += "\n";
//file_apple->WriteString((LPCTSTR)strength_str);
//file_apple->Flush();
strcpy_s(temp_string,(LPCTSTR)strength_str);
fprintf(file_apple,"%s",temp_string);
fflush(file_apple);
}
else if(strItem == "Pear")
{
strength_str += "\n";
//file_pear->WriteString((LPCTSTR)strength_str);
//file_pear->Flush();
strcpy_s(temp_string,(LPCTSTR)strength_str);
fprintf(file_pear,"%s",temp_string);
fflush(file_pear);
}
else if(strItem == "Banana")
{
strength_str += "\n";
//file_banana->WriteString((LPCTSTR)strength_str);
//file_banana->Flush();
strcpy_s(temp_string,(LPCTSTR)strength_str);
fprintf(file_banana,"%s",temp_string);
fflush(file_banana);
}
else if(strItem == "CoCo")
{
strength_str += "\n";
//file_coco->WriteString((LPCTSTR)strength_str);
//file_coco->Flush();
strcpy_s(temp_string,(LPCTSTR)strength_str);
fprintf(file_coco,"%s",temp_string);
fflush(file_coco);
}
}
catch(COleException *pe)
{
AfxMessageBox("enter COleException 2");
pe->ReportError();
pe->Delete();
}
}
}
catch(COleException *pe)
{
AfxMessageBox("enter COleException 1");
pe->ReportError();
pe->Delete();
}
}
}
pAP_Info->SetWindowText("SSID Strength" + str);
}
-2147024809