Fastest way to call a COM objects method without using a RCW
- by Nathan W
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?