Book a consultation

30 minute meeting

Thank you

We’ll reach out within one business day. If you don’t hear from us, check spam and promotions folders.

Contact us

Fill out the form to send us a message

Attach related materials (.pdf, .docx, .odt, .rtf, .txt, .pptx; max 5 MB)
Or

15.11.2011

1 min read

.NET Team Meeting. 11/17/2011

Today's topic was dedicated to interopability between unmanaged C++ and managed C# sides. The speaker Denis P. proposed three concepts to reach the stated goal:

  • C++/CLI language extensions as the most smooth approach. It enables a programmer to construct absolutely naturally-looking .NET classes with event sourcing, static members and properties in a convenient way.
  • C# PInvoke - can be applied to simple tasks of invoking unmanaged static library methods. More complex classes require more coding (especially creating events, since PInvoke restricts unmanaged callbacks only to call delegates from managed code). Working with .NET types from unmanaged level is also obscured.
  • COM Interop - smooth for programmers familiar with COM technology, allows to receive proper .NET classes with events but without static methods (COM architecture limitation). Creating .NET classes from COM level also possible but requires additional work.

Conclusion: for a simple interoperation it's better to use PInvoke, for some complex cases - C++/CLI language. COM is in the middle of these sides, but complex for the first try.

Thank you

We’ll reach out within one business day. If you don’t hear from us, check spam and promotions folders.

Looking for a tech partner to help you scale your project?

Let’s schedule a quick call to explore how we can support your business objectives.

Christina Berko

Let’s schedule a quick call to explore how we can support your business objectives.

Christina Berko

Client Manager

0 Comments
name *
email *

Featured Case Studies