Summary

This chapter showed you how to make use of unmanaged code from a J# application that executes using the common language runtime. You learned how to use P/Invoke to execute code residing in an unmanaged DLL and how to marshal data between the managed and unmanaged spaces using attributes. You also learned how to consume COM components from .NET clients, using a variety of techniques to create an RCW. Finally, you learned how to expose .NET components to COM by creating a CCW.

Although you learned how to invoke COM components from J#, the one technology notably absent from this chapter is COM+. This subject warrants a chapter of its own—the next one.

Get Microsoft® Visual J#™ .NET (Core Reference) 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.