This is no longer required as the SystemSettings class has been extended to support a Platform property. So now you can easily distinguish the difference between PPC, smartphone or a generic WinCE device. SystemSettings lives in the Microsoft.WindowsCE.Forms.dll assembly, so you'll need to add a reference to this dll in your project.
The code is very simple and could look like the following:
Microsoft.WindowsCE.Forms.WinCEPlatform platform =
That's alot cleaner than ugly P/invoke code.
//Do PPC stuff.
//Do smartphone stuff.
//Do WinCE stuff.