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 @ 2013-11-25 09:46  阿窟窿  阅读(230)  评论(0)    收藏  举报