Performance of passing data between .Net and COM assemblies

风格不统一 提交于 2019-12-05 18:41:55

I haven't done anything specific on this but from my experience with Interop, .NET is very well optimized and usually per interop call to Win API or COM only introduces nano seconds of overhead that is negligible. ADO Recordset will just be treated the same as any other COM objects created on unmanaged heap and under the hood is the IntPtr address that they deal with.

Native .NET framework library and its garbage collector is far superior than whats avaialble in VB. I believe rewriting some of your old VB code in .NET may give you some performance gain more or at least enough to ignore the interop overhead. Best if you equip yourself with a profiler tool and continuosly monitor performance as you migrate the implementation piece by piece.

Unfortunately I highly doubt anyone will be able to give you any information regarding your situation that you don't already know. You mentioned that you're passing recordsets to and from VB6 which I can only assume means that you're using the old school ADO COM object from within .Net.

Ick.

So assuming there was no other way I can only conclude I have no idea what kind of technical hurdles you're running into that would force you to commit such an atrocity. I can merely wish you the best of luck.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!