Hi Uday,
First of all, as far as I'm aware there is no such function as
ReadPrivateProfileString. The function is
GetPrivateProfileString.
Secondly, both that function and
WritePrivateProfileString, as MSDN says, are "
provided only for compatibility with 16-bit Windows-based applications." I cannot believe you are developing for 16-bit, so you
should not be using these functions!
As MSDN says, "
Applications should store initialization information in the registry."
Read about
RegSetValueEx and
RegGetValue.
Alternatively, use an XML file like C# config files use (although, granted, that would be more work in C++).
Regards,
Ian.