调试时,程序不进入被调用的函数
void run(){
CStdioFile readFile;
CString URL = "";
try
{
readFile.Open("H:\\Url.txt",
CFile::modeRead |
CFile::typeText);
}
catch (CFileException *m_pException)
{
m_pException->Delete();
exit(1);
}
while(readFile.ReadString(URL) != NULL)
{
GetSourceHtml(URL);
}
}
BOOL GetSourceHtml(CString theUrl)
{
CInternetSession session;
CInternetFile* file = NULL;
try
{
// 试着连接到指定URL
file = (CInternetFile*) session.OpenURL(theUrl);
}
catch (CInternetException* m_pException)
{
file = NULL;
m_pException->Delete();
return FALSE;
}
CStdioFile dataStore;
CStdioFile dataStore2;
return TRUE;
}
我调试时发现,程序执行到 GetSourceHtml(URL); 时,不能跳转到GetSourceHtml里,会继续执行while循环,但我把GetSourceHtml函数清空,只留return句,则可以执行,请问为什么?