Using the Win32 Profile APIs

[This is preliminary documentation and subject to change.]

The Win32 Profile APIs (GetPrivateProfileString and WritePrivateProfileString) use a separate cache than the one used by SetupOpenInfFile. Therefore, if you open MIGRATE.INF using SetupOpenInfFile, and then (before closing it) modify the file using WritePrivateProfileString, your changes will not appear in SetupOpenInfFile cache.

As such, care must be taken when using both the Win32 Profile APIs and the Setup APIs. Ideally, their use must be separated.

If you modify MIGRATE.INF using WritePrivateProfileString, you must call WritePrivateProfileString again with all NULL parameters to force the file to be written to disk before you open it again using SetupOpenInfFile.

If a file has already been opened with SetupOpenInfFile, do not call WritePrivateProfileString to modify the same file.