CheckWriteProtection()
PresentationInfo::CheckWriteProtection(System::String) method
Checks whether a password to modify is correct for a write protected presentation.
bool Aspose::Slides::PresentationInfo::CheckWriteProtection(System::String password) override
Arguments
Parameter | Type | Description |
---|---|---|
password | System::String | The password to check. |
Return Value
True if the presentation is write protected and the password is correct. False otherwise.
Remarks
auto info = PresentationFactory::get_Instance()->GetPresentationInfo(presentationFilePath);
if (info->get_IsWriteProtected() == Aspose::Slides::NullableBool::True)
{
bool isWriteProtectedByPassword = info->CheckWriteProtection(u"my_password");
}
- You should check the PresentationInfo::get_IsWriteProtected property before calling this method.
- When password is null or empty, this method returns false.
See Also
- Class String
- Class PresentationInfo
- Namespace Aspose::Slides
- Library Aspose.Slides