Reading every key in a INI file
  1. #1

    Reading every key in a INI file

    I can use ReadPrivateProfileString just fine, but how can I get every key in a INI file? (I'm guessing you would use for each.)

    Edit: If it helps, I'm making a win32 console project.
    Last edited by Pseudo; 13th March 2008 at 03:33.

  2. #2
    watch at the ESP src ;)

  3. #3
    Quote Originally Posted by lolwurst View Post
    watch at the ESP src ;)
    The ESP source uses INI files?

  4. #4
    You can change the file extention inside settings.cpp

    Code:
    void cSettings::GetIniFile( HMODULE hModule )
    {
    	GetModuleFileName( hModule, szIniFile, sizeof( szIniFile ) );
    	for( int i = 0; i < ( int )strlen( szIniFile ); i++ )
    	{
    		if( szIniFile[ strlen( szIniFile ) - i ] == '\' )
    		{
    			szIniFile[ ( strlen( szIniFile ) -  i ) + 1 ] = '';
    			strcat( szIniFile,"cvar.ini");
    			return;
    		}
    	}
    }

  5. #5
    you bumped an old topic, and the original poster never said he was making a cheat, so what you posted is useless....thnx
    :p

  6. #6
    nice bumpage mr shot gun

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in