I mentioned earlier that I decided to write a DLL in C++ to invoke from my C# app for Windows Mobile. I’d not done this before, so thought I’d jot down a few quick notes about it.
I found a few detailed articles about this on MSDN that made for a good introduction to the topic:
- An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework
- Advanced P/Invoke on the Microsoft .NET Compact Framework
- Marshalling Types During Platform Invoke (P/Invoke) on the Microsoft .NET Compact Framework
- Writing Unmanaged Functions for Microsoft .NET Compact Framework-based Applications
There is a ton of information in these articles, so there isn’t much to add. Instead, I’ll give a quick, high-level overview.