GetPrivateProfileString

  • Thread starter Thread starter Susan Landgraf
  • Start date Start date
S

Susan Landgraf

Hi,

I using these API functions to write to an ini file, but
although I specify my own filename, it continues to write
to c:\windows\win.ini. Does anybody know why?

Thank you,
Susan
 
If the lpFileName parameter does not contain a full path and file name for
the file, WritePrivateProfileString searches the Windows directory for the
file. If the file does not exist, this function creates the file in the
Windows directory.

If lpFileName contains a full path and file name and the file does not
exist, WritePrivateProfileString creates the file. The specified directory
must already exist.

In GetPrivateProfileString if lpFileName does not contain a full path to the
file, the system searches for the file in the Windows directory. Maybe you
use the Win.ini file as a lpFileName parameter?

greetz
 
Back
Top