CheckWriteProtection

PresentationInfo.CheckWriteProtection method

Checks whether a password to modify is correct for a write protected presentation.

public bool CheckWriteProtection(string password)
ParameterTypeDescription
passwordStringThe password to check.

Return Value

True if the presentation is write protected and the password is correct. False otherwise.

Exceptions

exceptioncondition
InvalidOperationException

Remarks

  1. You should check the IsWriteProtected property before calling this method. 2. When password is null or empty, this method returns false.

Examples

[C#]
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo(presentationFilePath);
if (info.IsWriteProtected == NullableBool.True)
{
    bool isWriteProtectedByPassword = info.CheckWriteProtection("my_password");
}

See Also