CheckWriteProtection()

ProtectionManager::CheckWriteProtection(System::String) method

Determines whether a presentation is a password protected to modify.

bool Aspose::Slides::ProtectionManager::CheckWriteProtection(System::String password) override

Arguments

ParameterTypeDescription
passwordSystem::StringThe password for checking.

Return Value

True if the password is valid; otherwise, false.

Remarks

auto presentation = System::MakeObject<Presentation>(presentationFilePath);
bool isWriteProtected = presentation->get_ProtectionManager()->CheckWriteProtection(u"my_password");
  1. You should check the ProtectionManager::get_IsWriteProtected property before calling this method.
  2. When the password is null or empty, this method returns false.

See Also