Private Profile (INI) Files Not Designed as Database

Last reviewed: July 22, 1997
Article ID: Q74602
3.00 3.10 WINDOWS kbprg

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows versions 3.1 and 3.0

SUMMARY

In the Microsoft Windows graphical environment, a private profile or initialization file, as the name suggests, is designed to be used when a program initializes and terminates. A profile stores a limited amount of information from one program session to the next. A profile is are not designed to serve as a database.

MORE INFORMATION

Windows assumes that an INI file is not larger than 64K; file access is not guaranteed beyond that point. Even if a text editor is used to extend the file, Windows does not search for information past the 64K boundary.

Also, Windows performs a linear search of INI files; therefore, the longer the file becomes, the longer it takes to access an item at the end of the file. Each time an application accesses an INI file, Windows opens and closes the file which incurs additional overhead.

One alternative to using initialization files to store large amounts of information is for the program to write to and maintain its own files. This approach is faster, more flexible, and more reliable than using profile for purposes for which it is not designed.


Additional reference words: 3.00 3.10
KBCategory: kbprg
KBSubcategory: UsrIni
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.