Why Platform Invoke Interop?

First, you need to preserve your investment. It is a little hard to see in the simple examples in Listings 7.17.4, but many companies invest considerable time and money into software. It would be impractical to suggest to management that you want to spend X amount of time porting existing software to a new platform that will have no new features that a customer can see. In some cases, the functionality of the existing software might be so involved and complex that porting it to another language would be the equivalent of rewriting it. The “bean counters” see this as an investment of time and money that has at best no return on investment, and at worst, a negative return. For the most part, the bean counters are right. ...

Get .NET Common Language Runtime Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.