get image from CMOS Camera Module

ljperrin
I have Mini2440 (ARM9 Board) with CMOS Camera Module (CAM130)
I have installed WINCE 5.0 and I develop with Microsoft Embedded C++ 4.0

and I try to get a image

I write this code:
1) camdriver= CreateFile (_T ( "CIS1:"), GENERIC_READ | GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, 0,NULL);
  all is good: 
     => CAMERA: CIS_Open   DRIVER_PREVIEW_ENABLE =2  SuccesIntInit=1
CAMERA: CIS_Open   mInitialized =1  "frame_count=0
CAMERA: CIS_Open   CameraEvent=0x4fd5abca   CameraThread =0x4fd5afbe

2) ret=
DeviceIoControl(camdriver,CAM_IOCTL_MOVIE_START,NULL,0,NULL,0,&nbBytesReturn
ed,NULL);

  all is good: 
     => call to  Camif_Capture(1, 1) in driver camera

3) ret1= DeviceIoControl(camdriver, CAM_IOCTL_GET_LATEST_FRAME,  NULL,  0, 
      m_pYUVBuffer, NULL, &nbBytesReturned,NULL);  
problem :
  => ret1=0;   
  in driver camera : CAMERA:CAM_IOCTL_GET_LATEST_FRAME - frame not
available!!!
  "frame_count" remains stuck at zero, there is no interruption triggered
camera

please help me  !!!

domdom
It is certainly not the solution, but did you try to insert a delay between
2 and 3 (Sleep(200); for example) ?
domdom

ljperrin
it is not the solution I tried (with delay, step by step)

thanks

ljperrin
last news :
the built-in application "CameraTest.exe" does not work
it does also a Camif_Capture(1, 1) in driver camera => no succes 

regards

domdom
What is CameraTest ?
I tried the application CMOS-Camera that is provided in the BSP, it didn't
work at the first time, i had to add in the image SYSGEN_CPP_EH_AND_RTTI
component (C++ runtime support).
Maybe it will help you...
domdom

ljperrin
CameraTest.exe is an application of BSP 2008 (contained in the sources CDs
of my kitArm)
I see that CMOS-Camera is in BSP 2010, I will try all that.
thanks

Nikhil
I have cmos camera but how i capture image from camera. I developed
application in C# and windows ce5.0 please help

Thanks

tom
hi 
i my sdk is badsave bmp file form CameraTest.exe or any exe root file ,
help me !

kiran
hai 
i am also using cam 130 cmos camera. it is also resulting bad save bmp file
when i try to capture the frame.