WriteProfileString and GetProfileString 
Author Message
 WriteProfileString and GetProfileString

Hi,

   I am looking at the functions
WriteProfileString(LPTSTR lpAppName, LPTSTR  lpKeyName, LPTSTR lpString)
and
GetProfileString(LPTSTR lpAppName, LPTSTR  lpKeyName, LPTSTR lpDefault,
LPTSTR lpReturnString, LPTSTR nSize)
I believe these functions are to read and write .ini file parameter but I
don't know where to specify my .ini file?
Note: For some reasons in my code I can not use CWinApp but I do get help
only for these functions in my code. I clicked on f1 for help. It gave me a
help for the member function of CWinApp which is not correct. If somebody
gives me an example that will be great.
Thanks
Trupti



Wed, 09 Jun 2004 00:45:48 GMT  
 WriteProfileString and GetProfileString

The API versions of these functions (and the
Read/WritePrivate derivatives) are not supported on CE and
the MFC CWinApp versions use a default registry key rather
than a .INI text file.  

.INI files have been deprecated since the 16-bit Windows
3.1 days in favor of the registry.  If you really want to
use .INI files (and I can't think of any reason why you
would...) it's a fairly trivial exercise to write the file
I/O and parsing code yourself.

HTH

/* Andrew */
Real Networks - Wireless Group
Software Engineer

Quote:
>-----Original Message-----
>Hi,

>   I am looking at the functions
>WriteProfileString(LPTSTR lpAppName, LPTSTR  lpKeyName,
LPTSTR lpString)
>and
>GetProfileString(LPTSTR lpAppName, LPTSTR  lpKeyName,
LPTSTR lpDefault,
>LPTSTR lpReturnString, LPTSTR nSize)
>I believe these functions are to read and write .ini file
parameter but I
>don't know where to specify my .ini file?
>Note: For some reasons in my code I can not use CWinApp
but I do get help
>only for these functions in my code. I clicked on f1 for
help. It gave me a
>help for the member function of CWinApp which is not

correct. If somebody

- Show quoted text -

Quote:
>gives me an example that will be great.
>Thanks
>Trupti

>.



Wed, 09 Jun 2004 05:44:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MFC WriteProfileString (...) trouble

2. Get/WriteProfileString and the Registry

3. WriteProfileString writing to file or registry

4. CWinApp::WriteProfileString() Problem

5. WriteProfileString failure, Why?

6. WriteProfileString problem

7. WriteProfileString fails on WinCE2.11

8. getprofilestring for Microsoft NT

9. GetProfileString won't work!

10. GetProfileString won't work!

11. getprofilestring() from win32 API can't read exceed 64k file size

12. GetProfileString - Problem

 

 
Powered by phpBB® Forum Software