当前位置:早雪网网络学院编程文档其他语言 → VC++ 操作 ini 文件

VC++ 操作 ini 文件

减小字体 增大字体 作者:未知  来源:supcode.com收集整理  发布时间:2005-7-1 14:59:33
nSize;
}

UINT CIniFile::GetMaxSize_All_SectionNames()
{
 return  nMaxSize_All_SectionNames;
}

UINT CIniFile::GetMaxSize_A_Section()
{
 return nMaxSize_A_Section;
}

DWORD CIniFile::IniFile_GetKeyNames(CString strSectionName, CStringArray &strArray)
{

 char *sz = new char[nMaxSize_A_Section];
 DWORD dw =  IniFile_GetSection(strSectionName,sz,nMaxSize_A_Section);

 char * index = sz;

 CString strName,strValue;
 int     nPosition = -1;

 while (index && (index < sz + dw))
 {
  CString str(index);

  if (str.GetLength() < 1)
  {
   delete []sz;
   return dw;
  }
  
  if ((nPosition = str.Find(_T('='))) == -1)
  {
   IniFile_DeleteString(strSectionName,str);
//   continue;
  }
  else
  {
   strName = str.Left(nPosition);
  }

  strArray.Add(strName);

  index = index + str.GetLength() + 1;
 }

 delete []sz;
 return dw;
}

CString CIniFile::GetClassVersion()
{
 return L"1.0.0.1";
}

上一页  [1] [2] [3] 


Tags:VC,++,操作,ini,文件
[数据载入中...] [返回上一页] [打 印]