How to use API function write configuration file.
For example, I want to control the application state value written to the configuration file, next time you start to reading the configuration file when,please helping me,thanks in advance.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Prabhu RajaRank #861 · 2.6K reputationPosted Sep 16, 2011, 8:50 PM EDT
Try this. Click Here
--------------------------------------------------
If this post helps you, then mark as "Correct Answer"
Thank You
Ken HRank #2,315 · 610 reputationPosted Sep 17, 2011, 4:53 AM EDT
I want used Application Programming Interface method write configuration file.
such as:
[DllImport("kernel32")]
public static extern long WritePrivateProfileString(string section, string key, string val, string filePath);//how to write
public static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);//how to reading
thanks.