Here is a small example on how to use GetPrivateProfileString and GetPrivateProfileInt.

Test.c
Code:
#include <acknex.h>
#include <windows.h>

STRING* path_to_ini = "#256";
char result_chr[32];

int version_;

void main()
{
	STRING* temp_str = "#32";
	
	version_ = 0;
	
	str_cpy(path_to_ini,work_dir);
	str_cat(path_to_ini,"\\test.ini");
	
	GetPrivateProfileString("header","game_name","can't read string",result_chr,32,_chr(path_to_ini));
	version_ = GetPrivateProfileInt("header","game_version",0,_chr(path_to_ini));
	
	str_cpy(temp_str,result_chr);
	str_cat(temp_str," v");
	str_cat(temp_str,str_for_num(NULL,version_));
	
	video_window(NULL,NULL,48,temp_str);
}


and

test.ini
Code:
[header]
game_name=Test
game_version=1


And here is the MSDN reference of these functions:
GetPrivateProfileString
GetPrivateProfileInt

I hope this help you


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com