Calling Native Code: Quick Start

This section describes the minimum steps needed to call a function in a native DLL binary. Before jumping directly into the tutorial, there are several fundamental assumptions we are making about the DLL into which we are calling.

The most fundamental requirement is that the DLL is compiled for the CPU and Windows CE OS version for the device on which you plan to use it. It is an easy mistake to make to accidentally use the DLL binary for the wrong platform and then wonder why you get exceptions when you try to call into from native code.

It is assumed that the DLL does not have C++-style mangled names. To understand what this means, consider what happens when a group of functions written in standard C are compiled ...

Get Microsoft® .NET Compact Framework Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.