Summary

In this chapter, we investigated the various methods available to interoperate with native code, including functionality that is part of the underlying platform or in third-party SDKs or your own legacy C++ code. Version 2.0 of the Compact Framework has greatly improved interop functionality and supports both Platform Invoke for static C++ functions and COM interop for COM interfaces. After you can apply the basic techniques of defining your Platform Invoke declarations and know how to marshal the various types available in managed code, you can access a wide array of functionality without losing all your existing native code assets.

Get Microsoft® Mobile Development Handbook 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.