C#Marshal.GetActiveObject(" PowerPoint.Application")错误

时间:2016-11-05 02:27:17

标签: c# powerpoint administrator

我正在研究一种工具来获得运行的电源点程序并对其进行控制 我用这段代码来获取运行程序的参考。

 var pptApplication = Marshal.GetActiveObject("PowerPoint.Application")

但它引发了这个错误

Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))

我注意到这种情况正在发生,因为我的应用程序是以管理员身份运行但功率点并非如此,当我正常运行我的应用程序时,它可以工作,但我需要它作为管理员

请原谅我的英语不好。

0 个答案:

没有答案