CheckWriteProtection()

IProtectionManager::CheckWriteProtection(System::String) method

Determines whether a presentation is a password protected to modify.

virtual bool Aspose::Slides::IProtectionManager::CheckWriteProtection(System::String password)=0

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 IProtectionManager::get_IsWriteProtected property before calling this method.
  2. When the password is null or empty, this method returns false.

See Also