O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

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

In Brief

  • There are a variety of situations where it is necessary for managed code to call into native code, such as for calling the Windows CE API.

  • While managed binaries are portable to all of the CPU types supported by the .NET Compact Framework, developers must be careful to use native binaries compatible with the hardware they are running on.

  • DLLs written in C++ sometimes use name mangling on the function names they expose, making it harder to call into such DLLs from managed code.

  • To call a native function from managed code, you first declare the native function in the class from which it will be called. Then the native function is treated as one of the class' methods.

  • Managed code throws exceptions if it cannot find the native DLL to call into, ...

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