Abstract
Interoperability, or interop as it is usually called, refers to using or invoking program code from some other programming environment or language, for example, calling COM or native C++ code in a managed language. Interop is a complex but beautiful and extremely necessary thing. Many people think that the C++/CLI language for the .NET platform would be used primarily to extend existing code bases written in native C++. While there is no reason why you could not use C++/CLI as your .NET language of choice, the support that C++/CLI provides for native code interop on the .NET platform is indeed impressive. In many cases, you simply turn on the /clr compiler option and recompile your native code, producing managed code (or at least mixed code that’s mostly MSIL but with a few native x86 or x64 instructions mixed in). This feature was called IJW or “it just works” when it was originally released along with Managed Extensions for C++. And for the most part, it was true. It’s now called mixed mode. A huge amount of work went into making that type of interop possible. Also, even if you’re writing an entirely new application that uses a native API, such as Win32, interop support in C++ makes it easier and much faster to call these APIs in C++ than it is in C#.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
Rights and permissions
Copyright information
© 2006 Gordon Hogenson
About this chapter
Cite this chapter
(2006). Interoperability. In: C++/CLI. Apress. https://doi.org/10.1007/978-1-4302-0282-0_12
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0282-0_12
Publisher Name: Apress
Print ISBN: 978-1-59059-705-7
Online ISBN: 978-1-4302-0282-0
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books