unmanaged code, COM interop vs. exported C functions

  • Thread starter Thread starter Kevin Aubuchon
  • Start date Start date
K

Kevin Aubuchon

Hello,

I need to use a Win32 DLL for a C# client. Any advantage exposing my
functions as a COM object versus exported C functions? There will only be a
few function calls. Using COM seems like too much overhead for the little
interaction. I'm open to any insights or opinions.

Thanks in advance,
 
I don't see any advantage, but as you mention, there's all the disadvantage
(and overhead) of using COM interop.
 
I agree with Michael - export your public functions with the WINAPI
convention and consume them from the C# client with P/Invoke.
 
If it's an existing DLL with only exported C functions, you don't have any
other option as to use PInvoke.

Willy.
 
Back
Top