Loading the PPT File in C++ Throws an Error: “Specified Cast Is Not valid”

Opening the file caught an exception “Specified cast is not valid”
sdk:aspose-slides-cpp-windows-23.1
code:

try
{
  System::SharedPtr<System::IO::FileStream> stream = System::MakeObject<System::IO::FileStream>(pptFilePath, System::IO::FileMode::Open, System::IO::FileAccess::Read, System::IO::FileShare::ReadWrite);
  System::SharedPtr<Aspose::Slides::Presentation> presentation = System::MakeObject<Aspose::Slides::Presentation>(stream);
}
catch (const System::Exception& error)
{
  std::string errorMsg = error->get_Message().ToUtf8String(); 
}

ppt file:resource/Specified cast is not valid.ppt at main · 357809764/resource · GitHub

@101ppt,
Thank you for reporting on the issue. I’ve reproduced the error you described.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESCPP-3812

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Please note that the PowerPoint document is corrupted (it cannot be opened in PowerPoint without repairing).

The issues you found earlier (filed as SLIDESCPP-3812) have been fixed in Aspose.Slides for C++ 23.12 (Windows, Linux, macOS).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.