BOOL WritePrivateProfileString(
LPCTSTR lpAppName, // section name LPCTSTR lpKeyName, // key name LPCTSTR lpString, // string to add LPCTSTR lpFileName // initialization file ); 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 看清楚了么,只需将lpString设置为NULL,就可以将lpKeyName指定的键删除了。 |
lpString 为NULL时 所指的lpKeyName字段将被删除
lpKeyName为NULL是 所在域lpAppName名下的所有字段都将删除。