DeletePrivateProfileString?



  • Wie kann ich am Schnellsten und Besten (im BCB ist das leicht) einne Eintrag aus einer Ini-Datei wieder löschen?



  • Ich frag mich, wie oft man hier noch die MSDN zitieren muss ...

    WritePrivateProfileString
    The WritePrivateProfileString function copies a string into the specified section of an initialization file.

    Note This function is provided only for compatibility with 16-bit versions of Windows. Applications should store initialization information in the registry.

    BOOL WritePrivateProfileString(
    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.



  • Ups das ist jetzt aber peinlich!


Anmelden zum Antworten