Code: Select all
if (!strlen(szArg4) && strlen(szArg3)) { //Deleting a key within a [section].
if (!WritePrivateProfileString(szArg2,szArg3,NULL,szArg1)) {
sprintf(szOutput,"IniOutput ERROR -- during WritePrivateProfileString: %s",szLine);
DebugSpew(szOutput);
} else {
sprintf(szOutput,"IniOutput Write Successful!");
DebugSpew("%s: %s",szOutput,szLine);
}
} else if (!strlen(szArg4) && !strlen(szArg3)) { //Deleting a [section] and all keys under it.
if (!WritePrivateProfileString(szArg2,NULL,NULL,szArg1)) {
sprintf(szOutput,"IniOutput ERROR -- during WritePrivateProfileString: %s",szLine);
DebugSpew(szOutput);
} else {
sprintf(szOutput,"IniOutput Write Successful!");
DebugSpew("%s: %s",szOutput,szLine);
}
} else {
if (!WritePrivateProfileString(szArg2,szArg3,szArg4,szArg1)) {
sprintf(szOutput,"IniOutput ERROR -- during WritePrivateProfileString: %s",szLine);
DebugSpew(szOutput);
} else {
sprintf(szOutput,"IniOutput Write Successful!");
DebugSpew("%s: %s",szOutput,szLine);
}
}

donations for this month's patches.