MFC读写配置文件

DWORD WINAPI GetPrivateProfileString(
  __in          LPCTSTR lpAppName,
  __in          LPCTSTR lpKeyName,
  __in          LPCTSTR lpDefault,
  __out         LPTSTR lpReturnedString,
  __in          DWORD nSize,
  __in          LPCTSTR lpFileName
);
DWORD WINAPI GetPrivateProfileSection(
  __in          LPCTSTR lpAppName,
  __out         LPTSTR lpReturnedString,
  __in          DWORD nSize,
  __in          LPCTSTR lpFileName
);

如果文件不存在,会新建文件
BOOL WINAPI WritePrivateProfileString(
  __in          LPCTSTR lpAppName,
  __in          LPCTSTR lpKeyName,
  __in          LPCTSTR lpString,
  __in          LPCTSTR lpFileName
);
BOOL WINAPI WritePrivateProfileSection(
  __in          LPCTSTR lpAppName,
  __in          LPCTSTR lpString,
  __in          LPCTSTR lpFileName
);


 

posted on 2010-05-21 16:24  lbsx  阅读(900)  评论(0)    收藏  举报