I need a way to read all sections/keys of ini file in a StringBuilder variable:
[DllImport("kernel32.dll")]
private static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
...
private List<string> GetKeys(string iniFile, string category)
{
StringBuilder returnString = new StringBuilder(255);
GetPrivateProfileString(category, null, null, returnString, 32768, iniFile);
...
}
In returnString is only the first key value! How it is possible to get all at once and write it to the StringBuilder and to List?
Thank you for your help!
greets leon22