This is were native code meets .NET. Its very much a black art, lots of smoke and mirrors etc. etc… But a necessary evil with Windows CE. That is because it is the gateway from .NET applications to the hardware and to the operating system. This is the first of a series of blogs on this matter.
I must though give credit to others’ who shoulders I am standing on for this. Whilst I have had experience with PInvoke going back to the first version of .NET CF on Windows CE (I think it was about V4.2) I have referenced a number of sources in an attempt to provide a comprehensive coverage of this topic. I’ll provide a reading list and some links in a later blog.
These are some of the topics that I will cover:
A simple example:
bool val = true; extern "C" NATIVE_API bool GetTest1(void){ val = !val; return val; }
Need using references to System.Runtime.InteropServices in both of the C# files.
More on this in the next blog.
Cheers DJ
PS Good luck to those 3 presenting at the embedded Spark Challenge final.