PPT Presentation Helper 3
About 545 words
The all-new PPT Presentation Helper 3 is here. With this update, Inkeys can follow your slideshow even on devices where the COM registration is broken. It's more compatible, more robust, and handles many more edge cases.
Highlights
Other improvements
Behind the scenes
This update took about 60 hours of development, far more than expected (the plan was 10 hours at most, but one problem led to another). If you want to build on this solution, please follow the GNU General Public License v3.0 and the Inkeys Terms of Use, and respect the work behind it: credit Inkeys and include its copyright notice in your open-source README. Otherwise, see the Terms of Use for the consequences.
The author wrote a detailed development diary in chronological order. Here's a summary:
- Early stage: PowerPoint objects are now found through the Running Object Table (ROT), which works even when the related registry entries are broken. Slideshow windows get three priority levels (has Application and ActivePresentation; has SlideShowWindow; the slideshow window is active or focused), and the helper rebinds dynamically based on them. When event registration fails, it polls the current slide every 500 ms.
- Alpha stage: COM breakage usually comes from mixing WPS and Microsoft Office with different bitness or in the wrong installation order, which leaves the objects from the ROT impossible to early-bind. Switching to
dynamiccalls brought a long fight with disappearing properties, a window handle that couldn't be read (solved by matching the window title and position instead), and RCW reference counts that must be released exactly, or PowerPoint stays stuck in the background. - Beta stage: one WPS quirk after another, such as slideshow window sizes reported in slide proportions, WPS 2019 returning no window properties, WPS 2013 calling itself Microsoft PowerPoint, and properties briefly failing at the moment a slideshow starts, which needed a retry.
- Done: every problem was solved, and the author came away with a much deeper understanding of this technology.
The full diary is available in the original Simplified Chinese version.
Source code
https://github.com/Alan-CRL/Inkeys/blob/main/PptCOM/PptCOM.cs