Article ID: 74608 - View products that this article applies to.
This article was previously published under Q74608
This article has been archived. It is offered "as is" and will no longer be updated.
3.00 3.10 WINDOWS kbprg
An application should use a private profile (INI) file to store initialization information where possible rather than the main INI file in Windows, WIN.INI. Profile files are not designed for use as a database or a mass-storage device.
Applications use the profile functions in the Windows application programming interface (API) to save and retrieve initialization settings. The following profile functions are used with WIN.INI:
Until Windows version 3.0, applications stored their initialization data in only one global place (WIN.INI). Windows version 3.0 added a complimentary set of functions to the Windows API to enable an application to store its initialization data in a private INI file. These functions are as follows:
GetProfileInt GetProfileString WriteProfileString
The following factors provided the motivation for the addition of private INI files:
GetPrivateProfileInt GetPrivateProfileString WritePrivateProfileString
Do not use the private profile functions with the WIN.INI file. Windows caches a copy of WIN.INI and one private INI file. This caching scheme may be confused if WIN.INI is altered using the private profile functions.
Applications should use INI files conservatively. Use as few sections and as few lines as possible. For example, do not save the coordinates of a window individually, as follows:
Instead, use one line, as follows:
This is a more efficient use of space and is much faster.