Programming - cpueblo.com

InI 생성 & 읽기


글쓴이 : 유광희 날짜 : 2002-05-13 (월) 16:49 조회 : 7078
GetPrivateProfileString
WritePrivateProfileString

------Read-------
GetPrivateProfileString("CONFIG_INIT_DATA", "GAME_CPID&GAMEID", "", Buffer, 256 , FileName);
	GameConf.cpid = atoi(strtok(Buffer, ",\\n"));
	GameConf.gameid = atoi(strtok(NULL, ",\\n"));


------Write---------
sprintf(Buffer, "%d,%d", GameConf.width, GameConf.height);
WritePrivateProfileString("CONFIG_INIT_DATA", "GAME_WIDTH&HEIGHT", Buffer, FileName);