用C++/CLI和IDisposable方式比较好,CLR对RCW的支持方式使得调用Marshal.ReleaseComObject很危险,除非你能确定COM对象没有在其他任何地方被托管代码引用
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP