WritePrivateProfileString
时间: 2023-11-27 10:51:09 浏览: 34
WritePrivateProfileString is a function in the Windows API that allows a program to write a value to a specified section of an INI file. An INI file is a configuration file used by many Windows applications to store settings and preferences.
The function takes three parameters: the name of the section to write to, the name of the key within that section, and the value to be written. The function returns a boolean value indicating whether the operation was successful.
Here is an example usage of WritePrivateProfileString:
```
WritePrivateProfileString("MySection", "MyKey", "MyValue", "C:\\MyApp\\MyIniFile.ini");
```
This would write the value "MyValue" to the key "MyKey" in the section "MySection" in the INI file located at "C:\MyApp\MyIniFile.ini".