我正在开发 C# 程序以从一个名为 Cyber-Ark 的组件中获取用户,该组件存储加密数据。当我的代码运行到一半时,我得到了这个异常,即使我捕获了所有异常,我仍然得到它。有什么解决方法吗?
Unhandled Exception: System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
at PAObjectsLib.PrivateArkClass.Term()
at CyberArk.API.Objects.PrivateArk.Term()
at CyberArk.API.Objects.PrivateArk.DoDispose(Boolean disposing)
at CyberArk.API.Objects.CyberArkBase.Dispose()
at Program.Main(String[] args)