O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

This chapter focused on the methods and techniques available to interoperate with legacy C/C++ unmanaged code that is implemented in DLLs. You learned how to specify the type of marshaling that is required to move your data in the managed world to the unmanaged world using the DllImport attribute. Although many of the samples that were provided were in C#, you saw that it is possible to use these same techniques in many different languages. You learned that with VC++ and the managed extensions it provides, It Just Works (IJW) is an alternative to P/Invoke. Using IJW, you can call unmanaged code without the DllImport attribute. The most significant drawback to using IJW is that you have to explicitly do the marshaling yourself. You learned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required