windows98下程序读取自身大小时为何会出错
windows98下程序读取自身大小是为何会出错,而在2000、XP下却可以正常读取,下面是代码,各位,帮帮忙,看看到底是什么问题?
CString strExePath;
char szPath[MAX_PATH] = "";
GetModuleFileName(NULL, szPath,MAX_PATH);
strExePath = CString(szPath);
CStdioFile file(strExePath,CFile::modeRead);
unsigned long a=file.GetLength();
file.Close();
CString str;
str.Format("%ld",a);
MessageBox(str);