读取文件

来源:互联网 发布:搜客云优化骗局 编辑:程序博客网 时间:2024/06/17 05:07
      DWORD  FileAttributeValue = ::GetFileAttributes(_T("Flash Disk//SetNetworkType.txt")); 
  if(FileAttributeValue != 0xFFFFFFFF)// 如果文件存在
  {
  char sRead[16];
  CFile mFile(_T("Flash Disk//SetNetworkType.txt"),CFile::modeRead);
  if(mFile!=NULL)
  {
  mFile.Read(sRead,16);

  mFile.Close();

                        }

          }

0 0