GetPrivateProfileString issues with getPrivateProfileint under Win98.

xiaoxiao2021-03-06  17

GetPrivateProfileString () and getPrivateProfileint () are two APIs to read the INI file. General programs use these two functions to read the parameters for program configurations in the * .ini file when loading. So INI documents are generally fixed.

This time you read a value in the INI file multiple times in the program, and the INI file may change by other programs.

Pressing the path of the INI file in the parameter of getPrivateProfileString () and getPrivateProfileint (), and there is no problem after reading after the INI file change, in fact, it is indeed no problem under WinXP. However, there is a problem under Win98. GetPrivateProfileString () and getPrivateProfileint () The value read out will be the value in the old INI file. The last solution is to read a rest of the INI file before reading this new INI file, so every time it is correct .

It is not very familiar with Win98, which may be the reason why the cache is replaced.

转载请注明原文地址:https://www.9cbs.com/read-41119.html

New Post(0)