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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top