用CFile类读取文件怎么返回的是一串乱码?请指点!(在线等待)
char sRead[2];
CFile mFile(_T("d:\dbstr.asp"),CFile::modeRead);
if(mFile.GetLength()<2)
{
Rst->vt = VT_BSTR;
Rst->bstrVal = _bstr_t("3");//"数据库文件不存在"
}else{
mFile.Read(sRead,2);
Rst->vt = VT_BSTR;
Rst->bstrVal = _bstr_t(CString(sRead));
}
mFile.Close();