I'm using c# .NET to invoke MS com using the MSOFFICE com interop DLLs.
I know that Office com interops are not thread safe. However, would it be thread safe for a different user? I don't know enough about process isolation on Windows to know if this is a limitation from shared components like this in general, or of Office coms are just poorly written. For instance, invoking PPT and outputting a video actually opens PPT and it renders the video to AVI. I know they would collide using the same logged in user account, but would it be ok if a different logged in system user invoked the process?
I ask because I'd like to stage a test environment on a machine already hosting another app. IT is hard to test in theory because we are not gauranteed to get process collisions, but it could happen.
Works beautifully and runs for weeks and months.
An example of an invocation:
using Microsoft.Office.Core;
using Microsoft.Office.Interop.PowerPoint;
Application app = new Application();
Presentations presList = app.Presentations;
Presentation pres = null;
// ... do some stuff ...
// then kill it.
private static bool KillPowerPoint()
{
Process[] prs = Process.GetProcesses();
var killed = false;
// do a bunch of stuff to kill the process ...
return killed;
}