Re: ComInterop



I would say that some of the main downsides of COM Interop is the overhead of marshalling your parameters to the COM component. In general, you should use COM interop when you need to interact with an existing COM component. It is always preferable to have a "pure" .NET solution, but is some cases, it might be budget- or time prohibitive to rewrite existing components.

- Bennie
me wrote:
What is the downside of Cominterop? is it good practice? what does it do to memory?

Thanks
.



Relevant Pages

  • Re: Garbage collectable pinned arrays!
    ... The OP is measuring the overhead of a GCHandle.Alloc, ... exactly what is done by GCHandle.Alloc with GCHandleType.Pinned, that's why he is measuring this methods overhead. ... But interop doesn't pin implicitely, it pins the arguments when needed. ... "Pointer Table" together with some ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Interop Marshalling Overhead - Newbie qn
    ... Interop Overhead ... In my application I'm quite comfortable with the interop ... Marshalling Overhead ... int GetDataFromXYZ; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Interop Marshalling Overhead - Newbie qn
    ... SuppressUnmanagedCodeSecurityAttribute to my interop calls I could reduce the ... interop access overhead by a factor of 4-5! ... >> expensive marshalling penalties. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Interop Marshalling Overhead - Newbie qn
    ... > SuppressUnmanagedCodeSecurityAttribute to my interop calls I could reduce ... Yes, that's right, SuppressUnmanagedCodeSecurityAttribute removes the ... security level. ... while for most others this overhead is simply ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: CCW overheads
    ... It's impossible to say with only that information if COM interop ... overhead will be an issue or not for you. ... Mattias Sjögren [MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.framework.interop)