free web page counters

Windows Mobile Pocket PC Smartphone Programming

==>Click here for the SiteMap<==. Original contents with decent amount of source codes.

Monday, April 17, 2006

Using Camera API with only Embedded Visual C++ 4.0 (evc4): Sample code and EVC4 workspace download

====>SiteMap of this Blog<===

Using Camera API with only Embedded Visual C++ 4.0 (evc4): Sample code and EVC4 workspace download

In my previous post, I talked about how to use the new Camera API in Windows Mobile 5.0 SDK with only Embedded Visual C++ 4.0 (evc4).

You can download the EVC4 workspace here. The source code is written based on the MSDN documentation on SHCameraCapture, which states:

Application writers should be aware that SHCameraCapture function can cause the calling application to stop responding in cases where the calling application is minimized and then reactivated while the call to SHCameraCapture function is still blocking.

The sample code is written by copying the snippets in that MSDN documentation, although I do not really find such "stop responding" mischief using the "possible sequence of events". The program shows "Capture" and "Exit" in the bottom menu bar. Clicking the left soft key launches the camera capture dialog. After clicking the Action key, the program captures videos for 15 seconds then ask for a place to save the video file.

Two gotchas:

  • The MSDN documentation says the window class of camera capture dialog is "Camera View". In my Sprint PPC6700 device, the class name is actually "WCE_IA_Camera_Main" (read the source code for a comment).

  • The camera capture dialog still shows even after the program is closed. The function "CloseCameraDialog" is used to close it before the program shuts down (read the source code for details)

BTW, the tool to find out the window class is Remote CE Spy. The default Remote CE Spy shipped with VS2005 does not work well with Windows Mobile 5.0 device. Read "Remote CE Spy shipped with Visual Studio 2005 fails to intercept windows messages" for a possible solution.

====>SiteMap of this Blog<===




[ [permalink] ]

2 Comments:

At June 05, 2006 3:03 AM, Anonymous Anonymous said...

Can I use this API to develop a software works under Widows Mobille 2003 SE ?
I mean Can I use this API for Windows 2003 SE palthform ?
If It isn't work ? is there any another API or Lib can I use it for Windows Mobile 2003 SE ?

 
At September 04, 2007 4:23 PM, Anonymous Anonymous said...

I tried it but didn't work.
Because the aygshell.dll of WM2003 did not contain the SHCameraCapture function we can't use it. I'm searching the web to find. Some people used other dll's like camera.dll. This dll isn't visible by the user it's in the ROM image. We need to know the prototype of the function before calling it.

 

Post a Comment

<< Home