.. highlightlang:: us .. index:: DocSetProtectionFlags .. _docsetprotectionflags: DocSetProtectionFlags ===================== .. us.tag DocSetProtectionFlags DocSet New400 :ref:`DocSetProtectionFlags` setzt ein Password, einen Passwordkommentar und Protection-Flags. .. function:: bool = DocSetProtectionFlags(hDoc, flags, ssPassword, ssComment) .. us.return **Returnwert** *bool* ist TRUE (1), wenn die Funktion erfolgreich war und sonst FALSE (0). .. us.params **Parameter** .. uparam:: hDoc *hDoc* ist die Zugriffsnummer eines UniPlot-Dokuments. .. uparam:: flags Die Flags ``PROTECT_READ`` und ``PROTECT_WRITE`` können oder-verknüpft werden. ``PROTECT_READ|PROTECT_WRITE`` schützt das Dokument gegen Öffnen und Veränderung. .. list-table:: :header-rows: 1 * - Wert - Bedeutung * - PROTECT_NONE (0) - Kein Schutz. * - PROTECT_READ (1) - Schutz gegen Öffnen. * - PROTECT_WRITE (2) - Schutz gegen Verändern. .. uparam:: ssPassword *ssPassword* ist das Password. Gross-/Kleinschreibung wird unterschieden. .. uparam:: ssComment *ssComment* ist der Kommentar. Der Kommentar wird beim Öffnen des Dokumentes angezeigt. .. us.example **Beispiel** :: hDocTemplate = DocCreate(GetRootDirectory() + "/template/template-de.ipz", 3); hDocNew = DocCreate(); DocCopyPage(hDocTemplate, 4, hDocNew); DocSetProtectionFlags(hDocNew, PROTECT_READ, "hallo", "hallo"); DocSave(hDocNew, "d:/test.ipw"); DocDestroy(hDocTemplate); DocDestroy(hDocNew); hDoc = DocCreate("d:/test.ipw", 0, "hallo"); .. us.comment **Kommentar** Das Dokument wird durch diesen Befehl **nicht verschlüsselt**. Der Befehl bietet also keinen echten Schutz gegen Lesen der in der Datei enthaltenen Informationen. .. seealso:: :ref:`uberblick-dokumente`, :ref:`DocGetProtectionFlags`, :ref:`DocGetProtectionComment` :sub:`id-520023`