BOOL WritePrivateProfileString(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpString,
LPCTSTR lpFileName
);
请问这个函数怎么调用??????????
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpString,
LPCTSTR lpFileName
);
请问这个函数怎么调用??????????
LPCTSTR lpAppName, // section name
LPCTSTR lpKeyName, // key name
LPCTSTR lpString, // string to add
LPCTSTR lpFileName // initialization file
);
Parameters
lpAppName
[in] Pointer to a null-terminated string containing the name of the section to which the string will be copied. If the section does not exist, it is created. The name of the section is case-independent; the string can be any combination of uppercase and lowercase letters.
lpKeyName
[in] Pointer to the null-terminated string containing the name of the key to be associated with a string. If the key does not exist in the specified section, it is created. If this parameter is NULL, the entire section, including all entries within the section, is deleted.
lpString
[in] Pointer to a null-terminated string to be written to the file. If this parameter is NULL, the key pointed to by the lpKeyName parameter is deleted.
Windows 95/98/Me: The system does not support the use of the TAB (\t) character as part of this parameter. lpFileName
[in] Pointer to a null-terminated string that specifies the name of the initialization file.
[Options]
name=value
.
.
.
你可以这样吧name改掉:
WritePrivateProfileString("Options", "name", "new value", ".\\cofnig\、a.ini");
[help]
key=2lpAppName是xml.ini文件中的help名称。
lpKeyName是xml.ini文件中help区key名
lpString是你要写的值.如2
lpFileName是文件名.如xml.ini