Hi
I searched the internet to find out how to use WritePrivateProfileStringW as I wanted to write data to a unicode INI file just like I do in Visual C++.
This is the code:
[DllImport("KERNEL32.DLL", EntryPoint = "WritePrivateProfileStringW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] private static extern int WritePrivateProfileStringW( string lpAppName, string lpKeyName, string lpString, string lpFilename);
But when I open the INi file in NotePad and go to save it I find it is in ANSI format.
If I empty the file contents and save as UNICODE and run my routine again the fiel remains unicode. So how do I start off automatically with a unicode file?
Andrew