1.文件名:
Server.ini
2.文件内容
[RoomSet]
//游戏人数设置
PlayerCount=2
//客户端底分显示
ShowBaseScore=0
3.读取配置文件信息
TCHAR szPath[MAX_PATH] = TEXT("");
GetCurrentDirectory(sizeof(szPath), szPath);
TCHAR szFileName[MAX_PATH] = {0};
_sntprintf(szFileName, sizeof(szFileName), TEXT("%s\\Server.ini"), szPath);
int playCount = (WORD)GetPrivateProfileInt(_T("RoomSet"), _T("PlayerCount"), GAME_PLAYER, szFileName);