Marshalling the Fundamental Data Types

The previous section explained the fundamentals of calling into a native DLL. It touched on such topics as where to put the DLL, what the restrictions are for making a call, and how to declare a native function as part of a managed class. A simple example proved that everything worked as expected.

ERROR HANDLING IN THE SAMPLE APPLICATIONS

Note this application and all of the others in this chapter are made to be as simple as possible while demonstrating the intended concepts. Thus, there is minimal input checking or error handling code, which can clog the project with extra code and detract from the central concept being demonstrated. For example, if you enter an alphabetic character into a field that is ...

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.