Share via


Profile Strings and .INI Files

Although Windows 95, Windows NT, and Win32s are all examples of Win32, Windows 95 and Windows NT have some features not present in Win32s.

Windows 3.x applications can access .INI files directly. In Windows 95 and Windows NT, however, such code doesn’t work because the information in .INI files is replaced by a registration database. This database offers some advantages, including security controls that prevent an application from corrupting system information, error logging, remote software updating, and remote administration of workstation software.

You can write portable code by using the profile API supported by Windows 3.x and all versions of Win32, including Windows 95 and Windows NT. Call the GetProfileString and WriteProfileString API functions instead of accessing .INI files directly. These functions use whichever underlying mechanism (.INI file or registration database) is supported by the environment you are compiling for.