PocketPC Camera Management Issues

What is the best way to support WindowsMobile5 (and later) devices while maintaining code compatibility with PocketPC 2003 written in C #? We have a fairly large application used by a number of different clients, roughly equally divided between people with actual PPC2003 devices and the rest of the new WinMobile5 or newer - that is, we must continue to support old devices for quite some time though. Now I need to add camera control to the application, at least for those devices that have a camera, so that they can snap a photo and attach it to other data that is ultimately sent to the web service for processing.

So far, my research has included the CameraCaptureDialog class in the Microsoft.WindowsMobile.Forms dll, but I cannot add this link to the PocketPC 2003 application. The boss is not too interested in splitting the application into separate PPC2003 and WinMobile projects. Is there a way to load this dll dynamically and using CameraCaptureDialog this way? Any other option?

+4
source share
1 answer

The only way to access the camera in general from the .NetCF PocketPC 2003 application is through P / Invoking for the C / C ++ DLL. Thereโ€™s an example application for this swimming around Intertubes somewhere (Iโ€™ll look for it - I canโ€™t remember the details, but I think the C code accesses the camera through DirectShow), but itโ€™s quite difficult to work and probably do just that what you need. On the other hand, if you can understand how to do this, this will work for both PocketPC 2003 and Windows Mobile 5 (i.e., the functional application PPC2003 will also work on the WinMo5 device).

CameraCaptureDialog is almost useless, so you don't lose much there. Ideally, as a programmer, you want the camera interface to be controlled programmatically (that is, set the resolution, switch from the camera to video, take a picture, etc.), but it really does not allow you to do anything other than opening the device's built-in interface.

Update: Here is an example application that I mentioned:

http://blogs.msdn.com/b/marcpe/archive/2006/03/03/542941.aspx

And I forgot: this example will not work in PocketPC 2003 (only in Windows Mobile 5 and above). I do not know how to access the camera device in PocketPC 2003. At least there is no access to the camera with the device and / or manufacturer. With some devices (such as the HP iPaq), the manufacturer provides camera functions through a DLL already present on the device (which you can access through P / Invoke).

If you need integration with the camera, the device must be running Windows Mobile 5 (or newer). Some devices may be upgraded to a newer version of the OS, but I would definitely have to question this move. Itโ€™s better to upgrade to a more modern device (e.g. Droid).

+2
source

Source: https://habr.com/ru/post/1315473/


All Articles