更新时间:2023-02-08 21:12:13
问题是Outlook com对象正在保留引用并阻止应用程序关闭.使用以下函数,并将您的"app"对象传递给它:
The issue is that the outlook com object is holding on to references and stopping the app from closing. Use the following function and pass your "app" object to it:
private void ReleaseObj(object obj)
{
try
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
}
catch {}
finally
{
obj = null;
}
}
请参见 查看全文