CheckWriteProtection()
IPresentationInfo::CheckWriteProtection(System::String) method
Checks whether a password to modify is correct for a write protected presentation.
virtual bool Aspose::Slides::IPresentationInfo::CheckWriteProtection(System::String password)=0
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 IPresentationInfo::get_IsWriteProtected property before calling this method.
- When password is null or empty, this method returns false.
See Also
- Class String
- Class IPresentationInfo
- Namespace Aspose::Slides
- Library Aspose.Slides