I've got a web server running on Apache for Windows (which is run as a Windows Service), which uses Flask and the Python win32api library to interact with PowerPoint through the Interop library. When I run the site on the development server bundled with Flask all is well. The program opens and I can convert my presentation to video.
When I try to perform the same action from the web server running as a Service, I get a Not enough memory resources are available to complete this operation
error from the COM
layer. I am pushing the (physical) server's resources and my RAM sits at about 80% used before PowerPoint opens, but I can both open it myself and as aforementioned run it through the development web server and it works just fine.
I am using threads, and PowerPoint is being opened in a new thread from the monolith if that matters.
P.S. I know Microsoft don't condone this application of PowerPoint, but alas they don't offer a way of converting PowerPoints to video without using PowerPoint!
Turns out I wasn't running PowerPoint under the correct COM identity. I changed it using mmc -32
and adding the Component Services plug-in, then drilling down to DCOM, finding PowerPoint Slide and editing the properties to change the user. A new bug presents itself, but this is beyond the scope of this question!