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 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.