Fastest way to call a COM objects method without using a RCW
Posted
by Nathan W
on Stack Overflow
See other posts from Stack Overflow
or by Nathan W
Published on 2009-03-04T02:31:50Z
Indexed on
2010/03/22
13:51 UTC
Read the original article
Hit count: 570
I'm trying to find the cleanest and fastest way for calling a COM objects methods.
I was using a RCW for the object but every time a new version of the third party COM object comes out its GUID changes which then renders the RCW useless, so I had to change and start using
Type mytype = Type.GetTypeFromProgID("MyCOMApp.Application");
so that every time a new version of the COM object comes out I don't have to recomplie and redeploy my app.
At the moment I am using refelection like mytype.InvokeMemeber
but I feel it is so slow compared to just calling the RCW.
How does everyone else tackle the problem of changing 3rd party COM object versions, but still maintaining the speed of a RCW?
© Stack Overflow or respective owner