i want to use ini file in my program using windows CE device. and i got the exception "cannot find pinvoke dll 'kernel32'" what should I do to solve this? please help me!
string Path = "c:\\Settings.ini";
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section,
string key, string val, string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
public string Read(string Section,string Key,string Value)
{
StringBuilder sb = new StringBuilder();
GetPrivateProfileString(Section, Key, Value, sb, 32, Path).ToString(); // Error occured!!
return sb.ToString();
}
it works at vs2017 but not vs2008. please. give me your answer!