Writing to a "ini" file is trivial - have a look ad the WriteProfileString() function in the manual.

You might like to elaborate on what you are trying to achieve, otherwise we will not be able to suggest a solution that best fits your requirements.