Question

I am aware that in Windows Mobile 5.0+, you can add reference to Microsoft.WindowsMobile.Status dll and use that to detect if camera is supported.

However, Microsoft.WindowsMobile.Status is supported in Windows Mobile 5.0 and higher. How to detect if camera is supported in a project that is targeting Pocket PC 2003 Device?

Much appreciated, db

Was it helpful?

Solution

If you're used to invoking WindowsMobile.Status then I am assuming you're using .NetCF? If so, you can effectively emulate the same PInvoke that Status.dll is doing. You'll have to setup your own, of course, but no big deal.

You'll have to do some additional research to see what dll's/native functions are used for camera support (it's probably not enough that the dll is on the handset ... so no simply checking for the existence of the file), but my guess is it's like most of the "IsXXXX()" type methods and functions that there will be a bitmask you need to check, etc., etc., etc.

Also worth mentioning ... there used to be a company called OpenNETCF (not sure if they're still around anymore) but they did a good job of exposing a lot of the native functions via .NetCF for those guys who weren't inclined to do it for themselves. They used to have a lot of code/examples out there so you should be able to run some searches on them if you're looking for some additional insight/head starts.

Congrats, by the way, most of the guys I know who used to do Windows Mobile/Windows CE have moved to BlackBerry/iOS/Android .... nice to see someone still doing this stuff.


EDIT:

Did a quick search and found the following (which, confirms my earlier assertion). Check out this link from Chris Tacke (http://blog.opennetcf.com/2008/01/22/more-fun-with-cameras-and-padarn/). A lot of their libraries included source code ... run it down to see the native functions being invoked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top